[jboss-jira] [JBoss JIRA] (AS7-5844) TS: Tests grouping 2: Create categories & let devs categorize the tests.
Ondrej Zizka (JIRA)
jira-events at lists.jboss.org
Mon Nov 26 08:26:21 EST 2012
[ https://issues.jboss.org/browse/AS7-5844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736939#comment-12736939 ]
Ondrej Zizka commented on AS7-5844:
-----------------------------------
Ondra:
{quote}
When I use JUnit's categories for Arq tests, then the class needs to be added to the deployment.
jar.addPackage(CommonCriteria.class.getPackage());
Is there some more convenient solution?
E.g. could I somehow instruct arq to wrap certain package to any deployment it does?
{quote}
Aslak:
{quote}
You can do this today if you want to, same as the weld core tests do.
Create a little AuxiliaryArchiveAppender that packages the categories. As long as that is registered in a LoadableExtension and register as SPI and on Classpath when you run, the produced Archive will be bundled with the deployment.
AuxiliaryArchiveAppender example:
https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/CategoryArchiveAppender.java
LoadableExtension example: (only the service AuxiliaryArchiveAppender is needed in this case)
https://github.com/weld/core/blob/master/tests-arquillian/src/test/java/org/jboss/weld/tests/WeldCategoryExtension.java
SPI registration:
https://github.com/weld/core/blob/master/tests-arquillian/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
{quote}
> TS: Tests grouping 2: Create categories & let devs categorize the tests.
> ------------------------------------------------------------------------
>
> Key: AS7-5844
> URL: https://issues.jboss.org/browse/AS7-5844
> Project: Application Server 7
> Issue Type: Feature Request
> Reporter: Ondrej Zizka
> Assignee: Ondrej Zizka
>
> Based on AS7-2086 and SUREFIRE-803, we can now create the categories for tests.
> They would be in testsuite/shared.
> Example:
> {code}
> interface AllTests;
> interface ATests extends AllTests;
> interface BTests extends AllTests;
> interface AaTests extends ATests;
> @Category(ATests.class) public void ATest();
> @Category(AaTests.class) public void AaTest();
> @Category(BTests.class) public void BTest();
> {code}
> It should be possible to have multiple categories:
> {code}
> @Categories({Foo.class, Bar.class})
> {code}
> TODO: Check if it also works with FailSafe.
> Some categories candidates (feel free to extend):
> * ASTest
> ** EJB
> ** JPA
> ** Management
> ** Security
> *** CommonCriteria
> ** NonArquillian
> ** Transactions
> ** Multinode
> *** Clustering
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list