diff --git a/script/local.py b/script/local.py index 3e20a58..f9054af 100644 --- a/script/local.py +++ b/script/local.py @@ -87,6 +87,15 @@ class TestingTool: print now + ' ' + self.deviceName + ' - ' + self.testName + ': ' + 'cannot write Log in Data' + def printParameters(self, params): + """ + Print/log the pshell parameters + params = the JSON object with the parameters passed by pshell + """ + columnsFormat = '{0:10} {1:10} {2}' + self.log(columnsFormat.format("cedccewc", "23", "ewfe erfgerf ref erf")) + + def sendFeedback(self, returnString, testPassed): """ Prepare and send feedback to calling tool diff --git a/script/tests/tests.properties b/script/tests/tests.properties index e6b7a6f..fa3c127 100644 --- a/script/tests/tests.properties +++ b/script/tests/tests.properties @@ -1,5 +1,5 @@ #TestingList for pshell: configuration properties -#Mon Aug 28 15:27:51 CEST 2017 +#Tue Aug 29 11:08:21 CEST 2017 customPanel= showEnabledTestsOnly=true listFilter=test-bx84 diff --git a/script/tests/tests/sad/rightleft/rightleft.py b/script/tests/tests/sad/rightleft/rightleft.py index eeab882..647de5e 100644 --- a/script/tests/tests/sad/rightleft/rightleft.py +++ b/script/tests/tests/sad/rightleft/rightleft.py @@ -65,11 +65,11 @@ def startTest(testName, DEVICE, params): ########## Example (can be removed) ###### # print the list of parameters passed. If any error, stop and send feedback. - test.log("Example - Test name: " + test.getName()) - test.log("Example - Device name: " + test.getDeviceName() ) + # test.log("Example - Test name: " + test.getName()) + # test.log("Example - Device name: " + test.getDeviceName() ) try: test.log("Running test with the following parameters:") - test.log(params) + test.printParams(params) # If present, use the parameters here below for your test script. # These parameters were automatically generated: you might need to change the casting. delay = float(test.getParam('delay')) ; centre = float(test.getParam('centre')) ; moveAround = float(test.getParam('moveAround')) ; steps = float(test.getParam('steps')) ; @@ -161,16 +161,16 @@ def startTest(testName, DEVICE, params): maxError = abs(float(forwardsValues[sample]) - float(motor_sta) ) maxErrorPos = sample import java.awt.Color - p1.addMarker(maxErrorPos, None, "MaxE=" + str(maxError), java.awt.Color.GREEN) + p1.addMarker(maxErrorPos, None, "Max Err = " + str(maxError), java.awt.Color.GREEN) # Closing channels: all channels that were opened with Channel() must be closed before exit: pv_motor_sta.close() pv_motor_val.close() # IMPORTANT: if the test was successful, write the report into the variables ret and success. # for example, write the following: - ret = "Example - Test successful, max error: " + str(maxError) + " at " + str(maxErrorPos) + ret = "Test successful, max error: " + str(maxError) + " at " + str(maxErrorPos) success = True - test.sendFeedback(ret, success) + #test.sendFeedback(ret, success) # once the test is finished, no need to do anything. The code below yours will do the rest. ################ End of Example ##########