EvoSuite / evosuite

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

EvoSuite JEE support #312

Open rachelt44 opened 4 years ago

rachelt44 commented 4 years ago

A general question about EvoSuite JEE support.

I can see that dependency injection is added when the class under test is annotated according to JEE semantics, or when an annotated class is being constructed in the test code. However it seems that dependency injection will not occur for annotated code that is not directly called by the test code (but rather called implicitly by methods that appear the test code). That is, if a method m of class A calls a method n of annotated class B, and only the call to m appears in the test, the annotations of B will not be handled, resulting in null pointer exceptions. Is this indeed the case? If so, are there ways to overcome this problem besides targeting all classes?