0

When run mvn clean install my project builds successfully howver it does not run any unit tests I have set up.

My code is located: src/main/java

and my unit test: src/test/java

When I run the Junit test independently (i.e. right click UnitTest.java Run As -> Junit Test) it works just fine. Only when I do mvn clean install or mvn clean test, it doesn't work.

I'm using default package (so all my classes are located directly under the java sub folders)

Here is the console output:

------------------------------------------------------- T E S T S

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] [INFO] --- exec-maven-plugin:1.1:exec (generate-output) @ print-engine-tester --- [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ print-engine---

Someone mentioned that it could be due to a TestNG depdendency involved with Junit 3, not sure if this is the case but I added the exclusion to my pom but still same problem.

Any help or assistance would be much appreciated

Edit:

Posting my unit test methods. I don't think naming convention is my issue

@Before
public void TestdBefore() throws Exception {

    Engine app = new Engine();
    app.run(DEFAULT_CONTENT_DIR, DEFAULT_FONTS_DIR, 
            DEFAULT_FORMML_DIR, DEFAULT_PDF_DIR, DEFAULT_CHK_DIR);
}

@Test
public void TestdTest() {
    CompareUtil util = new CompareUtil();
    util.run(FY2014, FY2015, formMLDir);
}

@After
public void TestdAfter() {

}
arabian_albert
  • 708
  • 1
  • 11
  • 24

0 Answers0