Index: shared/scripts/configuration/config.py =================================================================== diff -u -r671a0301c5ba3bfcfef9692dc981245cd4932a14 -rf785962ae177f9853fd4815ddfe6f29b457b58c5 --- shared/scripts/configuration/config.py (.../config.py) (revision 671a0301c5ba3bfcfef9692dc981245cd4932a14) +++ shared/scripts/configuration/config.py (.../config.py) (revision f785962ae177f9853fd4815ddfe6f29b457b58c5) @@ -87,5 +87,26 @@ NUM_OF_REQUEST_REJECT_REASONS = 43 -SALINE_BOLUS_CUMULATIVE = 10 +#dictionary contains saline cumulative and saline delivered value +#key : saline cumulative value. +#value: saline delivered value +SALINE_BOLUS_VALUES = { + 0 : 0, + 1.0 : 1.0, + 125.56 : 100.56, + 165.87 : 145.87, + 220.65 : 220.65, + 325.25 : 300.25, + 400.86 : 380.86, + 500.00 : 500.25, + 634.76 : 634.76, + 823.65 : 800.65, + 999.99 : 999.99, + 1000 : 1000 +} + + + + + Index: tst_treatment_saline_data/test.py =================================================================== diff -u -r671a0301c5ba3bfcfef9692dc981245cd4932a14 -rf785962ae177f9853fd4815ddfe6f29b457b58c5 --- tst_treatment_saline_data/test.py (.../test.py) (revision 671a0301c5ba3bfcfef9692dc981245cd4932a14) +++ tst_treatment_saline_data/test.py (.../test.py) (revision f785962ae177f9853fd4815ddfe6f29b457b58c5) @@ -23,7 +23,7 @@ from configuration import config, utility #testing options for main treatment saline -SALINE_BOLUS_TARGET = [0, 300] #Boundary Value Analysis +SALINE_BOLUS_TARGET = [0, 1, 150, 155, 299, 300] #Boundary Value Analysis hd_simulator = HDSimulator() @@ -137,10 +137,8 @@ test.startSection("verification of saline parameter values on main treatment screen") #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): - delivered_value = saline_values - cumulative_value = config.SALINE_BOLUS_CUMULATIVE + saline_values - + for delivered_value, cumulative_value in config.SALINE_BOLUS_VALUES.items(): + hd_simulator.cmd_set_treatment_saline_bolus_data(target = target_value, cumulative = cumulative_value, delivered = delivered_value) @@ -151,8 +149,8 @@ verification_of_target_value(expected_target_value = format(target_value, '.1f')) verification_of_delivered_value(expected_delivered_value = format(delivered_value, '.0f')) verification_of_cumulative_value(expected_cumulative_value = format(cumulative_value, '.0f')) - #FIXME: verified stability issue on application, if delay is less. (section getting error in random values) - + + test.endSection() @@ -215,25 +213,8 @@ test_ultrafiltration_touchable(False) test.endSection() - - -def main(): - utils.tstStart(__file__) - startApplication(config.AUT_NAME) - - utils.waitForGUI(1) - - #navigate to dialysis state - 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) +def test_saline_types(): - #verification of target, cumulative and delivered value - test_saline_values() - - #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, @@ -267,7 +248,29 @@ 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() + + +def main(): + utils.tstStart(__file__) + startApplication(config.AUT_NAME) + + utils.waitForGUI(1) + + #navigate to dialysis state + 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) + #verification of target, cumulative and delivered value + test_saline_values() + + #verification of saline stages + test_saline_stage() + + #verification of saline types + test_saline_types() + + utils.tstDone() \ No newline at end of file