Reputation: 21
When using EvoSuite Eclipse Plugin to generate a test case for a class which extends HttpServlet in a Dynamic Web Project, I am getting the following error.
Those Chinese characters meanings "Windows can not find this file F:\Java\J2EEWorkspace\EvoSuiteTest\evosuite-tests\com\s...\TestServlet_ESTest.java
. Please try to check the file name again. ".
The code which will be generated by EvoSuite Eclipse Plugin are
package com.servlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class TestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public void service( HttpServletRequest request, HttpServletResponse response ){
System.out.println("I am a test...");
}
}
Upvotes: 1
Views: 1320
Reputation: 24
This problem can also be found in command line operation.In command line operation,we found jre lacks the jdk's tools.jar. If the jdk1.8/lib/tools.jar was put into jre8/lib/, the problem will be solved.
using EvoSuite plugin for eclipse on Windows 7 OS
Upvotes: 0
Reputation: 21
if we add the Servlet Container jars(eg. the jars in tomcat/lib ) into the project again in spite of the Server Runtime Library which have been added already ,the problem will be solved. I do not know what the reason is. It may be an Evosuite's bug.
Upvotes: 0