Specs2 - Tagging tests to run

前端 未结 1 2013
深忆病人
深忆病人 2021-01-21 02:12

I have been using ScalaTest for a while and I find pretty useful the ability to Tag your tests and run just those with a specific Tag from the command line.

Is there any

1条回答
  •  盖世英雄少女心
    2021-01-21 02:51

    Here is how to do it:

    import org.specs2.mutable._
    
    class MySpec extends Specification {
      tag("fast")
      "example1" >> ok 
    
      tag("slow")
      "example2" >> ok 
    }
    

    Then in sbt

    sbt> test-only *MySpec* -- include fast
    

    You will find more information here.

    0 讨论(0)
提交回复
热议问题