0

I have below testng.xml file :

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

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

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

I have create one Jenkins 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 pass the test name along with the command.

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

  • "I'm looking for a way where i can pass the test name along with the command." What is the "test name"? Is it the "name" attribute of <test> tag in your testng.xml? – Alexey R. Jul 19 '18 at 16:31
  • @Alexey. Yes exactly. I want to pass that name – NarendraR Jul 19 '18 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.