I have below testng.xml file :

< name="Product_Listing_Page" enabled="true">
    < name="scenario.file.loc" value="scenarios/plp.bdd"></>
    <groups>
        <run>
            <include name="REGRESSION" />
        </run>
    </groups>

    <classes>
        <class name="client.text.BDDTestFactory"></class>
    </classes>
</test>

<test name="Registration" enabled="false">
    < name="scenario.file.loc" value="scenarios/registration.bdd"></>
    <groups>
        <run>
            <include name="REGRESSION" />
        </run>
    </groups>
    <classes>
        <class name="client.text.BDDTestFactory"></class>
    </classes>
</test>

I have create one job as maven project where I’am passing the testng.xml file name as parameter like clean test -DSuiteXmlFile=config/testrun_config.xml because I have also configured failed-test.xml in Post build trigger as well. I’m looking for a way where i can the test name along with the command.

Any idea about this or do i need to try some other approach ?



Source link https://sqa.stackexchange.com/questions/34825/is-it-possible-to-pass-testng-xml-and-test-name-as--parameter-in-jenkins

LEAVE A REPLY

Please enter your comment!
Please enter your name here