[
https://issues.apache.org/jira/browse/ISIS-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13279687#comment-13279687
]
Dan Haywood commented on ISIS-228:
----------------------------------
This technique fails because JUnit attempts to load the classes defined as
categories. Since the definition of surefire is in the top-level POM, these
classes (which I had defined in core.testsupport) do not exist.
A quick search on google shows others hitting the same issue, eg
https://github.com/KentBeck/junit/issues/400.
So instead, am using a naming convention:
* by default, exclude all *IntegrationTest* classes
* if specify -P integtest-mongo, then run only the *Mongo*IntegrationTest*
classes
* if specify -P integtest-sql, then run only the *Sql*IntegrationTest* classes
I haven't yet figured out a way to be able to run both the mongo and sql
integration tests in a single run.
> Use JUnit categories to distinguish between tests that can be run on CI
> server and those that cannot.
> -----------------------------------------------------------------------------------------------------
>
> Key: ISIS-228
> URL: https://issues.apache.org/jira/browse/ISIS-228
> Project: Isis
> Issue Type: Improvement
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Priority: Minor
>
> eg using technique as described in
> http://johndobie.blogspot.co.uk/2012/04/unit-and-integration-tests-with-maven.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira