I want that my test cases should run only once. 
Right now the test cases run once for sure-fire and then for clover.

I have tried some things :

This is the project's pom 

 <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.2</version>
                    <configuration>
                        <skip>true</skip>
                        <forkMode>none</forkMode>
                        <suiteXmlFiles>
                           
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                        </suiteXmlFiles>
                       
<reportsDirectory>${pom.basedir}/target/reports/surefire</reportsDirectory>
                    </configuration>
                                        <executions>
                                                <execution>
                                                        <id>it</id>
                                                        <phase>test</phase>
                                                        <goals>          
                                                                <goal 
name="test">test</goal>
                                                        </goals>
                                                        <configuration>
                                                                
<skip>true</skip>
                                                        </configuration>
                                                </execution>
                                        </executions>
                </plugin> 


This is the child pom (core's pom)
  <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-clover2-plugin</artifactId>
                <configuration>
                   
<licenseLocation>${pom.basedir}/src/test/resources/clover.license</licenseLocation>
                   
<targetPercentage>${build.tests.code.coverage.percentage}</targetPercentage>
                   
<outputDirectory>${pom.basedir}/target/reports/clover</outputDirectory>
                                        
<contextFilters>@deprecated</contextFilters>  
                </configuration>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>instrument</goal>
                            <goal>clover</goal>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Now after doing this when the test case run for sure-fire they are skipped.
And when the clover plugin runs it calls the sure-fire plugin with the
execution goal id as 'it' .This works fine

now when the clover has generated the clover.db , it again run the sure-fire
plugin with the execution goal with id as 'it'. Now i don;t wont this plugin
to be executed again.

Is there a way by which this execution with 'id' gets exectued only once. Or
is there a way by which i can check if the clover.db is generated so the
test cases should not get executed.

Please let me know if there is some way.
-- 
View this message in context: 
http://www.nabble.com/Stop-Clover-re-running-tests-if-they%27ve-already-run-tp20407359p20407359.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to