Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kapua-dev] Issues with unit test/integration test split

I just ran into another issue. The system property "test" is used by the surefire plugin itself. Setting the value to some value (e.g. "integration") and running it on a project will cause it to actually look up the test "integration" and fail if it doesn't exist:

Also see: https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#test
---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.277 s
[INFO] Finished at: 2017-06-27T14:27:42+02:00
[INFO] Final Memory: 30M/594M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project kapua-build-tools: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

---

On Tue, Jun 27, 2017 at 2:12 PM, Jens Reimann <jreimann@xxxxxxxxxx> wrote:
Hi,

I do have some issues with the recent split of unit tests and intgration tests.

From what I have seen the way to go is to specify "-Dtest=integration" for running the integration tests.

However, seeing a drop in code coverage, this seems to disable the unit tests. And looking at the maven profiles, it seems as if there is currently no way to run unit tests and integration tests in the same build.

I would strongly suggest to revert this behavior and fall back to the maven standard way of using "test" and "integration-test", maybe using the "failsafe" plugin and allow to run both test types when desired in a single build.

Cheers

Jens

--
Jens Reimann
Senior Software Engineer / EMEA ENG Middleware
Werner-von-Siemens-Ring 14
85630 Grasbrunn
Germany
phone: +49 89 2050 71286
_____________________________________________________________________________

Red Hat GmbH, www.de.redhat.com,
Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill



--
Jens Reimann
Senior Software Engineer / EMEA ENG Middleware
Werner-von-Siemens-Ring 14
85630 Grasbrunn
Germany
phone: +49 89 2050 71286
_____________________________________________________________________________

Red Hat GmbH, www.de.redhat.com,
Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill

Back to the top