[
https://issues.apache.org/jira/browse/SUREFIRE-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15030879#comment-15030879
]
ASF GitHub Bot commented on SUREFIRE-1194:
------------------------------------------
Github user Tibor17 commented on the pull request:
https://github.com/apache/maven-surefire/pull/107#issuecomment-160397879
It's hard to debug the IT because @After cleaned up previous tests in
`target`.
Good inspiration is `Surefire1158RemoveInfoLinesIT` and method `unpack`
because the folder where the IT is extracted is not cleaned up but every
@Parameterized value combination has own postfix `_xyz` in folder name. Example:
`return unpack( getClass(), "/surefire-1158-remove-info-lines", "_" +
description, cli )`
CLI is not your case.
Then we will see all logs from all tests which is good for debugging of
entire build.
Not sure why you have such exception, but we will see the root cause if you
call `unpack` as above and I guess the root cause is in missing classes in
TestNG because the Reporter API changed in TestNG as I understood. This means
we will need to have another configuration of
```
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<properties>
<property><name>usedefaultlisteners</name><value>false</value></property>
<property><name>listener</name><value>listenReport.ResultListener,listenReport.SuiteListener</value></property>
<property><name>reporter</name><value>listenReport.Reporter</value></property>
</properties>
</configuration>
</plugin>
```
This means you can parameterize `<value/>` with Maven property been fetched
from IT in the form of system property, e.g. `<value>${it.listener}</value>`
and IT would have `unpack(...).sysProp( "it.listener", "<class>" )`; Or you can
use Maven profile, as you like, but system property is okay and simple.
> reporter argument does not work for TestNG
> ------------------------------------------
>
> Key: SUREFIRE-1194
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1194
> Project: Maven Surefire
> Issue Type: Bug
> Components: TestNG support
> Affects Versions: 2.19
> Reporter: Testo Nakada
> Assignee: Tibor Digana
> Fix For: 2.19.1
>
>
> TestNG plugin seems to map -reporter command line parameter to reporterslist
> which was removed in TestNG project since 2010
> (a4779524b59330e98ee596c5faa43ae1b33ff844). Therefore, this configuration has
> stopped working since then. The configuration mentioned in
> http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html#Using_Custom_Listeners_and_Reporters
> does not work as expected.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)