Hugh
Hugh

Reputation: 21

Error in generating test cases when using EvoSuite Eclipse Plugin

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.

enter image description here

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

Answers (2)

dinodrits
dinodrits

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

Hugh
Hugh

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

Related Questions