-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Can someone help me think through this approach? Some of my tests require a particular state to be initialized before the test can be performed. Conveniently the state can be created by other tests. I can create a TestSuite to re-use the tests to create the state required. I end up with a structure like this:
- mytests
- loginTest.html
- logoutTest.html
- createTest.html
- editTest.html
- deleteTest.html
- createFailTest.html
- AcceptTestSuite.html
- FailureTestSuite.html
Assuming this is a reasonable way to structure the tests and test suites, selenium4j doesn't work for me because of the assumption that there will be one suite per package/directory. Is my assumption reasonable? I'm hesitant to use the setup/teardown construct because all of the suites might use some of the same setup/teardown but not all. I don't want to divide the suites into separate directories because I don't want many copies of the same test to maintain.
I'm prepared to adjust the selenium4j code to match suites from files where createFrom is a suffix and use the prefix to create the Tests and Suite classnames. If there is no prefix the AllTests/AllSuite convention will be maintained. So for example my test-html/mytests directory would become test-java. The examples would remain unchanged.
- mytests
- AcceptTestSuite.java
- AcceptTests.java
- FailureTestSuite.java
- FailureTests.java
- FF
- loginTest.java
- logoutTest.java
- createTest.java
- editTest.java
- deleteTest.java
- createFailTest.java
Does this seem reasonable? Would this be a welcome addition back into the codebase? Is there anything I should be aware of before embarking on this task?