-
Notifications
You must be signed in to change notification settings - Fork 15
Instrumentation
Yun Lin edited this page Nov 3, 2020
·
1 revision
The class for static instrumentation: org.evosuite.instrumentation.BytecodeInstrumentation
.
It is common that we need to instrument more branches than expected during runtime. However, it is challenging to modify the bytecode of a Java class which have been loaded into JVM. Here, we support this function by creating new classloaders. Each time we require new instrumentation for certain class or method, we create a new classloader, and force evosuite++ to run test cases under this classloader. A typical example is we apply TestCaseLegitimizer (org.evosuite.testcase.synthesizer.TestCaseLegitimizer) to legitimize a test case so that its invoked target method is reachable.
Readers can check the commit a2300be
for examples.