4 Replies Latest reply on Apr 23, 2012 10:44 AM by chriswilliams

    Run multiple tests per test war deployment

    chriswilliams

      We're remote hot-deploying a test war and running tests one at a time (for now) using:

       

      {code}-Dtest=SomeClassTest{code}

       

      This works well until we try to add more classes that we also want run at the same time:

       

      {code}-Dtest=SomeClassTest,SomeOtherTest{code}

       

      When we do this, the test war gets deployed, SomeClassTest's tests run and then the test war gets undeployed and then deployed again for SomeOtherTest. Is there any way to configure Arquillian to keep using the same deployed test war for all tests being run?

       

        • 1. Re: Run multiple tests per test war deployment
          vineet.reynolds

          Is there any way to configure Arquillian to keep using the same deployed test war for all tests being run?

          This need looks similar to the feature requests ARQ-197 and ARQ-567. However, in your case you wish to share deployments across "unrelated" testcases. Is this something you desire? Or would your needs be taken care of, by either of those feature requests?

          • 2. Re: Run multiple tests per test war deployment
            chriswilliams

            This is similar to ARQ-567 but in our case, our tests all extend jboss.arquillian.testng.Arquillian and we don't annotate each test class.. We also have a @Deployment annotated method in our test class hierarchy that all test classes share. Would 567 cover this situation?

            • 3. Re: Run multiple tests per test war deployment
              vineet.reynolds

              How do you share the @Deployment annotated methods in your test class hierarchy? Are you using a singular method in a class, only to invoke it in your @Deployment methods in each test class?

               

              ARQ-567 relates to the use a shared @Deployment in a Test Suite like a JUnit TestSuite e.g. @RunWith(Suite.class), where the suite is composed of several test classes. As far as I know, TestNG requires suites to be specified in XML files, so I'm unsure if this will suit your need.

              • 4. Re: Run multiple tests per test war deployment
                chriswilliams

                There's a @Deployment annotated method in a super-class that all of our tests extend.

                 

                After reviewing the issues you mentioned, this may be more similar to ARQ-197 which is not implemented yet.