How can I add a Java system property during JUnit Test Execution

后端 未结 3 837
误落风尘
误落风尘 2020-12-19 02:49

I need to define a system property for my JUnit tests. I\'ve tried various steps to pass the name/value pair into gradle. (I\'ve tried Milestone-3 and 4). None of these app

3条回答
  •  失恋的感觉
    2020-12-19 03:01

    You can also define individual properties like this:

    test {
      systemProperty "file", "test.story"
    }
    

    (From this answer)

提交回复
热议问题