Quantcast

[testng-dev] can I have multiple different listeners in suite-files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[testng-dev] can I have multiple different listeners in suite-files

shankarkc78@gmail.com
I have a master testNG.xml as below
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="All Test suites stufffed" preserver-order="true">
    <suite-files>
        <suite-file path="./Catalog-TestNG.xml"></suite-file>  
        <suite-file path="./Contract-TestNG.xml"></suite-file> 
    </suite-files>
</suite>

catalog-TestNG.xml as below
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="CatalogSuite" verbose="1"  parallel="methods" thread-count="1"> 
<listeners>         <listener class-name="xxxxx.Listener1.class"/>   </listeners>
<parameter name="hubUrl" value="http://xxxxxxxx:7777/wd/hub" />
<parameter name="baseUrl" value="https:/xxxxxxxxxx.com" />
<parameter name="screenshotDir" value="target/pictures/" />
<test name="Catalog Test cases">
<parameter name="platform" value="ANY" />

<parameter name="browserType" value="Firefox" /> 
<parameter name="browserVersion" value="" />
<classes>
<class name="xxxxxxxxxxxxx.CatalogUITests.TestCatalogSearchPage" />
</classes>
</test>
</suite>

Contract-TestNG.xml as below
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="CatalogSuite" verbose="1"  parallel="methods" thread-count="1"> 
<listeners>         <listener class-name="xxxxx.Listener2.class"/>   </listeners>
<parameter name="hubUrl" value="http://xxxxxxxx:7777/wd/hub" />
<parameter name="baseUrl" value="https:/xxxxxxxxxx.com" />
<parameter name="screenshotDir" value="target/pictures/" />
<test name="Catalog Test cases">
<parameter name="platform" value="ANY" />

<parameter name="browserType" value="Firefox" /> 
<parameter name="browserVersion" value="" />
<classes>
<class name="xxxxxxxxxxxxx.ContractTests.TestContractPage" />
</classes>
</test>
</suite>


The problem is my listeners are not called.  If i paste listener in parent testNG.xml they work fine.But I want different testNG listers for different suites. I want to create a master testNG.xml using all oof the xmls. How to do this?
Thank you for your time.

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
Loading...