|
Re: RCPTT terminates execution if any assertion fails in a test case [message #1691694 is a reply to message #1691550] |
Thu, 09 April 2015 06:04 |
|
Hello,
RCPTT Test Case is considered as failed if there is a failed assertion. That's why it doesn't continue execution after the first failing.
As a workaround I may suggest you to use the following ECL construction:
<ECL commands>
global [val a1 [ <the first expression with the key -raw in get-property>]]
<ECL commands>
global [val a2 [ <the second expression with the key -raw in get-property> ]]
<ECL commands>
and [bool $a1] [bool $a2] | assert-true -message "There is a failed assertion"
- Record ECL script with all verifications
- Remove verify-true and add key -raw after get-property command (why?)
- Wrap asserted expression to global [val a2 [ ... ]]
- Add assertion to the end of the test case:
and [bool $a1] [bool $a2] | assert-true -message "There is a failed assertion"
You can find more information about ECL commands here.
Please try and let me know if you have any questions.
I used the following snippet to test this approach:
log 1
global [val a1 [ get-editor test | get-section Contexts | get-label Contexts | get-property caption -raw | eq Contexts ]]
log 2
global [val a2 [ get-editor test | get-section Contexts | get-label Contexts | get-property caption -raw | eq Contexts ]]
log 3
and [bool $a1] [bool $a2] | assert-true -message "There is a failed assertion"
Yours sincerely,
Olga.
|
|
|
Re: RCPTT terminates execution if any assertion fails in a test case [message #1691713 is a reply to message #1691694] |
Thu, 09 April 2015 08:54 |
Sushanta Dasgupta Messages: 6 Registered: April 2015 |
Junior Member |
|
|
Thanks Olga Yurchuk for your quick response. It really worked
I have one more doubt -
If I use the following ECL command --
and [bool $a1] [bool $a2] | assert-true -message "There is a failed assertion"
how would I know which of the asserted expressions has failed ?
In my test case I may have multiple asserted expressions, but if I use the assertion statement for all of them together, how would I know which all have failed and which all have passed ?
Thanks & Regards,
Sushant
[Updated on: Thu, 09 April 2015 08:55] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03387 seconds