How to configure Junit in web base application?

Spring + MVC Based + Web + Junit

Step 1 - Add the Junit jar in WEB-INF/lib folder and set it into build path.

Step 2 - Create the 2 separate package for Junit data and test cases.

Step 3 - Create Junit class. Sample Junit class as below

		@ContextConfiguration(locations = {"file:WebContent/WEB-INF/dispatcher-servlet.xml"})
		@RunWith(SpringJUnit4ClassRunner.class)
		public class EmpDetailTest {
			@Autowired
			private EmpDetailDao empDetailDao;
			@Test
			public void getAccountDetails() {
				//Code
				assertNotNull(data);
			}
		}