EvoSuite / evosuite

EvoSuite - automated generation of JUnit test suites for Java classes
http://www.evosuite.org
GNU Lesser General Public License v3.0
829 stars 340 forks source link

Evosuite | java.lang.NoClassDefFoundError javax/servlet/ServletRequest while trying to generate the test cases using 1.2.0 #428

Open PavanY1403 opened 2 years ago

PavanY1403 commented 2 years ago

Context

Please provide below a detailed introduction to the issue itself, and describe what you were doing when the issue happened. Or, what do you want to achieve? I am trying to create a test case using the evosuite 1.2.0 and jdk 11 for a simple class that has the Custom inject of SlingHttpServletRequest. I copied all the dependencies related to the project under target/dependency. When trying to create a test case Using Evosuite got the
java.lang.NoClassDefFoundError: javax/servlet/ServletRequest

Steps to Reproduce

Please break down here below all the needed steps to reproduce the issue. [If possible, please upload an example of the project you are generating tests for.]

1. 2. 3.

EvoSuite Arguments

Please provide the whole EvoSuite command you executed (if relevant)

java -jar /c/Projects/Evosuite/jar/evosuite-1.2.0.jar -class cms.caas.component.models.CaaSDocumentHeaderModel -projectCP :/c/Projects/cms/bundles/caas/target/classes:/c/Projects/cms/bundles/caas/target/dependency/javax.servlet-api-3.1.0.jar

Current Result

Please describe here below the current result you got (if relevant) [if relevant, include a screenshot]

Expected result

Please describe here below what should be the expected behaviour (if relevant)

Should generate the test cases

Additional info

Please add any information of interest here below