How to pass parameter to maven test

后端 未结 3 1538
难免孤独
难免孤独 2021-01-21 01:26

I have One test suite running in two environment. Sometimes, I would like to run tests in localhost:8080 and sometimes at localhost:8585. Jenkins run the tests by \"mvn te

3条回答
  •  -上瘾入骨i
    2021-01-21 02:08

    try this:

    mvn -Dtest=testName -Dargline="-Dport=portValue"
    

    and portValue will be either 8080 or 8585, and while you have a "port" variable declared in your test code.

提交回复
热议问题