0

I'm using TestNG, Jenkins, and the job-dsl-plugin.

I have a lot of TestNG XML testsuites for the tests in my project. What I want is a script that will go through each of these suites and create a job for them.

My test suites are formatted like this:

<suite name="Name of Suite">
    <test name="Name of Test">
        <packages>
            <package name="package.to.test.*"/>
        </packages>
    </test>
</suite>

So the job DSL script would have to recursively go through each of the tests in my testsuites directory, grab and parse the XML of these files, and then create a job for each one of them.

  1. Visit repo
  2. Recursively read every XML file in testsuites directory
    1. Grab the name of the suite -> name of Jenkins job
    2. Grab the path to this testsuite -> -Dtestngfile=<path>
  3. Create a job for each of these
michaelsnowden
  • 6,031
  • 2
  • 38
  • 83
  • You described your problem, but you did not ask a question. Edit your text so that it contains a question. – daspilker Aug 22 '15 at 05:56
  • @daspilker isn't it obvious enough that I'm just looking for a way to do this? Why is it necessary that I add "how do I accomplish this?" – michaelsnowden Aug 22 '15 at 18:58

0 Answers0