-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Android testing broken since Gradle 4.2 #3006
Comments
Might be a good enhancement to Is this happening with 4.2 GA as well? Would you consider this a regression in Gradle core? If yes, can you please provide a sample project? |
Yes I would!
…On Sep 22, 2017 4:45 PM, "Benjamin Muschko" ***@***.***> wrote:
Might be a good enhancement to org.gradle.smoketests.
AndroidPluginsSmokeTest. Would you be interested in contributing?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3006 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABqMSA1Fs9tBGuw41Oq_hfrGFaBKrUHMks5slEaJgaJpZM4Pg9VN>
.
|
Currently 4.1 works well, I have an example test project here: https://github.com/jaredsburrows/android-gif-example. I am not sure whether or not to consider this apart of core or not. I can reproduce the error in this project/branch that is apart of that repo in a PR here: jaredsburrows/android-gif-search#41. |
@bmuschko It looks like Xavier marked this issue as fixed in the Android tracker: https://issuetracker.google.com/issues/65869429. Maybe this was an AGP problem? I still think that we should have some integration tests for this. |
We definitely should update our tests to check against the latest agp versions. |
Is Gradle 4.2 supposed to be compatible with AGP 2.3.x or only AGP 3.x? I am asking because I got this issue with AGP 2.3.2 (also tried 2.3.3) after updating Gradle from 3.5 to 4.2. |
@jaredsburrows Thanks for providing the sample project. I could reproduce the issue you reported with your sample project and an emulator. I believe to automate an integration test, we'd have a configured emulator first. When starting the test, we'd have to bring up the emulator, run the test and then tear it down again. I am currently looking into that.
Which Travis file are you referring to? We are running the Android smoke tests on TeamCity.
I believe that is done in the infrastructure of the agents but I'd have to check. |
This is what I believe is happening: When running the example project I get the following stack trace:
The stack trace indicates that the class
The line 60 in
We can find the following hierarchy of parent classes for
The class
The change between 4.1 and 4.2 was a breaking change even though it was an internal API. Given that the class also became an interface I don't think we can just move back the class. I'd suggest that the Android plugin implements its own time formatting along the lines of Apparently the Android team already fixed the issue though I do not know with what version and how. I left a comment in the bug report. |
The Android team fixed it for 3.0, but 2.3 remains broken. I suggest we restore the old DurationFormatter class, add |
@oehme I already started to refactor existing Android smoke tests and set up unit/instrumented tests in this branch |
Sadly "android tests" and not "unit tests" have to run on a device or an emulator.
Sorry, I just assumed Travis.
If I update the build tools/sdk, will it break your current build? I just want to make sure if we upgrade to the latest release, the build server is ready. |
Awesome. Just now catching up on this thread, it looks like @bmuschko is going to go ahead and update the existing smoke tests? |
Yes, the tests have been adjusted together with the fix, see the linked Pull Request. |
@jaredsburrows I think there's more we can do to cover unit and instrumented testing. Feel free to have a look at my branch and create a PR to improve even more. |
@jaredsburrows I'd wait for @oehme's PR to be merged. After that you can create a new PR. I'd just copy/paste the changes you think are useful from my branch. |
Sounds great, thanks! |
The fix has been merged into release. |
This issue seems to be resolved in Gradle 4.3-rc-1. |
It was fixed in 4.2.1.
…On Oct 13, 2017 8:43 AM, "Igor Ganapolsky" ***@***.***> wrote:
This issue seems to be resolved in Gradle 4.3-rc-1.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3006 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABqMSE6VB2pMFj4o0TtuKcDa2XUXJMpfks5sr4UEgaJpZM4Pg9VN>
.
|
Based on this reddit post: https://www.reddit.com/r/androiddev/comments/71c1sz/gradle_42_released/ and https://issuetracker.google.com/issues/65869429.
Gradle 4.2 broke espresso/instrumentation tests for Android Gradle Plugin.
Expected Behavior
The tests should run.
Current Behavior
Steps to Reproduce (for bugs)
./gradlew connectedDebugAndroidTest
Your Environment
Gradle 4.2-rc-2 (happens on 4.1 as well)
Gradle Android Plugin version 3.0.0-beta6 (happened on beta2 as well)
Compile SDK version: 26
Build tools version: 26.0.1
Sdk tools version: 26.1.0
Possible solution
Could we add a single unit test and instrumentation test case for Gradle? This way we can ensure the latest Gradle releases work with existing versions of the Android Gradle plugin.
The text was updated successfully, but these errors were encountered: