Changing ctrl-c to skip teardowns?

84 views
Skip to first unread message

Jussi Malinen

unread,
Jul 16, 2010, 4:32:18 AM7/16/10
to robotframework-users
Hello!

Robot 2.5 included a new feature that allows graceful shutdown of test run by pressing ctrl-c once [1]. This was implemented so that the rest of the tests are skipped, but teardowns for already started tests and suites are run. Pressing ctrl-c second time causes the system to exit immediately and to not generate any reports. Now we have had user feedback that skipping the teardowns would be more appropriate as sometimes the teardown can take considerable amount of time.

We would like to ask feedback from you our users which behavior is more appropriate for your environment: skipping the teardowns when ctrl-c is pressed, or running the teardowns always?

At the moment the development team is leaning towards changing the implementation to skip the teardowns. We could even implement this to Robot 2.5.1 release next week.

[1] http://robotframework.googlecode.com/svn/tags/robotframework-2.5/doc/userguide/RobotFrameworkUserGuide.html#stopping-test-execution-gracefully

Best Regards,
Jussi Malinen / Reaktor

Taylor, Martin

unread,
Jul 16, 2010, 7:40:34 AM7/16/10
to jussi.ao...@gmail.com, robotframework-users
To us at TI the skipping or running of teardowns is not critically important, although we would lean towards running the teardown for the aborted test and its containing suites. What is EXTREMELY important in this new feature is that the output.xml file is terminated cleanly (i.e. will not cause failures if processed by rebot) and that all the RF reporting that was configured on the pybot command line should be completed normally.  It would also be nice if the reports could show some special status or failure message to indicate which test was aborted by the ctrl-c action.
 
Thanks,
Martin


From: robotframe...@googlegroups.com [mailto:robotframe...@googlegroups.com] On Behalf Of Jussi Malinen
Sent: Friday, July 16, 2010 3:32 AM
To: robotframework-users
Subject: Changing ctrl-c to skip teardowns?

--
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.

GerhardH

unread,
Jul 16, 2010, 8:57:00 AM7/16/10
to robotframework-users
Hello,

I would like to have both options.

In some situations it would be useful to run the teardown and to
terminate the output files correctly (if so, please do not terminate
only the output.xml).

In other situations, I would like to abort all Robots activity at
once, without executing the teardown, and without spending time on
completing output files. I don´t know how much time the file
completion takes; if it can always be done fast, it should be done
always.

By the way: I sometimes have the situation that the Suite Setup fails
and then the Robot run is finished, with complete output files, but
without executing the teardown. So a process, that is started at the
beginning of the Suite Setup before the failure, remains running. Can
I change my test suite so that the teardown also runs after a failure
in the suite setup (if not aborted by Ctrl-C)?

Best regards
Gerhard

> From: robotframe...@googlegroups.com [mailto:robotframe...@googlegroups.com] On Behalf Of Jussi Malinen
> Sent: Friday, July 16, 2010 3:32 AM
> To: robotframework-users
> Subject: Changing ctrl-c to skip teardowns?
>
> Hello!
>
> Robot 2.5 included a new feature that allows graceful shutdown of test run by pressing ctrl-c once [1]. This was implemented so that the rest of the tests are skipped, but teardowns for already started tests and suites are run. Pressing ctrl-c second time causes the system to exit immediately and to not generate any reports. Now we have had user feedback that skipping the teardowns would be more appropriate as sometimes the teardown can take considerable amount of time.
>
> We would like to ask feedback from you our users which behavior is more appropriate for your environment: skipping the teardowns when ctrl-c is pressed, or running the teardowns always?
>
> At the moment the development team is leaning towards changing the implementation to skip the teardowns. We could even implement this to Robot 2.5.1 release next week.
>
> [1]http://robotframework.googlecode.com/svn/tags/robotframework-2.5/doc/...

Pekka Klärck

unread,
Jul 16, 2010, 10:23:16 AM7/16/10
to gerhard....@nsn.com, robotframework-users
2010/7/16 GerhardH <gerhard....@nsn.com>:

>
> I would like to have both options.
>
> In some situations it would be useful to run the teardown and to
> terminate the output files correctly (if so, please do not terminate
> only the output.xml).

This is exactly what happens now when you press ctrl-c once.

> In other situations, I would like to abort all Robots activity at
> once, without executing the teardown, and without spending time on
> completing output files. I don´t know how much time the file
> completion takes; if it can always be done fast, it should be done
> always.

Also this is possible already now. Pressing ctrl-c second time exits
the execution unconditionally without generating logs and reports.

> By the way: I sometimes have the situation that the Suite Setup fails
> and then the Robot run is finished, with complete output files, but
> without executing the teardown. So a process, that is started at the
> beginning of the Suite Setup before the failure, remains running. Can
> I change my test suite so that the teardown also runs after a failure
> in the suite setup (if not aborted by Ctrl-C)?

Suite teardowns should be executed if the matching suite teardown was
run or even attempted to run. If that's not the case in some
situation, please submit a bug about it.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Pekka Klärck

unread,
Jul 16, 2010, 10:27:01 AM7/16/10
to cmta...@ti.com, jussi.ao...@gmail.com, robotframework-users
2010/7/16 Taylor, Martin <cmta...@ti.com>:

> To us at TI the skipping or running of teardowns is not critically
> important, although we would lean towards running the teardown for the
> aborted test and its containing suites.

Currently teardows both on test and suite level are executed. It's
highly unlikely that this will change and even less likely that it
will change in RF 2.5.1.

> What is EXTREMELY important in this
> new feature is that the output.xml file is terminated cleanly (i.e. will not
> cause failures if processed by rebot) and that all the RF reporting that was
> configured on the pybot command line should be completed normally.

The output file should be fine after stopping the executing with a
single ctrl-c, signal, or fatal exception.

> It would also be nice if the reports could show some special status or failure
> message to indicate which test was aborted by the ctrl-c action.

Tests that fail because execution was aborted have a special message.

Reply all
Reply to author
Forward
0 new messages