0

I have 5 Junit Test Classes to execute test cases in parallel and I have hardcoded cucumber --tags in @CucumberOptions. Now I want to pass cucumber --tags as parameters from jenkin's job.

Ex:

-- tags = {@Students,@Courses,@Faculties,@Admin,@Visitors}

in a way that each tag is assigned to any Junit runner randomly when job is invoked.

Any suggestion would be appreciated. . Thanks in advance.

hrskrs
  • 4,447
  • 5
  • 38
  • 52
  • Jenkins allows you to pass Maven parameters in the job itself. Based on that you can use the format in [this answer](http://stackoverflow.com/questions/30594007/get-cucumberoptions-tag-property-using-system-getproperty/30819258#30819258) – Reimeus May 13 '16 at 13:08
  • @Reimeus: Thanks for your reply.. I tried this solution before posting my question here.. but it did not work. all the tags are run in single test class.where as(if we consider your suggestion) I want tag(@other) to run in test class A & tag(@now) to run in test class B and I want these tags should be passed from Jenkins in a way that each test class should pick one tag when jenkin's job invokes. – Pushpendra Sharma May 16 '16 at 13:03

0 Answers0