Can you give us a bit more details what is the error you are facing? What is the environment you are using for tests etc? I would also recommend to follow the guides on arquillian.org. They will give you very good understanding of the Arquillian's mechanics (including deployment process).
i was not getting any errors. my query is "Is it compulsory to jar all the classes from a package." For Ex: there are 2 service classes in service.impl package service1 & service2. In the applicationContext.xml I have provided the
<context:component-scan base-package="com.arquillian.service.impl" />
i have created a testcase for testing service1. while creating deployment as war, arquillian is forcing to include the service2.class into the war.
Please let me know if you need anything more.
Thanks in advance.
Test deployment is not that different from normal application deployment. If s1 is using s2 it obviously needs to go to the deployment package. You need to package all required dependencies (or a full application if you like, which you can pre-built eg. using maven)
Please have a look here for better understanding https://github.com/arquillian/arquillian-showcase/tree/master/spring
Sorry Majsak. Here service1 & service2 are not dependent. For Ex: the impl package is containing UserImpl & SearchImpl. Now I want to test services related to User(UserImplTest). I'm assuming by using arquillian, for testing we can only load the necessary classes. I have included my code too in the first post.
May be assumption is wrong.
I'm assuming by using arquillian, for testing we can only load the necessary classes.
Your assumption is right. So what is the problem you are facing again?
First you said
it is forcing me to provide the other class too.
i was not getting any errors.
so I'm a bit lost at the moment.
As my understanding is correct all you need is confirmation that Arquillian does not require for packaging all the application classes?
Arquillian can hardly be aware of the existing project source and as a such relaies only on the deployments. So you can go and try to test each of the service layer class seperatly providing that there is no direct dependency between them, in such case either the deployment or test will fail dependending on the deployment type.
Hopes that this dispels your doubts