You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2007/02/23 08:06:04 UTC
[jira] Updated: (SUREFIRE-161) Result message of Surefire TestNG
run with invalid not logical.
[ http://jira.codehaus.org/browse/SUREFIRE-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter updated SUREFIRE-161:
----------------------------------
Fix Version/s: (was: 2.3)
2.4
> Result message of Surefire TestNG run with invalid <suiteXmlFile> not logical.
> ------------------------------------------------------------------------------
>
> Key: SUREFIRE-161
> URL: http://jira.codehaus.org/browse/SUREFIRE-161
> Project: Maven Surefire
> Issue Type: Bug
> Components: TestNG support
> Affects Versions: 2.0 (2.2 plugin)
> Environment: - WinXP
> - Maven 2.0.4 (with maven-surefire-plugin 2.2)
> Reporter: Davy Toch
> Fix For: 2.4
>
> Attachments: m2-testng-example-jdk15.zip
>
>
> When performing a Surefire TestNG run on Java 1.5 annotated test classes with pom.xml
> containing an incorrect testng suite configuration (e.g. pointing to inexisting file blieblie.xml),
> the run won't fail but instead will generate the following result:
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> The problem lies in:
> plugins\maven-surefire-plugin\src\main\java\org\apache\maven\plugin\surefire\SurefirePlugin.java (lines around line 500)
> if ( suiteXmlFiles != null && suiteXmlFiles.length > 0 )
> {
> if ( testNgArtifact == null )
> {
> throw new MojoExecutionException( "suiteXmlFiles is configured, but there is no TestNG dependency" );
> }
> for ( int i = 0; i < suiteXmlFiles.length; i++ )
> {
> File file = suiteXmlFiles[i];
> if ( file.exists() )
> {
> surefireBooter.addTestSuite( "org.apache.maven.surefire.testng.TestNGXmlTestSuite",
> new Object[]{file, testSourceDirectory.getAbsolutePath()} );
> }
> }
> If file.exists() returns false, then an Exception should be thrown.
> Remark that with JDK1.4 JavaDoc annotated classes, the same problem arises, as well as another problem
> indicated in http://jira.codehaus.org/browse/MSUREFIRE-173 .
> An example is included to illustrate the problem (just run 'maven test').
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira