2016-10-04 12:22 GMT+03:00 32BIGFREE <
32bi...@gmail.com>:
>
> Is there any way how to get information about "--exitonfailure" in the test
> suite run-time?
Not directly. You could get this information via Robot's internal
APIs, but that's a risky approach because these APIs can change.
Alternatively you could look at Python's `sys.argv` directly, but
that's also a bit risky/complicated because Robot supports long
options in case-insensitive manner (e.g. `--ExitOnFailure`), allows
shortening options as long as they are unique (e.g. `--ExitOnFail`)
and RF 3.0.1 will add `-X` shortcut for this particular option.
Exposing command line options somehow would be a nice general
enhancement. Someone should just design a good APi and provide a pull
request. I doubt I have time for that in the foreseeable future, but I
can help if someone else is interested.
Currently the easiest way to signal something like this to tests is
setting a variable that tells is the option enabled or not. You could,
for example, run tests like `--exitonfailure --variable
EXIT_ON_FAILURE:True`.
Cheers,
.peke
--
Agile Tester/Developer/Consultant ::
http://eliga.fi
Lead Developer of Robot Framework ::
http://robotframework.org