-
Type: Improvement
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 0.14 swallows
-
Fix Version/s: 0.14 swallows
Right now we have all tests running all the time while starting mvn test. Since DAO tests are included in this run, they dramatically slow the build cycle down. We need to have a command line argument whether to run DAO tests or not and while running mvn test the DAO tests shouldn't be triggered. Instead they should run only when we tell it to run.
To achieve this we can leverage TestNG Suits and/or Groups facilities. There should be two options: run all tests and run only unit tests (by default). We need to investigate what way is less verbose and choose it. The difference while running tests should be in a command line argument, something like this:
- mvn install for unit tests vs. mvn install -Dgroups=unit,dao for all tests
- mvn install for unit tests vs. mvn install -Dsuitename=all for all tests
Acceptance criteria of this task:
- Results of research are provided: several ways of configuring TestNG/Maven in order to separate tests. Use comments to this JIRA to share your research results.
- Everything is configured and while running mvn install only unit tests are executed and while running mvn install -someparam all the tests can be fired.
Links that might be useful:
- Pay attention to all the command line arguments available in TestNG out-of-box, e.g. -groups, -suitename, -excludegroups, etc. More information is available in TestNG Documentation. This has to be read.
- It might be possible that Maven facilities are required to create profiles that are activated via: mvn install -p profileName. More on Maven Profiles can be found in official documentation.
- Stackoverflow on TestNG Suites
- Stackoverflow on TestNG Groups
To sum up:
We need to find a way to separate the integration and unit tests. The way should be as simple as possible so that we don't need to mark all tests as 'unit' for instance.