Global timeout for test cases

2,091 views
Skip to first unread message

Gaurav Arora

unread,
Jan 3, 2012, 9:15:20 AM1/3/12
to robotframe...@googlegroups.com, Aashish Jassal

Hi,

The docs say that support for timeouts in initialization files was removed in version 2.5. Is there another way to specify timeout globally for all test cases?

 

From the docs:

Default Tags, Test Template, Test Timeout

Not supported in initialization files starting from Robot Framework 2.5.

 

Thanks,

Gaurav

Jussi Mononen

unread,
Jan 4, 2012, 2:33:09 AM1/4/12
to g.a...@iontrading.com, robotframe...@googlegroups.com, Aashish Jassal
Hi,

depending on your testing context you can set it globally at least for Selenium

http://robotframework-seleniumlibrary.googlecode.com/hg/doc/SeleniumLibrary.html?r=2.8#Set%20Selenium%20Timeout

See also Seleniums importing section.

You could try to put the Timeout in a resource file settings section
and include it in every test suite.

Br,

-jussi

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

--
"Progress doesn't come from early risers — progress is made by lazy
men looking for easier ways to do things." - Robert. A. Heinlein
[ http://www.agile.fi - http://www.agilefinland.com -
http://www.scan-agile.org ]
[ http://www.jussimononen.org - http://www.twitter.com/agilepoodle ]

Gaurav Arora

unread,
Jan 4, 2012, 2:38:23 AM1/4/12
to jussi....@iki.fi, robotframe...@googlegroups.com, Aashish Jassal
Hi Jussi,

The timeout needs to be set for the entire suite and overridden on test
cases that may require longer to run (an exception situation in itself).
I'm thinking of using a default timeout at the keyword level unless
overridden with a "Timeout" keyword.

Out of curiosity, do you know why this was removed though? It seems like a
useful feature to have.

Thanks,
Gaurav

Hi,


http://robotframework-seleniumlibrary.googlecode.com/hg/doc/SeleniumLibrar
y.html?r=2.8#Set%20Selenium%20Timeout

Br,

-jussi

--
"Progress doesn't come from early risers - progress is made by lazy

Mikko Korpela

unread,
Jan 4, 2012, 2:52:00 AM1/4/12
to g.a...@iontrading.com, jussi....@iki.fi, robotframe...@googlegroups.com, Aashish Jassal
Hi,

> Out of curiosity, do you know why this was removed though? It seems like a
> useful feature to have.

See discussion in http://code.google.com/p/robotframework/issues/detail?id=398

Main point seems to have been that it recursively applies to the whole
suite tree from that point onward - thus it might be that the timeout
would be accidentally used somewhere it shouldn't be used.

You still can set Test Timeout for a complete suite file (not __init__ file).

Kind Regards,
Mikko Korpela

2012/1/4 Gaurav Arora <g.a...@iontrading.com>:


> Hi Jussi,
>
> The timeout needs to be set for the entire suite and overridden on test
> cases that may require longer to run (an exception situation in itself).
> I'm thinking of using a default timeout at the keyword level unless
> overridden with a "Timeout" keyword.
>

>

Pekka Klärck

unread,
Jan 11, 2012, 10:29:36 AM1/11/12
to mikko....@gmail.com, g.a...@iontrading.com, jussi....@iki.fi, robotframe...@googlegroups.com, Aashish Jassal
2012/1/4 Mikko Korpela <mikko....@gmail.com>:

>> Out of curiosity, do you know why this was removed though? It seems like a
>> useful feature to have.
>
> See discussion in http://code.google.com/p/robotframework/issues/detail?id=398
>
> Main point seems to have been that it recursively applies to the whole
> suite tree from that point onward - thus it might be that the timeout
> would be accidentally used somewhere it shouldn't be used.

The main reason we didn't want to make applying timeouts to all tests
too easy was that timeouts could considerably slow down test execution
when running tests on Python [1]. This isn't relevant anymore, though,
because starting from RF 2.7 the slow down problem has been mostly
fixed [2].

Another reason was that we wanted to have less settings visible in
RIDE when editing test suite initialization files. This reason isn't
relevant anymore either, though, because it is possible to collapse
all settings in RIDE.

Because the most important reasons for removing test timeouts from
test suite init files are not relevant anymore, and because this
functionality can be very useful, we have decided to revert the
earlier decision and add the functionality back in RF 2.7 [3].

[1] http://code.google.com/p/robotframework/issues/detail?id=497
[2] http://code.google.com/p/robotframework/issues/detail?id=871
[3] http://code.google.com/p/robotframework/issues/detail?id=775

Cheers,
.peke

PS: We try to get first RF 2.7 alpha out tomorrow.
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Reply all
Reply to author
Forward
0 new messages