Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 945 by jp.caixa...@gmail.com: Allow changing tags in suite setup so test execution is influenced.
http://code.google.com/p/robotframework/issues/detail?id=945

Hi,
This request is opened after a question in robotframework-users group labelled "Using Remove Tags and Force Tags. Is it possible?":
http://groups.google.com/group/robotframework-users/browse_thread/thread/ca3a0a2915db6ab7

The need that triggered this request was the necessity to prevent some tests previously included by a given tag to run under certain circumstances.

The first approach we considered was using the keyword Run Keyword Unless in the test cases impacted so that the test case is not actually ran but this approach had some inconvenient:
- test is reported as executed while it's not
- need to add Run Keyword Unless in all test cases.

The 2nd approach considered was tagging the tests with some other tags and then build the list of tags to be included just before running robot.
This approach was dropped as it:
- would require the use of many, many tags
- would require the maintenance of some kind of list of tags which is too much time consuming.

The 3rd approach was using the keyword Remove Tags in suite setup (under certain circumstances) in order to prevent tests included by that tag from running. This was seen as the best approach but when we tried it, it didn't behave as we expected. After inquiring in robotframework-users forum we learned that the expected behavior was not supported.

This request is then filled in order to ask that the "Remove Tags" keyword (or some new keyword) is implemented in such way that when a tag is removed in suite setup, the tests that were previously selected by that tag are not run. In short, Remove Tags should influence test execution and not just test reports.


Cheers,
Joaquim

Reply via email to