Closedown

This commit is contained in:
boccioli_m
2015-09-03 15:12:36 +02:00
parent 7e9eea8d92
commit 20605f08c3
4 changed files with 82 additions and 36 deletions
+38 -36
View File
@@ -20,48 +20,50 @@ def startTest(testName, DEVICE, params):
######### WRITE YOUR CODE HERE BELOW #############
#All the code in this section ## ..YOUR CODE.. ## can be modified/deleted.
#It must be indented at the same level as this comment
#-----------------------------------
# GETTING INPUTS:
#If needed, the following variables are available:
#testPath string, path of this test file
#testName string, name of this test
#DEVICE string, device for which the test must run (typically it is the beginning of a process variable name)
#-----------------------------------
# GETTING TEST PARAMETERS:
#if you need to get parameters for the test, use (casting may be necessary):
#myParamValue = test.getParam('myParamName')
#see the test config for the list of parameters specific to the test.
#-----------------------------------
# SETTING OUTPUTS:
#ret string, a text summarizing the result of the test. It must be set before the end of your code.
#success bool, True = test successful. It must be set before the end of your code.
#test.sendFeedback(ret,success) method that ends the testing script and gives the report to the calling application.
#Examples:
#
#whenever the code must quit (i.e. after an error), you must end with:
#ret = 'here is some info on what failed on the test'
#success = false
#test.sendFeedback(ret, success)
#
#whenever the code is finished successfully, you must end with:
#ret = 'here is some info on the success of the test'
#success = true
#test.sendFeedback(ret, success)
#-----------------------------------
# LOG INFO:
#when some information must be shown on the log, use:
#test.log('test to log')
"""
All the code in this section ###..YOUR CODE..### can be modified/deleted.
It must be indented to the same level as this comment
-----------------------------------
GETTING INPUTS:
If needed, the following variables are available:
testPath string, path of this test file
testName string, name of this test
DEVICE string, device for which the test must run (typically it is the beginning of a process variable name)
-----------------------------------
GETTING TEST PARAMETERS:
if you need to get parameters for the test, use (casting may be necessary):
myParamValue = test.getParam('myParamName')
see the test config for the list of parameters specific to the test.
-----------------------------------
SETTING OUTPUTS:
ret string, a text summarizing the result of the test. It must be set before the end of your code.
success bool, True = test successful. It must be set before the end of your code.
test.sendFeedback(ret,success) method that ends the testing script and gives the report to the calling application.
Examples:
whenever the code must quit (i.e. after an error), you must end with:
ret = 'here is some info on what failed on the test'
success = false
test.sendFeedback(ret, success)
whenever the code is finished successfully, you must end with:
ret = 'here is some info on the success of the test'
success = true
test.sendFeedback(ret, success)
-----------------------------------
LOG INFO:
when some information must be shown on the log, use:
test.log('test to log')
"""
########## Example (can be removed) ######
#print the list of parameters passed. If any error, stop and send feedback
test.log("Example - Test name: "+testName):
test.log("Example - Device name: "+DEVICE):
test.log("Example - Test name: "+testName)
test.log("Example - Device name: "+DEVICE)
try:
test.log("Running test Initialise with the following parameters:")
test.log(params )
#If present, use the parameters here below for your test script
#If present, use the parameters here below for your test script. You might need to change the casting
#$testParameters
except:
ret = 'Could not retrieve testing parameters - ' + traceback.format_exc()