-
Notifications
You must be signed in to change notification settings - Fork 36
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
Question: Is support for Android's instrumented unit tests (connectedAndroidTest task) possible? #111
Comments
Hi, thanks for using this plugin. I haven't done any Android development so have a few questions for you. What is different about the instrumented unit tests that doesn't allow you to use the plugin? If it is due to an error, could you share it? |
Great question! I believe its due to the fact that these tests are required to run on an actual android device/emulator (since they interact with the Android system classes and require As far as I can tell, there are no logs reported when running these tests with your plugin enabled (I would assume the plugin is just not getting run or silently failing?) Are there logs I can check to validate this? Or can I just run the gradle task with |
Or, if you want to layout out a high-level overview of the different components of your plugin and how they work, I could try and apply that to how Android instrumentation tests work and try to dig deeper there. |
The plugin is quite simple in concept. It attaches a custom |
This will bring a tons of logs from Gradle, but it appears recently that build hangs until killed by CI. Activating the info log shows all the tests that are being run, including the successful ones. Hence when a run is blocked, we can now see what was the last ran test. It is unfortunate that plugin like https://github.com/radarsh/gradle-test-logger-plugin does not work for Android instrumentation tests: See radarsh/gradle-test-logger-plugin#111
After some investigations, I saw that the class responsible of logging Android tests status is So a possible workaround would be to inject a logger in such task, parse the logs (this seems pretty stable as nothing has change since few years) to get partial information, and delegate to your plugin Another solution could be to ask Google to add a way to inject a |
This will bring a tons of logs from Gradle, but it appears recently that build hangs until killed by CI. Activating the info log shows all the tests that are being run, including the successful ones. Hence when a run is blocked, we can now see what was the last ran test. It is unfortunate that plugin like https://github.com/radarsh/gradle-test-logger-plugin does not work for Android instrumentation tests: See radarsh/gradle-test-logger-plugin#111
This will bring a tons of logs from Gradle, but it appears recently that build hangs until killed by CI. Activating the info log shows all the tests that are being run, including the successful ones. Hence when a run is blocked, we can now see what was the last ran test. It is unfortunate that plugin like https://github.com/radarsh/gradle-test-logger-plugin does not work for Android instrumentation tests: See radarsh/gradle-test-logger-plugin#111
This will bring a tons of logs from Gradle, but it appears recently that build hangs until killed by CI. Activating the info log shows all the tests that are being run, including the successful ones. Hence when a run is blocked, we can now see what was the last ran test. It is unfortunate that plugin like https://github.com/radarsh/gradle-test-logger-plugin does not work for Android instrumentation tests: See radarsh/gradle-test-logger-plugin#111
This will bring a tons of logs from Gradle, but it appears recently that build hangs until killed by CI. Activating the info log shows all the tests that are being run, including the successful ones. Hence when a run is blocked, we can now see what was the last ran test. It is unfortunate that plugin like https://github.com/radarsh/gradle-test-logger-plugin does not work for Android instrumentation tests: See radarsh/gradle-test-logger-plugin#111
This will bring a tons of logs from Gradle, but it appears recently that build hangs until killed by CI. Activating the info log shows all the tests that are being run, including the successful ones. Hence when a run is blocked, we can now see what was the last ran test. It is unfortunate that plugin like https://github.com/radarsh/gradle-test-logger-plugin does not work for Android instrumentation tests: See radarsh/gradle-test-logger-plugin#111
This will bring a tons of logs from Gradle, but it appears recently that build hangs until killed by CI. Activating the info log shows all the tests that are being run, including the successful ones. Hence when a run is blocked, we can now see what was the last ran test. It is unfortunate that plugin like https://github.com/radarsh/gradle-test-logger-plugin does not work for Android instrumentation tests: See radarsh/gradle-test-logger-plugin#111
I'd also like to be able to use this plugin with instrumented Android tests, but I'm not sure what work needs to be done to support that. |
I'm currently using this plugin in an Android project, and it works great when running non-instrumented (JVM-only) unit tests.
I'm interested in getting the same pretty-printing functionality for instrumented unit tests on Android and I'm curious about a few things and wanted to get your opinion before diving in deeper:
(I haven't looked at the code yet, so apologies if any of this is obvious)
thanks in advance :)
The text was updated successfully, but these errors were encountered: