Forum Discussion

gomathiSubraman's avatar
New Contributor
2 years ago

Pass variable through Jenkins

Hi Team,


I need to pass Environment variable while trigger jenkin job and I need to use that environment value in my javascript. Can you share me some documentation to refer for this task?

1 Reply

  • Hi gomathiSubraman,


    I hope you are keeping well.


    Yes of course you can pass variable values via the command line using the following methods


    To pass variable values via the command line, use the PrjVar (pv) or PSVar (psv) arguments for the project and project suite variables respectively. reference Passing Variables via Command Line


    For Example in Jenkins under the Configuration / Build -> Settings you can add in additional command line arguments and in my example below i'm setting the UserName variable in my test to be

    Upon execution of the test it will take the value passed from the command line and set this value against my variable in test.


    There are also options to Passing Test Parameters via Command Line and these can also be configured using the additional command line options within Jenkins.


    Please let me know if this resolves your query or if you have any additional questions.