Passing JUnit command line parameters in eclipse

前端 未结 4 1069
南旧
南旧 2021-01-12 10:11

I have recently been using junit in eclipse and I am still learning. I know how to pass command line parameters in eclipse, but how do I pass them to a test case in Junit?

4条回答
  •  借酒劲吻你
    2021-01-12 10:18

    Probably you have figured this out, but when compiled and if using ANT or MVN, you can pass arguments to your JUNIT or TestNG from inside the POM.XML file.

     
      org.apache.maven.plugins
      maven-surefire-plugin
      2.4.3
      
        ${test.junit.forkMode}
        ${test.junit.skip}
        ${test.junit.argLine}
        ${jdk.compiler.path}/binjava
      
    
    

提交回复
热议问题