2 Replies Latest reply: Aug 29, 2011 12:07 AM by Mousavi Jahan Abadi S. M. RSS

Supporting test suites

Mousavi Jahan Abadi S. M. Newbie

Hi All,

 

Last several days, I am learning and trying to use the Arquillian test in my project.

I should say that Arquillian has a very good design and implementation, and I really enjoyed it (if we ignore the lack of good documentation for those like me that not using the Maven, and using Ant. Anyway, it took me 2 days to learn it, find JAR files necessary, and fix errors)

 

Now, I am using Arquillian in my project, and I can use for my TestCases (I am using JUnit).

But, I have a question. Does Arquillian support TestSuites too? I am seeing that in following URL, Aslak has a sample for using Arquillian for test suites, but, as long as I search, I can't find the "ArquillianSuite" class. Am I missing something?

 

http://pastebin.com/TtkUScLS

 

Let me explain the necessity for the above request.

As you know, for large projects, there will be many TestCases. And, it is not logical that include all test cases inside ant file for automating all the test cases (for example, for using with Continuous Integration tools, like Jenkines). Therefore, normally, Ant only access one entry point for unit tests, which will be TestSuite. And, the TestSuite will include all those TestCases.

 

In addition to above need,

- I don't want to include: @RunWith(Arquillian.class) for all my test cases, and I just want to add @RunWith(ArquillianSuite.class) only in one location, which will be the test suite class.

- I don't want to include:  public static JavaArchive createTestArchive(){ ... } method in all of my test cases. Rule is to be DRY (Don't Repeat Yourself), and I want to include archieve creation method only in one location, which is test suite. I am not sure about details of Arquillian implementation, but, using createTestArchive() methods ONLY inside test suite, I think it will be un-necessary to deploy/undeploy test JAR/WAR files to web server for each test case.

 

Thanks.