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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -