assertj / assertj-swing

Fluent assertions for Swing apps
Other
108 stars 52 forks source link

Get the TestNG tests to run on command line #141

Closed croesch closed 10 years ago

croesch commented 10 years ago

I can run the assertj-swing-testng tests from within an Eclipse but not from command line. Need to investigate how and why..

This is all I see on command line:

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: TestNGMapConfigurator
[Parser] Running:
  Command line suite

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.221 sec - in TestSuite

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
stefanmahler commented 10 years ago

A solution I found on http://stackoverflow.com/questions/1232853/how-to-execute-junit-and-testng-tests-in-same-project-using-maven-surefire-plugi seems to work:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <executions>
        <execution>
            <phase>test</phase>
            <goals>
                <goal>test</goal>
            </goals>
            <configuration> 
                <testNGArtifactName>none:none</testNGArtifactName>
            </configuration>
        </execution>
        <execution>
            <id>test-testng</id>
            <phase>test</phase>
            <goals>
                <goal>test</goal>
            </goals>
            <configuration> 
                <junitArtifactName>none:none</junitArtifactName>
            </configuration>
        </execution>
    </executions>
</plugin>
croesch commented 10 years ago

Thanks, indeed this solution works fine :-)

I'll merge it later..