-
Notifications
You must be signed in to change notification settings - Fork 47
Extend Java API for Spring-aware generation #2614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend Java API for Spring-aware generation #2614
Conversation
1b40139
to
49b7bad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UtBotJavaApi.generate()
method should also accept ApplicationContext
, it should be the same applicationContext
instance that was earlier passed to generateTestSets()
or fuzzingTestSets()
, preferably to guarantee that same applicationContext
instance is used for both methods it should be injected into UtBotJavaApi
via a constructor and not individually passed to every method.
CodeGenerator
should be created with applicationContext.createCodeGenerator(...)
(similarly to how it's done in EngineProcessMain
), UtExecutionInstrumentation.Factory
for ConcreteExecutor
should be created with applicationContext.createConcreteExecutionContext(...).instrumentationFactory
(simillarly to how it's done TestCaseGenerator
).
utbot-framework/src/main/kotlin/org/utbot/external/api/UtBotJavaApi.kt
Outdated
Show resolved
Hide resolved
49b7bad
to
02764a4
Compare
02764a4
to
f26b7a7
Compare
f26b7a7
to
7605bdc
Compare
7605bdc
to
05448aa
Compare
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-testing/src/main/java/org/utbot/api/java/AbstractUtBotJavaApiTest.java
Show resolved
Hide resolved
utbot-testing/src/main/java/org/utbot/api/java/AbstractUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
05448aa
to
174a1d2
Compare
174a1d2
to
ca9284c
Compare
ca9284c
to
4504978
Compare
4504978
to
ba9071e
Compare
utbot-framework/src/main/kotlin/org/utbot/external/api/UtBotJavaApi.kt
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
ba9071e
to
a819d13
Compare
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
a819d13
to
d407311
Compare
d407311
to
e2edbce
Compare
utbot-spring-test/src/test/java/org/utbot/api/java/SpringUtBotJavaApiTest.java
Outdated
Show resolved
Hide resolved
utbot-framework/src/main/kotlin/org/utbot/external/api/UtBotJavaApi.kt
Outdated
Show resolved
Hide resolved
9f54992
to
061f015
Compare
061f015
to
60081eb
Compare
Description
Fixes #2613
Add more info if needed:
How to test
Implement some simple logic or execute the automated example.
Automated tests
utbot-spring-test/src/test/java/org/utibot/examples/spring/SpringUtBotJavaApiTest.java
Manual tests
No manual tests
Self-check list
Check off the item if the statement is true. Hint: [x] is a marked item.
Please do not delete the list or its items.