EvoSuite / evosuite

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

Is there some additional configuration to generate tests on multi-module maven project? #375

Closed jiseongg closed 2 years ago

jiseongg commented 3 years ago

Dear Evosuite community,

I'm a student researching on Java test generation and new in this community. I'm trying to run EVOSUITE via maven plugin, on real-world projects. According to the documentation Maven Plugin, I wrote script to update pom.xml of given project to make EVOSUITE available.

Here is my pom-to-add.xml in gist, all tag of which will be inserted to the proper location of default pom.xml.

I've run EVOSUITE on several open-source Java maven project, with specific commit id.

  1. Apache Commons Configuration
  2. Apache Aries JPA
  3. Apache Commons Collections
  4. Apache Log4J
  5. Apache PDFBox

And, the goal evosuite:generate runs well on 1, 3 but it fails on 2, 4, and 5, with similar error messages

No plugin found for prefix 'evosuite' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/jiseong/.m2/repository), central (https://repo.maven.apache.org/maven2)

It's weird because I've manually installed EVOSUITE on local repository from source code. I guess that it's because my configuration about evosuite-maven-plugin is wrong about 2, 4, and 5. All of them are different from the others in that their pom.xml is composed of multiple module. Is there any way to run evosuite on such project?