I have set of Integration test cases which are using spring JUnit class runner @RunWith(SpringJUnit4ClassRunner.class). I have referred applicationContext.xml and other required xml files using @ContextConfiguration annotation.
I have executed these test cases and they are running file on my local machine. The problem is when I execute these test cases using Hudson they don't run and throw exception
Caused by: org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [spring/components/framework-context-integrationTest.xml] cannot be opened because it does not exist
On local machine I have set class path before execute the test case but on Hudson somehow classpath is not being set. I tried setting classpath in 'Set environment variables' of Configure Job of Hudson but nothing worked.
Please can someone explain how do I set classpath so that a job can read it.