Replies: 1 comment
-
This idea is used in Spring specific test generation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Purpose
Spring and other dependency injection instruments are generating classes without explicit object instantiating.
A solution is required to perform symbolic analysis or/and test generation for such cases.
Usage example
There is a method call:
A.foo(B, C, D)
If detect that A and B are objects of Singletons and fix their state - tests can be generated with modifying C and D only.
Impediments
Spring context configuration can be made in different formats: XML-files (can be in different places) or special annotations.
There can be a number of contexts (for different products with common interface).
Idea
Give the user possibility to specify the context.
Special init-method can be added with @UTBotInit annotation configuring the context for tests generation.
Other impediments
There can be various context definition mechanisms for Dependency Injection tools.
For example, classes are changed after instantiating - their fields are changed according to the special resource files (can be JSONs or properties).
Beta Was this translation helpful? Give feedback.
All reactions