I have a project and have many modules inside it, and each module has unit tests and instrumentation tests. Every time I run a test I have to set the the target module in the configuration. Which is tiring to do.
Is there any gradle command to run all modules tests in one run?
btw, I can run in terminal this command. But can execute it one by one.
./gradlew module-a:connectedAndroidTest
./gradlew module-b:connectedAndroidTest
./gradlew module-c:connectedAndroidTest
Thanks
To run all the tests in a default group, choose the Run icon and then choose the group on the menu. Select the individual tests that you want to run, open the right-click menu for a selected test and then choose Run Selected Tests (or press Ctrl + R, T).
Run all Python tests in a directoryFrom the context menu, select the corresponding run command. If the directory contains tests that belong to the different testing frameworks, select the configuration to be used. For example, select Run 'All tests in: <directory name>' Run pytest in <directory name>'.
Run all tests in a single classRight click on a test class name in the editor (or a filename in the project explorer) to run all tests in a single class. The default keyboard shortcut for this is Ctrl+Shift+F10 on Linux. I suggest you map it to something easier to remember like Ctrl+Alt+R.
The following command:
gradlew test connectedAndroidTest
Should run all you unit and instrummented tests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With