Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get ScalaTest to populate test runtimes in the xml report?

We use ScalaTest to run tests and display the results in Jenkins. It works great, but for some reason ScalaTest` does not populate the test runtime.

I'm adding test options like this:

    Tests.Argument("-oD", "-u", "target/test-reports") 

But the XML file does not have timings (see time is always 0):

<testcase classname="beekeeper.warehouse.jdbc.JDBCWarehouseTest" name="testListTables" time="0.0"> </testcase> <testcase classname="beekeeper.warehouse.jdbc.JDBCWarehouseTest" name="testGetDatabases" time="0.0"> </testcase> <testcase classname="beekeeper.warehouse.jdbc.JDBCWarehouseTest" name="testSchema" time="0.0"> </testcase> 

Do I need to do something else to have it report this, or is it not supported?

like image 853
Matthew Rathbone Avatar asked Apr 28 '15 20:04

Matthew Rathbone


People also ask

What is an SBT test?

Physiology : Serum bactericidal titer (SBT) test is employed to determine the effect of anti-microbial treatment in a patient. The test helps to estimate the dilution of bacteria in the serum and in determining the efficacy of treatment, especially in patients with conditions like endocarditis and osteomyelitis.


1 Answers

I can't reproduce this issue. Using sbt 1.1.6 and ScalaTest 3.0.5 I see non-zero time field:

<testcase classname="example.HelloSpec" name="The Hello object should say hello" time="0.016"> 
like image 65
Eugene Yokota Avatar answered Sep 19 '22 08:09

Eugene Yokota