I have a question about using testng listeners with maven. Here's
testng-realated configuration in
pom.xml:
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>5.8</version>
<classifier>jdk15</classifier>
<scope>test</scope>
</dependency>
..............
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test-data/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
I followed this instruction:
http://testng.org/doc/documentation-main.html#logging-listeners
and created a listener and then added it to testng.xml this way:
<suite name="TestSuite">
<listeners>
<listener-name class-name="com.foo.bar.TestListener"/>
</listeners>
And it doesn't seem to be executed. Nothing happens as well when I
replace my class with
"org.testng.reporters.DotTestListener" or even "i.do.not.exist" - I
don't see errors nor warnings.
I've tried to configure listeners inside maven surefire plugin, like
it's described in its documentation:
http://maven.apache.org/plugins/maven-surefire-plugin//examples/testng.html
(<property><name>listener</name>...).
What am I doing wrong?
Roman Bogorodskiy
--