Index: tst_HDBloodFlowData/test.py =================================================================== diff -u -r393fd43e9a1cbf6b25a0f107928a051a622b2be2 -r40314c67874695eefc506c3a6a33896495953edd --- tst_HDBloodFlowData/test.py (.../test.py) (revision 393fd43e9a1cbf6b25a0f107928a051a622b2be2) +++ tst_HDBloodFlowData/test.py (.../test.py) (revision 40314c67874695eefc506c3a6a33896495953edd) @@ -13,46 +13,54 @@ # import names -from dialin.squish import utils, denaliMessages +from dialin.ui import utils +from configuration import config, utility - def gotoScreenNtest_Contains_BloodFlowData(): - mouseClick(waitForObject(names.o_mainMenu_manager)) + mainMenuManager = utility.get_object_from_names(names.o_mainMenu_manager, "names.o_mainMenu_manager object is missing") + if mainMenuManager is not None: + mouseClick(waitForObject(names.o_mainMenu_manager)) test_values(0, 0, 0, 0, 0, 0, 0) def test_values(vFlowSetPt, vMeasFlow, vRotSpd, vMotSpd, vMCSpd, vMCCurr, vPWM): + test.fail(f"TODO need to update body of the test_value({vFlowSetPt},{vMeasFlow},{vRotSpd},{vMotSpd},{vMCSpd},{vMCCurr}, {vPWM}) function...return") + return + test.compare(str(waitForObjectExists(names.o_managerHome_BloodFlowData_FlowSetPoint ).text), "{:.0f}".format( vFlowSetPt )) test.compare(str(waitForObjectExists(names.o_managerHome_BloodFlowData_MeasuredFlow ).text), "{:.2f}".format( vMeasFlow )) test.compare(str(waitForObjectExists(names.o_managerHome_BloodFlowData_RotorSpeed ).text), "{:.2f}".format( vRotSpd )) test.compare(str(waitForObjectExists(names.o_managerHome_BloodFlowData_MotorSpeed ).text), "{:.2f}".format( vMotSpd )) test.compare(str(waitForObjectExists(names.o_managerHome_BloodFlowData_MotorCtlSpeed ).text), "{:.2f}".format( vMCSpd )) test.compare(str(waitForObjectExists(names.o_managerHome_BloodFlowData_MotorCtlCurrent).text), "{:.2f}".format( vMCCurr )) test.compare(str(waitForObjectExists(names.o_managerHome_BloodFlowData_PWMDutyCycle ).text), "%" "{:.2f}".format( vPWM )) + +def setTreatmentBloodFlowRate(vValue1, vValue2, vValue3, vValue4, vValue5, vValue6, vValue7): + test.fail(f"TODO need to populate the body, used to be denaliMessages.setTreatmentBloodFlowRate({vValue1},{vValue2},{vValue3},{vValue4},{vValue5},{vValue6}, {vValue7})") def main(): utils.tstStart(__file__) - startApplication(names.AUT_NAME) + startApplication(config.AUT_NAME) utils.waitForGUI(1) gotoScreenNtest_Contains_BloodFlowData() utils.waitForGUI(1) step = 10 for i in range ( 10, 500, step): - denaliMessages.setTreatmentBloodFlowRate(i, i + step * 1, i + step * 2, i + step * 3, i + step * 4, i + step * 5, i + step * 6) + setTreatmentBloodFlowRate(i, i + step * 1, i + step * 2, i + step * 3, i + step * 4, i + step * 5, i + step * 6) test_values (i, i + step * 1, i + step * 2, i + step * 3, i + step * 4, i + step * 5, i + step * 6) - denaliMessages.setTreatmentBloodFlowRate(100, 200, 300, 400, 500, 600, 700) + setTreatmentBloodFlowRate(100, 200, 300, 400, 500, 600, 700) test_values (100, 200, 300, 400, 500, 600, 700) # Coverage - denaliMessages.setTreatmentBloodFlowRate(100, 200, 300, 400, 500, 600, 700) + setTreatmentBloodFlowRate(100, 200, 300, 400, 500, 600, 700) test_values (100, 200, 300, 400, 500, 600, 700) - denaliMessages.setTreatmentBloodFlowRate(0, 0, 0, 0, 0, 0, 0) + setTreatmentBloodFlowRate(0, 0, 0, 0, 0, 0, 0) test_values (0, 0, 0, 0, 0, 0, 0) utils.tstDone()