Test Suite TearDown Scenario

359 views
Skip to first unread message

Rajaraman

unread,
Nov 8, 2010, 6:36:11 AM11/8/10
to robotframework-users, sudip...@mindtree.com
The documentation on Robot Framework 2.5.4 User Guide contains the
following info:

If the suite teardown fails, all test cases in the suite are marked
failed, regardless of their original execution status.

I dont see why this functionality is implemented in this way. If we
have a single test suite of two test cases in a web app in IE8.
Then :

Suite Setup Open Browser and Load Application

Test Case
Test Case 1 ...........

Test Case 2 .........

Suite Tear Down Close Browser

In the above scenario if both test cases pass there is no reason to
mark them as fail because the browser does not close i.e. the suite
teardown fails.

Please let me know the logic behind the above implementation in Robot
Framework Since this info was documented i have not yet experimented
with the actual framework taking it to be true.

Thanks.

Regards,

Rajaraman.

Juha Rantanen

unread,
Nov 9, 2010, 2:33:27 AM11/9/10
to rajaraman_...@mindtree.com, robotframework-users, sudip...@mindtree.com

Hi,

The reason is that otherwise failures in suite teardowns could be unnoticed. It could be that the tests pass, but leave the system in unstable conditions so that teardown fails. This is the reason behind the current functionality.

In your situation you could execute the teardown with keyword "run keyword and ignore error". See BuiltIn library's documentation for details. However, ignoring error is just postponing the actual problem, because at some point you have just too much browsers open. In case you cannot always get the ie8 closed with SeleniumLibrary's "Close Browser" keyword, you could see if AutoIt library would be ankea to close the browser.

Br,
Juha


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.

Reply all
Reply to author
Forward
0 new messages