You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my opinion is the unit test documentation is mature.
On the other hand, I would like to see a more detailed documentation related to integration testing. Specially, how I can mock transitive dependencies with mockk in the component testing environment.
Example:
I test SampleController which depends on SampleService. In an @WebMvcTest(SampleController::class)-Test, how can I inject a mock of the SampleService into the SampleController, which is under integration test?
Context:
The bean SampleService Bean is not loaded in the test application-context with the @WebMvcTest-Annotation. Therefore, instead of dependency injection, I would like to do mock injection. Preferably with mockk mocks. I chose mockk to be in line with unit test mocking framework under kotlin.
The text was updated successfully, but these errors were encountered:
sbrannen
changed the title
Integration Test in reference documentation
Add integration test for Kotlin in reference documentation
May 12, 2019
sbrannen
changed the title
Add integration test for Kotlin in reference documentation
Add example integration test for Kotlin in reference manual
May 12, 2019
I'm currently using springmockk for doing the job. The technical issue was denied. I agree with the denial, but would appreciate, when the spring team gives another guideline to do the job.
I understand that the split can be sometimes confusing for developers, but we need to respect this split in our documentation. Maybe we could add more links from Framework to Boot documentation here @sbrannen ?
Affects: \5.2.0.M1
I just read the kotlin documentation for spring testing framework
In my opinion is the unit test documentation is mature.
On the other hand, I would like to see a more detailed documentation related to integration testing. Specially, how I can mock transitive dependencies with mockk in the component testing environment.
Example:
I test SampleController which depends on SampleService. In an
@WebMvcTest(SampleController::class)
-Test, how can I inject a mock of the SampleService into the SampleController, which is under integration test?Context:
The bean SampleService Bean is not loaded in the test application-context with the
@WebMvcTest
-Annotation. Therefore, instead of dependency injection, I would like to do mock injection. Preferably with mockk mocks. I chose mockk to be in line with unit test mocking framework under kotlin.The text was updated successfully, but these errors were encountered: