Passing test parameters to Jenkins build?

Wednesday, April 25, 2018
Avatar

Hello,

 

I have one question. 

I have managed to run multiple tests in one Jenkins build via runtests.cmd file as described in the KB.

However, I would like to pass the starting url as a test parameter to all the tests that are run through the runtests.cmd

The first step in each test is Navigator.Open('url') and what I like is to pass different values to 'url' from Jenkins for each build. (the 'url' will be the same for each test in one test run, the goal is to run the tests in different environments).

 

Is it anyway possible to do it? The tests that are being executed from the runtests.cmd are executed via their play.cmd files

2 Replies
Monday, April 30, 2018
Avatar
inflectra.jimx
re: StefanMandovski Wednesday, April 25, 2018

Hi Stefan,

Yes, don't use the cmd file, instead just call the Rapise command line directly and pass the parameter values: 

https://www.inflectra.com/Support/KnowledgeBase/KB26.aspx

Regards

Jim

Monday, May 7, 2018
Avatar
re: inflectra.jimx Monday, April 30, 2018

Thanks for the solution Jim. 
 

What I actually ended up doing was

1. Put the different ENV links in an IF statement in the Rapise tests. Every test reads from an external txt file a variable and depending on the value, it goes to the link. 
2. In the Jenkins job, check 'This is a parameterized build' and add the (ENVs as) parameters to the job. 

When building the Jenkins job, upon selection of the ENV in Jenkins, Jenkins writes the ENV name as a variable to the txt file using a batch command and the Rapise tests read the ENV from that file and use it in the IF statement to navigate to the proper ENV link. It might be a little more work than it should but works seamlessly. 

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Wednesday, April 25, 2018
  • Last Reply: Monday, May 7, 2018
  • Replies: 2
  • Views: 9546