|
Set
|
VsUtils.variables['<name>'] = v |
|
Get
|
v = VsUtils.variables['<name>'] |
from VsUtils import variables as vs> to access variables easily with <vs['...']>
assertTrue(expr) |
assertFalse(expr) |
assertEqual(fisrt,second) |
assertNotEqual(fisrt,second) |
assertAlmostEqual(fisrt,second,places=7) |
assertNotAlmostEqual(fisrt,second,places=7) |
assertRaises(excClass,callObj, *args,**kwargs) |
fail() |
(..., msg=None, continueTest=True)"...%i" % vs[...]
assertTrueInterval(expr) |
assertFalseInterval(expr) |
assertAlmostEqualInterval(first,sec,places) |
assertNotAlmostEqualInterval(first,sec,places) |
assertTrueAtLeastInterval(expr) |
assertAtLeastOnceTrue(expr) |
(..., msg=None)
async = ATLAsyncTest(self)
async.assert...(lambda:vs[*varname*]...,msg)
async.assert...('vs[*varname*]...',msg)
async.assert...(*function*,msg)
async.execute(timeout)
|
How to disable warning import msg
sys.modules['ihooks'].current_importer.addOkModule('xxx)
|
|
In custom assert, how to get correct file/line
Use tbskip param in self.result.addFailure
|
|
How to interact with operator ?
Use wx python binding
|
rtc.setLogLevel(*level*)
rtc.startLogSession('*SessionName*', '*comment*')
rtc.logMessage(RTC.Logger.*level*, '*UserModule*', '*msg*')
...
rtc.stopLogSession()
|
Creation
rtc = RTC.RTCManager(ip [, port])
|
|
Connection
rtc.connect(ip [, port])
|
|
Configure if not done by mmi
rtc.configure(client name, dbPath)
|
|
Usercode control
rtc.[start/stop]Code(codeName)
|
|
Monitoring control
rtc.[start/stop]Monitor(taskName)
|
|
Archiver control
rtc.[start/stop]Recordset(rsName)
|
|
Manage errors
try:... except: SystemError , detail:
|
class notifier(Vs.Callback):
def variableDidChange(*args):
print 'callback called'
callback = notifier()
notif = VsUtils.vc.
registerCallbackValueChanged(name,callback)
...
del notif
VsUtils.vc.createVariable('<name>', Vs.<type>, [capacity=1]) |
VsUtils.vc.deleteVariable('<name>') |
import timetime.sleep(seconds) |
class *<TestCase name>*(ATLTestCase):
def initialize(self):
# no exception inside this method
def finalize(self):
# no exception inside this method
def execute(self):
# test steps here, see Assertions
|
TestSuite (tsdef)
|
|||
|
Root TestGroup
|
|||
|
TestGroup
|
|||
|
TestCase
|
|||
|
TestCase
|
|||
|
$PYTHONPATH
|
/opt/gc/lib/python
|
|
/opt/vs/lib
|
|
|
python utest/ATL/ATLTestRunner.py
|
|
|
-c config.xml
|
|
|
-r result.xml
|
|
|
-v verbose in console
|
|
|
[--server] xmlrpc server
|
|
|
Passed
|
tests within limits
|
|
Failed
|
test not in limits
|
|
Aborted
|
not completed (exception)
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.