[jbossts-issues] [JBoss JIRA] (JBTM-954) Update the XTS unit tests to use Arquillian

Tom Jenkinson (JIRA) jira-events at lists.jboss.org
Fri Oct 26 05:21:04 EDT 2012


     [ https://issues.jboss.org/browse/JBTM-954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Jenkinson updated JBTM-954:
-------------------------------

    Fix Version/s: 4.17.0
                       (was: 5.0.0.M2)

    
> Update the XTS unit tests to use Arquillian
> -------------------------------------------
>
>                 Key: JBTM-954
>                 URL: https://issues.jboss.org/browse/JBTM-954
>             Project: JBoss Transaction Manager
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>          Components: Testing, XTS
>            Reporter: Paul Robinson
>            Assignee: Paul Robinson
>             Fix For: 4.17.0
>
>
> Currently the XTS unit tests deploy a servlet that is invoked by an ant script. By using Arquillian we should be able to remove the ant script and servlet then have Arquillian deploy the services and run the tests directly in the container.
> Currently these are the steps that are ran:
> # Deploy the tests to the AS
> # Run XTS/localjunit/run-tests.xml which in turn invokes com.arjuna.qa.junit.LocalJUnitRunner for each group of tests.
> # com.arjuna.qa.junit.LocalJUnitRunner invokes the com.arjuna.qa.junit.TestRunnerXMLServlet Servlet.
> # TestRunnerXMLServlet then invokes a testsuite, for example: com.arjuna.wst11.tests.junit.TestSuite for the ws-t11 tests
> # for example, com.arjuna.wst11.tests.junit.TestSuite comprises a number of JUnit tests whose results are returned as an XML response to the TestRunnerXMLServlet
> # LocalJUnitRunner writes the response of the TestRunnerXMLServlet to the file system and registers a test failure if any of the tests failed.
> There is a lot of code to run the tests. This could all be replaced by using Arquillian. The motivation here is less code to maintain and the ability to run tests directly from any ant runner. 
> I think the process we should follow is as follows: 
> # Figure out which tests are currently ran, I suspect it's only the WS-TX v1.1 tests that are ran, as I think the WS-TX 1.0 support is no longer needed. This can be done by tracing through from XTS/localjunit/run-tests.xml to see which servlets are invoked.
> ## Each servlet is configured to run a test suite. Each test suite lists a number of test classes.
> ## Report back to this issue stating which tests are ran. Can you produce a table for each servlet?
> # Take one test class and convert that to Arquillian. You should just need to define an @Deployment method on the class and set the @RunWith.
> ## This test should be runnable from your IDE using the regular ant runner
> ## Report back to this issue when you are this far to review the pattern.
> # Providing the pattern looks good, the next step should be to extend support the remaining TestCases in the TestSuite. I think they will all share a common @Deployment method, maybe you can use a base class.
> ## This suite should be runnable from your IDE using the regular ant runner
> ## Report back to this issue when you are this far to review the pattern.
> # Providing the pattern looks good, the next step is to convert the remaining (used) TestSuites to use Arquillian.

--
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 jbossts-issues mailing list