-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Introduce regression test suite for Android ecosystem #2341
Comments
I found out that it's because of new Kotlin compiler backend. |
For anyone who is interested in contributing, the regression test suite should have minimal impact on our toolchain and setup, while still catching the most basic issues. |
@TimvdLippe |
@chaehwanli We want to have regression tests that will fail if we were to break use cases such as #2327 In the simplest terms, we want to have the following regression test added to our project: class DummyTest {
@Test
fun test() {
Mockito.mock(Foo::class.java)
}
} This test should pass with all the required Android ecosystem dependencies and if we were to break it again, the test should fail accordingly. |
I've started looking at this but not got very far. One challenge is that an Android project is essentially incompatible with a standard Java/Kotlin parent. We can certainly create an Android project within the parent structure, i.e. an 'androidTest' folder here, but it would need to be opened separately with Android Studio and it would have no knowledge of its parent. Therefore it would need to reference some Mockito artefact(s), just like any other consumer, and I imagine that normally when you're running these tests, you would expect it to link to the development version of Mockito rather than having to publish somewhere first. Publishing is feasible - in my work, we use a local Maven repo to publish snapshot builds from one project and then reference them in another - but I don't want to unilaterally impose a particular workflow. I think we would benefit from a high level discussion outside of this issue back-and-forth - a call or something - if you can make some time available. |
@robpridham-bbc Ah thanks for taking a look at this! I have time this week to chat through this and I think we are both in the UK timezone. Could you send me an email to me to discuss potential timeslots? |
As part of #2341 Co-authored-by: Tim van der Lippe <tvanderlippe@google.com>
Per #2340 (comment)
We should work on a test suite to prevent issues such as #2316 #2327 and #2340. Ultimately this should then also catch issues that arise in ByteBuddy with the bytecode magic that Mockito implicitly depends on.
CC @robpridham-bbc
The text was updated successfully, but these errors were encountered: