servletunit.struts.ExceptionDuringTestError: A NullPointerException was thrown. This may indicate an error in your ActionForm, or it may indicate that the Struts ActionServlet was unable to find struts config file. TestCase is running from D:/workspace/Struts1UnitTestProject directory. Context directory has not been set. Try calling setContextDirectory() with a relative or absolute path. struts config file must be found under the context directory, the directory the test case is running from, or in the classpath.
the approach as below:
protected void setUp() throws Exception {
super.setUp();
setContextDirectory(new File("WebRoot"));
}
the approach as below:
protected void setUp() throws Exception {
super.setUp();
setContextDirectory(new File("WebRoot"));
}