Sample Test Cases
From ReliSourceWiki
(Difference between revisions)
Line 42: | Line 42: | ||
|} | |} | ||
+ | The XML structure of the case will look like as follows: | ||
+ | <pre> | ||
+ | <?xml version="1.0"?> | ||
+ | <testcase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="remove_cashbox"> | ||
+ | <description>this case is uesd to check remove cashbox</description> | ||
+ | <phases> | ||
+ | <phase name="phase0_wait"> | ||
+ | <description>wait for idle</description> | ||
+ | <pollRate> | ||
+ | <min_rate>200</min_rate> | ||
+ | <max_rate>200</max_rate> | ||
+ | </pollRate> | ||
+ | <opm> | ||
+ | <request>EBDS_ORIENTATION_CONTROL_4_way</request> | ||
+ | <request>EBDS_PUP_A</request> | ||
+ | <request>EBDS_ESCROW_MODE_ON</request> | ||
+ | </opm> | ||
+ | <triggers> | ||
+ | <trigger xsi:type="MessageTrigger" name="trigger0" type="Message"> | ||
+ | <next>phase1_idle</next> | ||
+ | <conditions> | ||
+ | <IMF> | ||
+ | <response>EBDS_IDLE</response> | ||
+ | </IMF> | ||
+ | <IMF> | ||
+ | <response>EBDS_LRC_ON</response> | ||
+ | </IMF> | ||
+ | </conditions> | ||
+ | </trigger> | ||
+ | <trigger xsi:type="TimeoutTrigger" name="triggertimeout" type="Timeout"> | ||
+ | <next>FAIL</next> | ||
+ | <duration>10000</duration> | ||
+ | </trigger> | ||
+ | </triggers> | ||
+ | </phase> | ||
+ | <phase name="phase1_idle"> | ||
+ | <description>phase idle</description> | ||
+ | <pollRate> | ||
+ | <min_rate>200</min_rate> | ||
+ | <max_rate>200</max_rate> | ||
+ | </pollRate> | ||
+ | <opm> | ||
+ | <request>EBDS_ORIENTATION_CONTROL_4_way</request> | ||
+ | <request>EBDS_PUP_A</request> | ||
+ | <request>EBDS_ESCROW_MODE_ON</request> | ||
+ | </opm> | ||
+ | <prompt> | ||
+ | <template>0</template> | ||
+ | <display_message>Remove cashbox</display_message> | ||
+ | </prompt> | ||
+ | <triggers> | ||
+ | <trigger xsi:type="MessageTrigger" name="trigger1" type="Message"> | ||
+ | <next>phase2_verify</next> | ||
+ | <conditions> | ||
+ | <IMF> | ||
+ | <response>EBDS_LRC_OFF</response> | ||
+ | </IMF> | ||
+ | </conditions> | ||
+ | </trigger> | ||
+ | <trigger xsi:type="TimeoutTrigger" name="triggertimeout" type="Timeout"> | ||
+ | <next>FAIL</next> | ||
+ | <duration>15000</duration> | ||
+ | </trigger> | ||
+ | </triggers> | ||
+ | </phase> | ||
+ | <phase name="phase2_verify"> | ||
+ | <description>verification of cashbox removal</description> | ||
+ | <pollRate> | ||
+ | <min_rate>200</min_rate> | ||
+ | <max_rate>200</max_rate> | ||
+ | </pollRate> | ||
+ | <opm> | ||
+ | <request>EBDS_ORIENTATION_CONTROL_4_way</request> | ||
+ | <request>EBDS_PUP_A</request> | ||
+ | <request>EBDS_ESCROW_MODE_ON</request> | ||
+ | </opm> | ||
+ | <prompt> | ||
+ | <template>1</template> | ||
+ | <display_message>IS THE YELLOW BUTTON ON?</display_message> | ||
+ | </prompt> | ||
+ | <triggers> | ||
+ | <trigger xsi:type="ManualTrigger" name="trigger2_yes" type="Manual"> | ||
+ | <next>PASS</next> | ||
+ | </trigger> | ||
+ | <trigger xsi:type="ManualTrigger" name="trigger2_no" type="Manual"> | ||
+ | <next>FAIL</next> | ||
+ | </trigger> | ||
+ | <trigger xsi:type="TimeoutTrigger" name="triggertimeout" type="Timeout"> | ||
+ | <next>FAIL</next> | ||
+ | <duration>15000</duration> | ||
+ | </trigger> | ||
+ | </triggers> | ||
+ | </phase> | ||
+ | <phase name="PASS" /> | ||
+ | <phase name="FAIL" /> | ||
+ | </phases> | ||
+ | </testcase> | ||
+ | </pre> | ||
{| {{table}} style="width:600px" | {| {{table}} style="width:600px" |
Revision as of 04:32, 5 August 2011
Test Case Name | Stack standard note | ||
Phase 0 | Wait for Idle | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Idle and LRC bit on. | Next phase | Idle |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 1 | Idle | ||
User prompt | "Feed a $5 note" | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Escrow bit AND note index 3. Remove prompt. | Next phase | Escrow |
Trigger Timeout | Wait 20s | Next phase | FAIL |
Phase 2 | Escrow | ||
OPM | Standard poll AND stack checkbox. | ||
Trigger IMF | Escrow bit AND note index 3 | Next Phase | Note Acceptance |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 3 | Note Acceptance | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Stacked AND Idle bits AND note index 3 | Next phase | PASS |
Trigger Timeout | Wait 5s | Next phase | FAIL |
The XML structure of the case will look like as follows:
<?xml version="1.0"?> <testcase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="remove_cashbox"> <description>this case is uesd to check remove cashbox</description> <phases> <phase name="phase0_wait"> <description>wait for idle</description> <pollRate> <min_rate>200</min_rate> <max_rate>200</max_rate> </pollRate> <opm> <request>EBDS_ORIENTATION_CONTROL_4_way</request> <request>EBDS_PUP_A</request> <request>EBDS_ESCROW_MODE_ON</request> </opm> <triggers> <trigger xsi:type="MessageTrigger" name="trigger0" type="Message"> <next>phase1_idle</next> <conditions> <IMF> <response>EBDS_IDLE</response> </IMF> <IMF> <response>EBDS_LRC_ON</response> </IMF> </conditions> </trigger> <trigger xsi:type="TimeoutTrigger" name="triggertimeout" type="Timeout"> <next>FAIL</next> <duration>10000</duration> </trigger> </triggers> </phase> <phase name="phase1_idle"> <description>phase idle</description> <pollRate> <min_rate>200</min_rate> <max_rate>200</max_rate> </pollRate> <opm> <request>EBDS_ORIENTATION_CONTROL_4_way</request> <request>EBDS_PUP_A</request> <request>EBDS_ESCROW_MODE_ON</request> </opm> <prompt> <template>0</template> <display_message>Remove cashbox</display_message> </prompt> <triggers> <trigger xsi:type="MessageTrigger" name="trigger1" type="Message"> <next>phase2_verify</next> <conditions> <IMF> <response>EBDS_LRC_OFF</response> </IMF> </conditions> </trigger> <trigger xsi:type="TimeoutTrigger" name="triggertimeout" type="Timeout"> <next>FAIL</next> <duration>15000</duration> </trigger> </triggers> </phase> <phase name="phase2_verify"> <description>verification of cashbox removal</description> <pollRate> <min_rate>200</min_rate> <max_rate>200</max_rate> </pollRate> <opm> <request>EBDS_ORIENTATION_CONTROL_4_way</request> <request>EBDS_PUP_A</request> <request>EBDS_ESCROW_MODE_ON</request> </opm> <prompt> <template>1</template> <display_message>IS THE YELLOW BUTTON ON?</display_message> </prompt> <triggers> <trigger xsi:type="ManualTrigger" name="trigger2_yes" type="Manual"> <next>PASS</next> </trigger> <trigger xsi:type="ManualTrigger" name="trigger2_no" type="Manual"> <next>FAIL</next> </trigger> <trigger xsi:type="TimeoutTrigger" name="triggertimeout" type="Timeout"> <next>FAIL</next> <duration>15000</duration> </trigger> </triggers> </phase> <phase name="PASS" /> <phase name="FAIL" /> </phases> </testcase>
Test Case Name | Remove cashbox | ' | ' |
Phase 0 | Wait for Idle | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Idle and LRC bit on. | Next phase | Idle |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 1 | Idle | ||
User prompt | "Remove the cashbox" | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | LRC bit off. Remove prompt. | Next phase | Verify Removed |
Trigger Timeout | Wait 20s | Next phase | FAIL |
Phase 2 | Verify Removed | ||
User prompt | "Is the yellow LED on?" Yes or No buttons. | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger Manual | Yes button pressed. Remove prompt. | Next phase | PASS |
Trigger Manual | No button pressed. Remove prompt. | Next phase | FAIL |
Test Case Name | Stack extended note | ' | ' |
Phase 0 | Wait for Idle | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Idle and LRC bit on. | Next phase | Idle |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 1 | Idle | ||
User prompt | "Feed a $5 note" | ||
OPM | Standard poll AND extended note checkbox AND Escrow checkbox | ||
Trigger IMF | Escrow bit AND extended type 7 subtype 2 message with ASCII data "USD005". Remove prompt. | Next phase | Escrow |
Trigger Timeout | Wait 20s. Remove prompt. | Next phase | FAIL |
Phase 2 | Escrow | ||
OPM | Standard poll AND extended note checkbox AND stack checkbox AND Escrow checkbox | ||
Trigger IMF | Escrow bit AND extended type 7 subtype 2 message with ASCII data "USD005". | Next Phase | Note Acceptance |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 3 | Note Acceptance | ||
OPM | Standard poll AND extended note checkbox AND Escrow checkbox | ||
Trigger IMF | Stacked AND Idle bits AND extended type 7 subtype 2 message with ASCII data "USD005". | Next phase | PASS |
Trigger Timeout | Wait 5s | Next phase | FAIL |
Test Case Name | Return standard note | ' | ' |
Phase 0 | Wait for Idle | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Idle and LRC bit on. | Next phase | Idle |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 1 | Idle | ||
User prompt | "Feed a $5 note" | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Escrow bit AND note index 3. Remove prompt. | Next phase | Escrow |
Trigger Timeout | Wait 20s | Next phase | FAIL |
Phase 2 | Escrow | ||
OPM | Standard poll AND return checkbox AND Escrow checkbox | ||
Trigger IMF | Escrow bit AND note index 3 | Next Phase | Note Returning |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 3 | Note Returning | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Returned AND Idle bits. | Next phase | Verify Return |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 4 | Verify Return | ||
User prompt | "Was a $5 note returned" Yes or No buttons. | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger Manual | Yes button pressed. Remove prompt. | Next phase | PASS |
Trigger Manual | No button pressed. Remove prompt. | Next phase | FAIL |
Test Case Name | Request Application Software Version | ' | ' |
Phase 0 | Wait for Idle | ||
OPM | Standard poll AND Escrow checkbox | ||
Trigger IMF | Idle and LRC bit on. | Next phase | Idle |
Trigger Timeout | Wait 10s | Next phase | FAIL |
Phase 1 | Idle | ||
OPM | Extended type 6 message - Request application software version | ||
Trigger IMF | Extended type 6 AND data0 byte 0x0 AND data1 byte 0x0 AND 9 ASCII data bytes that match user configured application software part number. | Next phase | PASS |
Trigger Timeout | Wait 20s | Next phase | FAIL |