Incorrect documentation examples for test exclusions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect documentation examples for test exclusions

Tommy Svensson
Hello,

I an into a problem, and found the solution:

My pom started out like this:
        <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<excludes>
<exclude>**/RunBackendTest.groovy</exclude>
</excludes>
</configuration>
</plugin>

</plugins>
</build>
This didn’t work in any way!


But I finally solved the problem. My pom now looks like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<excludes>
<exclude>**/RunBackendTest</exclude>
</excludes>
</configuration>
</plugin>
See the difference ? No extension on test file! But the above referenced maven documentation examples do include the extensions, which clearly does not work.

From above web page:
______________________________________________________________________________

Exclusions

There are certain times when some tests are causing the build to fail. Excluding them is one of the best workarounds to continue the build. Exclusions can be done by configuring the excludes property of the plugin.

  1. <project>
  2. [...]
  3. <build>
  4. <plugins>
  5. <plugin>
  6. <groupId>org.apache.maven.plugins</groupId>
  7. <artifactId>maven-surefire-plugin</artifactId>
  8. <version>2.22.0</version>
  9. <configuration>
  10. <excludes>
  11. <exclude>**/TestCircle.java</exclude>
  12. <exclude>**/TestSquare.java</exclude>
  13. </excludes>
  14. </configuration>
  15. </plugin>
  16. </plugins>
  17. </build>
  18. [...]
  19. </project>
______________________________________________________________________________

Consider updating docs.

Best Regards,
Tommy Svensson





signature.asc (276 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect documentation examples for test exclusions

Tommy Svensson
> Consider filing an issue with MNGSITE. 

I agree with you. That would have been the smarter thing to do to begin with. 

/Tommy 


Från: Michael Osipov [hidden email]
Svara: Michael Osipov [hidden email]
Datum: 2 augusti 2018 at 20:51:33
Till: Tommy Svensson [hidden email]
Ämne:  Re: Incorrect documentation examples for test exclusions

Am 2018-08-01 um 14:30 schrieb Tommy Svensson:

> Hello,
>
> I an into a problem, and found the solution:
>
> My pom started out like this:
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.22.0</version>
> <configuration>
> <excludes>
> <exclude>**/RunBackendTest.groovy</exclude>
> </excludes>
> </configuration>
> </plugin>
>
> </plugins>
> </build>
> This didn’t work in any way!
>
> I copied the pom plugin configuration from this page: https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html
>
> But I finally solved the problem. My pom now looks like this:
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.22.0</version>
> <configuration>
> <excludes>
> <exclude>**/RunBackendTest</exclude>
> </excludes>
> </configuration>
> </plugin>
> See the difference ? No extension on test file! But the above referenced maven documentation examples do include the extensions, which clearly does not work.
>
> From above web page:
> ______________________________________________________________________________
> Exclusions
> There are certain times when some tests are causing the build to fail. Excluding them is one of the best workarounds to continue the build. Exclusions can be done by configuring the excludes property of the plugin.
>
> <project>
> [...]
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <version>2.22.0</version>
> <configuration>
> <excludes>
> <exclude>**/TestCircle.java</exclude>
> <exclude>**/TestSquare.java</exclude>
> </excludes>
> </configuration>
> </plugin>
> </plugins>
> </build>
> [...]
> </project>
> ______________________________________________________________________________
>
> Consider updating docs.

Consider filing an issue with MNGSITE.

Michael


signature.asc (276 bytes) Download Attachment