Ok I feel like I am doing something wrong. I have ...
# android
a
Ok I feel like I am doing something wrong. I have this “All In App” thing that I can run https://imgur.com/a/E4hnH47 which runs all my unit tests both in test and android Test however if any of them fail (which some do) I run them on there own sometimes they pass and sometimes they dont. if they dont and I change something I have to run them individually then I can run the All In App to see the changes??? Also why do they sometimes work and sometimes not?
k
I have seen 2 scenarios where tests fail randomly - 1. timing issues, 2. test execution order (due to shine through of state somewhere)
a
Here is an example where it fails (when I run all)
And passes individually
But the bigger question is why do I have to run a test individually for the all test to actually run the updated code?
k
is your all test configuration set to build before running tests?
a
how would I check that?
k
Edit Configuration in the configuration dropdown at the top
a
Sorry I dont see where your speaking of?
Screen Shot 2019-03-27 at 11.05.28 AM.png
k
see Gradle aware make in the before launch section. compare a configuration that works with one that doesn't
a
You mean here?
Is that also why my gradle builds every time I run
Hmmm odd cause the Gradle aware Make is there and its the same on all of them (Yet I need to add Build to have it actually build) I dont on others?
c
I don't believe you can have a single configuration for running both Unit & Instrumented tests, as they have different build targets
You could set up a gradle task that does both I think
a
These Do run both (but it seems that it runs the Android Test as just Tests (not sure why its running both)
As you can see both are being run. Would love to be able to have one that runs both (properly) one that runs just android test and one that just runs unit tests
Ideally
k
that's the whole premise of Project Nitrogen
but it's not released yet
seems like Google is finally investing some much needed focus on testing
a
yeah good 🙂 I remember hearing them announcing it I thought it was out last year.