java.lang.NullPointerException
at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:331)
at servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:394)
at test.com.yesekicsek.input.TestLoginAction.testSuccessfulLogin(TestLoginAction.java:25)
And if I un-comment assertNotNull(getActionServlet()); line:
java.lang.NullPointerException
at servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:331)
at test.com.yesekicsek.input.TestLoginAction.testSuccessfulLogin(TestLoginAction.java:24)
In order to add the folder containing "WEB-INF" (which is "web" folder under the project root in a classic netbeans web app project setup) to the classpath, went to "Project Properties -> Libraries -> Run Tests -> Add JAR/Folder" and added "web" folder to classpath. But that didn't seem to be helping a lot.
Here is an overview of default netbeans web app project setup:
Hello everyone,
I have a classic Netbeans web app project setup. When I try to run simple login action test, it returns null-pointer-exception.
Code:
Output:
And if I un-comment assertNotNull(getActionServlet()); line:
Then I get the following:
In order to add the folder containing "WEB-INF" (which is "web" folder under the project root in a classic netbeans web app project setup) to the classpath, went to "Project Properties -> Libraries -> Run Tests -> Add JAR/Folder" and added "web" folder to classpath. But that didn't seem to be helping a lot.
Here is an overview of default netbeans web app project setup:
Any help would be really appreciated.
Thanks.