java - Is it possible to ignore certain unit tests? -
I am currently working on a project which uses JUnit4 extensively in all modules. We are using Maven2 to build projects and build Hudson for continuous integration. This project is created and run under Java 1.5.
We have recently added a large fleet of unit tests which are necessary at the time, but during the construction process (but other
I want to know that such a comment Is that which can be applied to trials, or some configuration that can be made for Maven, which will ignore unit tests under a certain package or at the time of forming a certain test class?
NO In practice: The option to put these special tests in a general category will be run mainly, but this is not ideal.
Thank you for your suggestions
< Div class = "post-text" itemprop = "text">
You can configure.
For example:
Project & gt; ; & Lt; Build & gt; & lt; Plugins & gt; & lt; Plugin & gt; & gt; Group & gt; org.apache.maven.plugins & lt; / group & gt; & lt; artifactId & gt; ; Maven- Perfect-plugin & lt; / artifactId> & lt; version & gt; 2.4.2 & lt; / version & gt; & lt ; Configurations & gt; & lt; exclude & gt; & Lt; To exit & gt; ** / TestCircle.java & lt; / Exclude & gt; & Lt; To exit & gt; ** / TestSquare.java & lt; / Exclude & gt; & Lt; / Not included & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; Edit: Another solution is to define how all tests will run by I Hudson in development mode. You can use a subset of all the tests to speed up the development (or all tests can be in the default profile, test can be selected in dev profiles - so you can use the -PprofileName
attribute Maven is required to run). This example is a better option for integration tests that leads to running the logger.
Comments
Post a Comment