Je n'arrive pas à comprendre pourquoi maven-surefire-plugin n'exécute pas le test jUnit4. Mon pom est (ne peut pas ajouter ici parce que "il semble d'après est le code la plupart du temps"): http://pastebin.com/Jj3iJZpYPourquoi maven-surefire-plugin ignore les tests avec un message de journal "car il a déjà été exécuté pour cette configuration"?
Lorsque j'exécute mvn clean test
fenêtre cmd montre:
C:\Users\maya\git\services>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building services 1.0.18
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ services ---
[INFO] Deleting C:\Users\maya\git\services\target
[INFO]
[INFO] --- maven-mule-plugin:1.9:attach-test-resources (default-attach-test-resources) @ services ---
[INFO] attaching test resource C:\Users\maya\git\services\src\main\app
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-resource (add-resource) @ services ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-mule-plugin:1.9:filter-resources (default-filter-resources) @ services ---
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ services ---
[INFO] Compiling 60 source files to C:\Users\maya\git\services\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ services ---
[INFO] Compiling 1 source file to C:\Users\maya\git\services\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default-test) @ services ---
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default) @ services ---
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.554 s
[INFO] Finished at: 2015-12-11T15:48:05+03:00
[INFO] Final Memory: 48M/312M
[INFO] ------------------------------------------------------------------------
classe Test est:
package com.comp.utils.UtilsTest;
import static org.junit.Assert.assertTrue;
import org.apache.log4j.Logger;
import org.junit.Test;
public class UtilsTest {
private static final Logger LOG = Logger.getLogger(UtilsTest.class.getName());
@Test
public void testHasPersonSameProd() {
boolean hasSameProduct = false;
assertTrue("Should be True", hasSameProduct);
}
}
Pourquoi maven-surefire-plugin: 2.19 s'exécute deux fois et ne veut pas exécuter ma classe de test? Comment faire un test dans mon cas? Je vous remercie.
Merci. L'erreur était dans ' UtilTest.java '. Devrait être UtilTest ** s **. Java –
May12