Junit test not running testwatcher methods in scalatest -


i have few classes of junit tests wanna use testwatcher class so

 class extends c {     @test     def testa = {     //tests     } } 

class b

class b extends c{ @test def testb ={ //tests } } 

class c below

trait c extends testwatcher {   override def failed(er:throwable, des:description) {       val writer = new filewriter(new file("d:\\test_"+des.getmethodname+".txt" ))          writer.write("false")          writer.close()  }    override def succeeded(des:description) {      val writer = new filewriter(new file("d:\\test_"+des.getmethodname+".txt" ))          writer.write("true")          writer.close()  } } 

it seems when run tests, succeeded , fail methods in c never ran , files never created.

i have tried using @runwith(classof[junitrunner]) doesn't work either

any ideas?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -