scala - How to get the name of the current scalajs / uTest test case -


how can name of running utest test case?

during test case use println(...) or log.debug(...) print , check various values. @ beginning of test case print name of test case.

i can this:

object mytests extends testsuite    def tests = testsuite {      "mytest01" - {        println("mytest01 starting ***************************************************")        val x = thing.docomplexcalc       println("x = " + x )        val y = anotherthing.dosomethingmore( x )       println("y = " + y )       assert(y=="mysterious output")     }   } } 

in (extremely simplified) example "mytest01" duplicated. i'm looking way remove duplication, e.g. this:

object mytests extends testsuite    def tests = testsuite {      "mytest01" - {        println(gettest().name + " starting ***************************************************")        val x = thing.docomplexcalc       println("x = " + x )        val y = anotherthing.dosomethingmore( x )       println("y = " + y )       assert(y=="mysterious output")     }   } } 

test name available tests.toseq().name how know case running if run parallel using sbt.

it's not available right now. there's open issue make so

https://github.com/lihaoyi/utest/issues/71


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -