Closed aosama closed 6 years ago
How is this related to this plugin? Just use the maven-failsafe-plugin.
An example would be spark unit testing ... the execution would look something like this (a) create a spark context (runs in the proposed "testRunStarted" before any suite executes) (b) run all the suites (c) stop the spark context (runs in the proposed "testRunFinished" after all suites finished executing)
an example for database dependent testing would be (a) setup DB instance (runs in the proposed "testRunStarted" before any suite executes) (b) execute all test suites (c) stop the spark context (runs in the proposed "testRunFinished" after all suites finished executing)
currently in this plugin we cant do that, the only option is to use sequential suites or combine them into a higher level suite, which is not very practical.
But this plugin has nothing to do with running tests! It's a "just" glue between maven and the scala compiler. Running tests is what surefire and failsafe do.
OMG i posted this issue in the wrong repo :) i meant to post it here https://github.com/scalatest/scalatest-maven-plugin/issues
^^
Thanks @slandelle for the quick replies.
@davidB The best I can do here to help is sometimes with triaging issues :)
The ask here would be to implement a test listener similar to Junit mentioned in the article below.
in some cases we need to do cleanup after all the suites have finished execution.
public class TestListener extends RunListener { @Override public void testRunStarted(Description description) throws Exception { // Called before any tests have been run. } @Override public void testRunFinished(Result result) throws Exception { // Called when all tests have finished } }
https://stackoverflow.com/questions/9903341/cleanup-after-all-junit-tests