Play 2 passing system properties to test cases

后端 未结 1 798
独厮守ぢ
独厮守ぢ 2021-01-22 17:58

When executing \'play test\', is there a way to pass in system properties to be used at test cases?

String testDB = System.getProperties().getProperty(\"testDB\         


        
相关标签:
1条回答
  • 2021-01-22 18:32

    1.2.4

    Try play run -DtestDB=localdb --%test

    I found that at the bottom of http://www.playframework.org/documentation/1.2.4/ids where it states that play test is equivalent to play run --%test.

    2.0

    Try play -DtestDB=localdb test

    The system property needs to be before the command.

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