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

Why evosuite doesn't generate tests for container classes? #331

Closed neelofarhassan closed 3 years ago

neelofarhassan commented 3 years ago

Hello,

I have noticed that java package is listed in "excluded.classes" file. I was wondering what is the reason behind excluding these and other classes?

I believe that it is Important to generate tests for container classes as there are some studies which have used containers and it would be useful to include these classes in the current studies along with more sophisticated and complex benchmarks like SF110 for comparison purposes.

apanichella commented 3 years ago

EvoSuite internally uses some libraries (e.g., JaCoCo). Therefore, at runtime, EvoSuite will include those libraries (with a specific version) in the classpath. If we target those libraries as Software Under Tests (SUT), we would have two (or more) clashing versions at runtime with all related issues with the classpath.

While EvoSuite uses "shaded" Java dependencies, handling multiple versions of the same libraries at runtime is quite complex. As such, EvoSuite cannot be used to generate test cases for the classes that it internally uses (and reported in the excluded.class file)

neelofarhassan commented 3 years ago

It definitely makes sense. Thanks for the clarification.