We are using Selenium and Fitnesse for UI testing, where we open Firefox and perform all the UI related actions - click, fill fields, press button etc.
As part of our current test framework, FitnesseRoot has the SetUp/TearDown defined, to open/destroy the browser instance. All the Suites and Tests (around 300 in number) use the SetUp/TearDown as part of the UI testing.
I am trying to replace one of our simple tests with new fixtures for API testing, because API testing is way faster than the UI testing. The test itself is working fine, but the problem here is that even though my REST fixtures do not require a browser instance, SetUp opens it and TearDown tries to close it, but returns an exception (since the test under execution points to API driver class, while the methods in the TearDown belong to the UI Driver class).
I cannot remove the SetUp/TearDown, since it has an impact on 300 test cases, as mentioned above. Is there any way I can prevent one specific test from using the SetUp/TearDown? Or point the TearDown back to the UI Driver Class, so that the test does not throw an exception?
SetUp
:
|import |
|com.myapplication.fitnesse.ui|
|com.myapplication.util.restclient.fixtures|
!define slim.flags {-s 200}
!|script |
|start| my UI driver class|${SERVER}|${PORT}|FIREFOX|${PAGE_PATH}.${PAGE_NAME}|${PROXYSERVER}|
|debug mode |false |
Actual test:
!define TEST_SYSTEM {slim}
| script | my API driver class | server ip:port | username | password|
| login |
| do something...|
TearDown
:
|script |
|logout |
|destroyDriver |