0

I'm new to Jenkins jobs. What I wanted to achieve is to parse the contents of a dynamically created CSV file for the list of names of test cases I want to execute in my maven build statement. The CSV file is available in my workspace under the /src/test/result directory and here is the build configuration:

Maven version: Maven-3.3.3
Root POM: pom.xml
Goals and options: clean install -Dinclude.tag=test1

I tried File Parameter and specified my csv's location but I don't know how to get the contents of the file so I can replace test1 in the Goals and option section by the list of names of my test cases to execute. I'm using the Execute windows batch command in my pre build steps. Any help is highly appreciated.

aby
  • 810
  • 6
  • 21
  • 36
  • Why dynamically generating a list of files for testing? Are those tests not names like `*Test.java` ? If so do follow the convention and try to reinvent the wheel... Apart from that having a directory `src/test/result` is violating the conventions? Why do you do so? What are you trying to achive? How does your pom file look like? – khmarbaise Dec 10 '20 at 16:27
  • The csv contains failed test cases from another jenkins job that I need to rerun. I can change the directory to be the workspace if that helps. What is the best way to run these test cases? – aby Dec 10 '20 at 17:14

0 Answers0