0

I think I'm missing something obvious, is there a way to easily receive result of test run?

I'm running scalatest with simple run(new my.TestClass)

Is there any way to get the result of the test back? Or some way to run code after test failure?

Only way I found in scaladoc is running the tests with Suite.run() which returns Status, but it also needs Args, and I haven't found any example of what Args should I use.

cvakiitho
  • 1,377
  • 13
  • 27

1 Answers1

0

Ok, so I found execute on test failure functionality in documentation:

override def withFixture(test: NoArgTest) = {

    super.withFixture(test) match {
      case failed: Failed =>
        info("failed")
        //some code when tests fail
        failed

      case other => other
    }
  }

But I guess Args example would still be beneficial :)

cvakiitho
  • 1,377
  • 13
  • 27