-
1. Re: Should I use Arquillian instead of the Spring TestContext Framework?
jmnarloch Mar 10, 2013 5:31 PM (in response to tkaczano)Hi Tomasz,
Tomek Kaczanowski wrote:
From this thread on stackoverflow http://stackoverflow.com/questions/4922554/difference-between-spring-testcontext-framework-and-jboss-arquillian I understand that there is not much gain, but I would be happy to learn the opinions of Arquillian experts.
Let me start with a bit of personal opinion, I totaly disagree with the referenced discussion (http://stackoverflow.com/questions/4922554/difference-between-spring-testcontext-framework-and-jboss-arquillian).
Now, I would not recommend droping Spring Test in favor of Arquillian entirely, but there is a much to gain by using it in development process. It can bring you tools that can be hardly found in any other testing tool. All together there are different 'layers' on which you are able to use it. If you are interested just in running just integration test then you can quickly get quite familar with it becouse it's very similar to Spring Test, with one major difference - you can run your test in your production environement. But this is not all that Arquillian has to offer it is very helpfull in runing end-to-end tests. Depeneding on the technology stack you are using, Arquillian can give you automatic deployment of you web application and run of acceptance tests of your application through Selenium and Arquillian Drone. The same can be done with services, no mather whether there are RESTfull of SOAP based. I personally thing that this is something that can not be underestimated. I have witnesed many times how assumptions that your application will run in desired environment without any problems has failed and finding this as soon as possible for me is a great Arquillian advantage.
If you are interested with starting with Arquillian, I would recommend starting from here: http://arquillian.org/guides/getting_started/
In case you would be interested in running your integration test there is a proper extension for Spring: http://arquillian.org/blog/2012/08/17/arquillian-extension-spring-1-0-0-Beta1/
For acceptance testing you can use Arquillian Drone: http://arquillian.org/guides/functional_testing_using_drone/
Even more if you are familiar with Spring Mvc Test Arquillian has even better solution: Warp Spring MVC - imagine that you can click a button on a web form through selenium driver and afterwards verify your MVC controller logic.