Arquillian
  1. Arquillian
  2. ARQ-567

Supporting Test Suites (@ArquillianSuite)

    Details

    • Type: Feature Request Feature Request
    • Status: Open (View Workflow)
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      Currently, it is supported that JUnit test cases being run by Arquillian. This feature request is request for supporting test suites too to be run by Arquillian too. Idea is like:

      @RunWith(ArquillianSuite.class)
      @Suite.SuiteClasses(

      { TestCase1.class, TestCase2.class, .... }

      )
      public class AllTests{
      @Deployment
      public static JavaArchive createTestArchive()

      { return ShrinkWrap.create(JavaArchive.class,"test.jar"); }

      }

      The advantages of above approach for users of Arquillian framework are:

      • Test cases don't needed to be modified to have: "@RunWith(Arquillian.class)" annotation. In other words, test cases will be pure JUnit code, and no Arquillian code (results in less coding for end users).
      • It is not necessary to include the static "@Deployment" methods in all test cases any more, and only Test Suite need to define the archieving/deployment related setting/definitions.

      The advantage of above approach for framework itself is:

      • From performance point-of-view, it becomes possible for Arquillian to deploy all test cases in the Test Suite into J2EE container in one action (one deploy/undeploy for one test suite, instead of mulitple deploy/undeploy for each test case).

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Peter Probst added a comment -

            Hello Bernard,
            thank you for pinpointing the suite extension and your and aslaks work on that. I've tested extension and the suite alone is working properly, but we are using persistence extension (1.0.0.Alpha5) and then following exception occurs:
            java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor
            at org.jboss.arquillian.persistence.core.deployment.PersistenceExtensionArchiveAppender.requiredLibraries(PersistenceExtensionArchiveAppender.java:81)
            Unfortunately the real exception is eaten and i can't debug within persistence extension.
            Thanks, Peter

            Show
            Peter Probst added a comment - Hello Bernard, thank you for pinpointing the suite extension and your and aslaks work on that. I've tested extension and the suite alone is working properly, but we are using persistence extension (1.0.0.Alpha5) and then following exception occurs: java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor at org.jboss.arquillian.persistence.core.deployment.PersistenceExtensionArchiveAppender.requiredLibraries(PersistenceExtensionArchiveAppender.java:81) Unfortunately the real exception is eaten and i can't debug within persistence extension. Thanks, Peter
            Hide
            Aslak Knutsen added a comment -

            Peter Probst This is why the Suite Extension is not official yet. The internal SPIs for handling multiple Classes in a Suite etc are not present, so some extensions (specially those that rely on providing TestClass specific configuration to the Deployment) does not work.

            Show
            Aslak Knutsen added a comment - Peter Probst This is why the Suite Extension is not official yet. The internal SPIs for handling multiple Classes in a Suite etc are not present, so some extensions (specially those that rely on providing TestClass specific configuration to the Deployment) does not work.
            Hide
            Davy Herben added a comment - - edited

            Hi, great work gentlemen. I've tested this on our project, where we have 1200 arquillian tests against a standalone glassfish 3.1, and using this extension easily cuts our total build time in half! Very excited about this

            I've encountered one issue though, which is killing the maven build. The build correctly deploys the test archive only once, but it does not undeploy it after all integration tests have run. This leaves the test archive deployed. On the next build, the deployment fails because glassfish complains that the archive already exists. I've been looking at a way to make arquillian provide the --force argument to the glassfish deployment to force an override, but this does not seem to be possible with the current adapter.

            Any ideas on how to fix this? In case it matters: I have set up the maven failsafe plugin to simply run all *ContainerIT tests, not to run a specific junit TestSuite.

            Show
            Davy Herben added a comment - - edited Hi, great work gentlemen. I've tested this on our project, where we have 1200 arquillian tests against a standalone glassfish 3.1, and using this extension easily cuts our total build time in half! Very excited about this I've encountered one issue though, which is killing the maven build. The build correctly deploys the test archive only once, but it does not undeploy it after all integration tests have run. This leaves the test archive deployed. On the next build, the deployment fails because glassfish complains that the archive already exists. I've been looking at a way to make arquillian provide the --force argument to the glassfish deployment to force an override, but this does not seem to be possible with the current adapter. Any ideas on how to fix this? In case it matters: I have set up the maven failsafe plugin to simply run all *ContainerIT tests, not to run a specific junit TestSuite.
            Hide
            Esteve Aviles added a comment -

            Hi,

            Is there any news on this issue? I find it pretty interesting as we have more than 60 test cases per app and a part from build time we need big infrastructure to handle them.
            How do you do that in other projects?

            Thanks in advance.

            Regards.
            Esteve

            Show
            Esteve Aviles added a comment - Hi, Is there any news on this issue? I find it pretty interesting as we have more than 60 test cases per app and a part from build time we need big infrastructure to handle them. How do you do that in other projects? Thanks in advance. Regards. Esteve
            Hide
            Karthik Shantaraman added a comment -

            Hi,

            Is there a way to run multiple tests with a single Deployment?

            Show
            Karthik Shantaraman added a comment - Hi, Is there a way to run multiple tests with a single Deployment?

              People

              • Assignee:
                Unassigned
                Reporter:
                Mousavi Jahan Abadi S. M.
              • Votes:
                78 Vote for this issue
                Watchers:
                66 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Development