Index: shared/scripts/configuration/config.py =================================================================== diff -u -rc34ef8c984d49d631b04cd06e2afb65499485f19 -r671a0301c5ba3bfcfef9692dc981245cd4932a14 --- shared/scripts/configuration/config.py (.../config.py) (revision c34ef8c984d49d631b04cd06e2afb65499485f19) +++ shared/scripts/configuration/config.py (.../config.py) (revision 671a0301c5ba3bfcfef9692dc981245cd4932a14) @@ -87,5 +87,5 @@ NUM_OF_REQUEST_REJECT_REASONS = 43 -SALINE_BOLUS_CUMULATIVE = 300 +SALINE_BOLUS_CUMULATIVE = 10 Index: shared/scripts/names.py =================================================================== diff -u -r7d87d4d539d329ece83668bcdf775bb1a96ebf47 -r671a0301c5ba3bfcfef9692dc981245cd4932a14 --- shared/scripts/names.py (.../names.py) (revision 7d87d4d539d329ece83668bcdf775bb1a96ebf47) +++ shared/scripts/names.py (.../names.py) (revision 671a0301c5ba3bfcfef9692dc981245cd4932a14) @@ -56,16 +56,17 @@ o_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Volume Delivered", "type": "Text", "unnamed": 1, "visible": True} o_treatmentStart_SalineSection = {"container": o_treatmentHome, "id": "_salineTouchArea", "type": "TreatmentSaline", "unnamed": 1, "visible": True} o_treatmentHome_mL_Text = {"container": o_treatmentHome, "text": "mL", "type": "Text", "unnamed": 1, "visible": True} -o_treatmentHome_cumalative_value = {"container": o_treatmentHome, "occurrence": 39, "type": "Text", "unnamed": 1, "visible": True} -o_treatmentHome_cumalative_unit = {"container": o_treatmentHome, "occurrence": 38, "type": "Text", "unnamed": 1, "visible": True} -o_treatmentHome_delivered_value = {"container": o_treatmentHome, "occurrence": 36, "type": "Text", "unnamed": 1, "visible": True} -o_treatmentHome_delivered_unit = {"container": o_treatmentHome, "occurrence": 35, "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_cumalative_value = {"container": o_treatmentHome, "id": "_cumulativeValue", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_cumalative_unit = {"container": o_treatmentHome, "id": "_cumulativeUnit", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_delivered_value = {"container": o_treatmentHome, "id": "_fluidValue", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_delivered_unit = {"container": o_treatmentHome, "id": "_fluidUnit", "type": "Text", "unnamed": 1, "visible": True} o_treatmentHome_ultrafiltrationTouchArea_TreatmentUltrafiltration = {"container": o_treatmentHome, "id": "_ultrafiltrationTouchArea", "type": "TreatmentUltrafiltration", "unnamed": 1, "visible": True} o_treatmentHome_startFluidButton_TouchRect = {"container": o_treatmentHome, "id": "_startFluidButton", "type": "TouchRect", "unnamed": 1, "visible": True} o_treatment_saline_notification_msg = {"container": o_treatmentHome, "id": "_text", "type": "Text", "unnamed": 1, "visible": True} o_rejection_msg = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "type": "Text", "unnamed": 1, "visible": True} - - - - - +o_treatmentHome_image_Image = {"container": o_treatmentHome, "id": "_image", "source": "qrc:/images/iPauseGray", "type": "Image", "unnamed": 1, "visible": True} +o_treatmentHome_Maximum_cumulative_saline_bolus_volume_delivered_Text = {"container": o_treatmentHome, "text": "Maximum cumulative saline bolus volume delivered", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_Treatment_Paused_Text = {"container": o_treatmentHome, "text": "Treatment Paused", "type": "Text", "unnamed": 1, "visible": True} +o_cumulative_fluid_text = {"container": o_treatmentStack_treatmentHome_TreatmentHome, "text": "Cumulative Delivered", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_START_BOLUS_Text = {"container": o_treatmentHome, "text": "START BOLUS", "type": "Text", "unnamed": 1, "visible": True} +o_treatmentHome_fluidProgressBar_ProgressBar = {"container": o_treatmentHome, "id": "_fluidProgressBar", "type": "ProgressBar", "unnamed": 1, "visible": True} Index: tst_treatment_saline_data/test.py =================================================================== diff -u -r4213d76652a6ccc9a8dec97a9f3b929b6e401226 -r671a0301c5ba3bfcfef9692dc981245cd4932a14 --- tst_treatment_saline_data/test.py (.../test.py) (revision 4213d76652a6ccc9a8dec97a9f3b929b6e401226) +++ tst_treatment_saline_data/test.py (.../test.py) (revision 671a0301c5ba3bfcfef9692dc981245cd4932a14) @@ -23,7 +23,7 @@ from configuration import config, utility #testing options for main treatment saline -SALINE_BOLUS_TARGET = [0, 1, 25, 30, 50, 80, 70, 150, 180, 220, 250, 280, 300] +SALINE_BOLUS_TARGET = [0, 300] #Boundary Value Analysis hd_simulator = HDSimulator() @@ -52,14 +52,15 @@ test.compare(waitForObjectExists(names.o_treatmentHome_cumalative_value).text , expected_cumulative_value, "cumulative value verified") test.compare(waitForObjectExists(names.o_treatmentHome_cumalative_unit).text , config.SALINE_UNIT, "cumulative unit verified" ) - + def verification_of_delivered_value(expected_delivered_value): """ Method to verify delivered value on saline section @param expected_delivered_valuee: (int) expected delivered value on saline section """ test.compare(waitForObjectExists(names.o_treatmentHome_delivered_value).text , expected_delivered_value, "delivered value verified") test.compare(waitForObjectExists(names.o_treatmentHome_delivered_unit).text , config.SALINE_UNIT, "delivered unit verified" ) + test.compare((waitForObjectExists(names.o_treatmentHome_fluidProgressBar_ProgressBar).enabled), True, "Fluid Progress Bar is enable") def goto_screen_contains_treatment_saline_bolus_data(): @@ -71,6 +72,7 @@ test.compare(str(waitForObjectExists(names.o_treatmentStart_SalineSection).buttonText), "START BOLUS", "Saline button text is visible") test.compare(str(waitForObjectExists(names.o_treatmentStart_SalineSection).title ), "SALINE BOLUS", "Saline button title is visible") test.compare( waitForObjectExists(names.o_treatmentStart_SalineSection).visible , True, "Saline button is visible") + utils.waitForGUI(0.5) @@ -136,8 +138,9 @@ #FIXME: execution time is more, so used specified saline target value for verification. for target_value in SALINE_BOLUS_TARGET: for saline_values in range(config.SALINE_BOLUS_CUMULATIVE+1): - cumulative_value = saline_values - delivered_value = config.SALINE_BOLUS_CUMULATIVE - saline_values + delivered_value = saline_values + cumulative_value = config.SALINE_BOLUS_CUMULATIVE + saline_values + hd_simulator.cmd_set_treatment_saline_bolus_data(target = target_value, cumulative = cumulative_value, delivered = delivered_value) @@ -169,15 +172,15 @@ # Initial Idle -> Idle/START/UF_True goto_screen_contains_treatment_saline_bolus_data() - test_ultrafiltration_touchable(True ) + test_ultrafiltration_touchable(True) # Initial Idle => Running => Rejected -> Idle/START/UF_True test_state(False, "START" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IDLE ) - test_ultrafiltration_touchable(True ) + test_ultrafiltration_touchable(True) # retry Idle => Running => Rejected -> Idle/START/UF_True test_state(False, "START" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IDLE ) - test_ultrafiltration_touchable(True ) + test_ultrafiltration_touchable(True) # Still Idle => Running => Accepted -> Running/STOP/UF_False test_state(True , "STOP" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IN_PROGRESS ) @@ -193,20 +196,23 @@ # Still Running => Idle => Accepted -> Idle/START/UF_True test_state(True , "START" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IDLE ) - test_ultrafiltration_touchable(True ) + test_ultrafiltration_touchable(True) # Now Idle => Running => Rejected -> Idle/START/UF_True test_state(False, "START" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IDLE ) - test_ultrafiltration_touchable(True ) + test_ultrafiltration_touchable(True) # Retry Idle => Running => Rejected -> Idle/START/UF_True test_state(False, "START" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IDLE ) - test_ultrafiltration_touchable(True ) + test_ultrafiltration_touchable(True) # Still Idle => Running => Accepted -> Running/STOP/UF_False test_state(True , "STOP" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IN_PROGRESS ) test_ultrafiltration_touchable(False) + # Still Idle => Running => Accepted -> Running/STOP/UF_False + test_state(True , "STOP" ,saline_target_value, txStates.SALINE_BOLUS_STATE_IN_PROGRESS ) + test_ultrafiltration_touchable(False) test.endSection() @@ -227,7 +233,41 @@ #verification of saline stages test_saline_stage() - + + test.startSection("verification of saline parameter states on main treatment screen") + hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 0, heparin_state= 0, + rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0 ) + + test.compare((waitForObjectExists(names.o_treatmentHome_startFluidButton_TouchRect).enabled), True, "START BOLUS button is enable") + test.compare((waitForObjectExists(names.o_treatmentHome_START_BOLUS_Text).enabled), True, "Start Bolus text is enable") + + hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 1, heparin_state= 0, + rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0 ) + + test.compare((waitForObjectExists(names.o_treatmentHome_startFluidButton_TouchRect).enabled), False, "START BOLUS button is not enable") + test.compare((waitForObjectExists(names.o_treatmentHome_START_BOLUS_Text).enabled), False, "Start Bolus text is not enable") + test.compare((waitForObjectExists(names.o_treatmentHome_START_BOLUS_Text).enabled), False, "Start Bolus text is not enable") + test.compare((waitForObjectExists(names.o_treatmentHome_image_Image).visible), True, "Pause Image is Visible") + test.compare(str(waitForObjectExists(names.o_treatmentHome_Treatment_Paused_Text).text), "Treatment Paused", "Treatment Paused text is visible") + + hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 2, heparin_state= 0, + rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0 ) + + test.compare((waitForObjectExists(names.o_treatmentHome_image_Image).visible), True, "Pause Image is Visible") + test.compare(str(waitForObjectExists(names.o_treatmentHome_Treatment_Paused_Text).text), "Treatment Paused", "Treatment Paused text is visible") + + hd_simulator.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state= 3, heparin_state= 0, + rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, + treatment_end_state=0, treatment_stop_state= 0, dialysis_state=0 ) + + test.compare((waitForObjectExists(names.o_treatmentHome_startFluidButton_TouchRect).enabled), False, "START BOLUS button is not enable") + test.compare((waitForObjectExists(names.o_treatmentHome_START_BOLUS_Text).enabled), False, "Start Bolus text is not enable") + test.compare(str(waitForObjectExists(names.o_treatmentHome_Maximum_cumulative_saline_bolus_volume_delivered_Text).text), "Maximum cumulative saline bolus volume delivered", "Treatment Paused text is visible") + test.endSection() + utils.tstDone() \ No newline at end of file