How to pass java code a parameter from maven for testing

后端 未结 6 1427
故里飘歌
故里飘歌 2020-11-30 03:17

I need to pass on following values …

exeEvironment (Test environment) , testGroup (Group in testNG)

from Command-Line ->

6条回答
  •  -上瘾入骨i
    2020-11-30 03:58

    You don't need to use environment variables or edit pom.xml to use them.

    The goals and options for Invoke Maven 3 under Build section takes the parameter. Try this (assuming you parameterized the build):

    Invoke Maven 3
      Goals and options = test -Denv=$PARAM_ENV -Dgroup=$PARAM_GROUP
    

提交回复
热议问题