[
https://issues.apache.org/jira/browse/DELTASPIKE-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lonzak updated DELTASPIKE-1348:
-------------------------------
Description:
A while ago we separated our tests in standard junit- and integration tests
using junit's category mechanism: [Example
Article|https://www.javaworld.com/article/2074569/core-java/unit-and-integration-tests-with-maven-and-junit-categories.html].
The goal: When maven 'package' is used, then all tests annotated with @category
are skipped. When using 'install' they are executed. If in either build a junit
test fails, the build fails.
So now we switched to Deltaspike's CdiTestRunner. And now the above mechanism
doesn't work anymore:
# The integration tests are always executed ignoring the build phase (package,
install...)
# If the integration fails the build doesn't fail.
We were using the "RunWith" before so I think it is not a junit problem. I did
some research but only gradle seemed to had a similar problem
([https://github.com/gradle/gradle/issues/3189|https://github.com/gradle/gradle/pull/4321])
Any ideas how to get it to work again?
was:
A while ago we separated our tests in standard junit- and integration tests
using junit's category mechanism:
([https://www.javaworld.com/article/2074569/core-java/unit-and-integration-tests-with-maven-and-junit-categories.html|https://www.javaworld.com/article/2074569/core-java/unit-and-integration-tests-with-maven-and-junit-categories.html[]))]
The goal: When maven 'package' is used, then all tests annotated with @category
are skipped. When using 'install' they are executed. If in either build a junit
test fails, the build fails.
So now we switched to Deltaspike's CdiTestRunner. And now the above mechanism
doesn't work anymore:
# The integration tests are always executed ignoring the build phase (package,
install...)
# If the integration fails the build doesn't fail.
We were using the "RunWith" before so I think it is not a junit problem. I did
some research but only gradle seemed to had a similar problem
([https://github.com/gradle/gradle/issues/3189|https://github.com/gradle/gradle/pull/4321])
Any ideas how to get it to work again?
> Deltaspike is unusable with junit's @category
> ---------------------------------------------
>
> Key: DELTASPIKE-1348
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1348
> Project: DeltaSpike
> Issue Type: Bug
> Components: TestControl
> Affects Versions: 1.7.2
> Reporter: Lonzak
> Priority: Major
> Labels: category, cdi, junit, test
> Fix For: 1.9.1
>
>
> A while ago we separated our tests in standard junit- and integration tests
> using junit's category mechanism: [Example
> Article|https://www.javaworld.com/article/2074569/core-java/unit-and-integration-tests-with-maven-and-junit-categories.html].
> The goal: When maven 'package' is used, then all tests annotated with
> @category are skipped. When using 'install' they are executed. If in either
> build a junit test fails, the build fails.
> So now we switched to Deltaspike's CdiTestRunner. And now the above mechanism
> doesn't work anymore:
> # The integration tests are always executed ignoring the build phase
> (package, install...)
> # If the integration fails the build doesn't fail.
> We were using the "RunWith" before so I think it is not a junit problem. I
> did some research but only gradle seemed to had a similar problem
> ([https://github.com/gradle/gradle/issues/3189|https://github.com/gradle/gradle/pull/4321])
> Any ideas how to get it to work again?
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)