Instrumentation tests with ANDROIDX_TEST_ORCHESTRATOR
: Parameterized tests give issues
#337
Labels
ANDROIDX_TEST_ORCHESTRATOR
: Parameterized tests give issues
#337
I have two issues to report when running instrumentation tests while using the Android Test Orchestrator. Feel free to tell me to split these up into two issues - happy to do so!
I've repeatedly tested this with version
1.10.0.0
and1.10.2.0-SNAPSHOT
of the plugin.If I disable the Android Test Orchestrator (by simply commenting out
execution = "ANDROIDX_TEST_ORCHESTRATOR"
), it all behaves as it should - exactly as the local tests do.While the Wiki says to use
@UseTechnicalNames
, I've not needed it so far. Annotating the test class with that does not resolve the issues reported here.Test Class
Works: Local Test
When running the tests for that whole class as a local test, the following is displayed in Android Studio:
![image](https://private-user-images.githubusercontent.com/294347/337587452-fa1d5b09-76d0-43f7-a00f-4283da8c1968.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMTc4NTksIm5iZiI6MTczOTExNzU1OSwicGF0aCI6Ii8yOTQzNDcvMzM3NTg3NDUyLWZhMWQ1YjA5LTc2ZDAtNDNmNy1hMDBmLTQyODNkYThjMTk2OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQxNjEyMzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04NzJmMWY5ZTUyNjNmZWE0M2U0ODlmZTM3OTIxMzQwMGM5NzFlMDk3MzU1N2I3MGM4Nzg0MDg3M2FiZWVkNmMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9fflxVIodIdwFH6kUiLNApwQiBDNHqnme3B3QFxg7lU)
It also works when executing all tests for the whole package, or individual test methods.
Fails: Run Class/Package As Instrumentation Test
However, if we run that same class (renamed to
![image](https://private-user-images.githubusercontent.com/294347/337588002-bf149ac7-5392-476c-92d3-123ada82a26b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMTc4NTksIm5iZiI6MTczOTExNzU1OSwicGF0aCI6Ii8yOTQzNDcvMzM3NTg4MDAyLWJmMTQ5YWM3LTUzOTItNDc2Yy05MmQzLTEyM2FkYTgyYTI2Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQxNjEyMzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZWQyY2YyYmQxMTUwMzNlMTIwNjQzOWNiZDUyZWM5ODQ4NmQ4YjYwMzhiYTNkODFkYWQ1ZWFiNDgyYzU2MmE3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.H24s9kmw4K13gurxts4_BzSNfATlKOP7BvUf9hWHGp8)
MyTest
in the screenshot below) or the whole package its in as an instrumentation test, we first get no results at all:If we check logcat, we can find this:
Note: We see a similar exception in logcat when we change one of the test methods to take a
String
together with@ValueSource
. It will then sayInvalid test class 'java.lang.String'
instead.Kinda Works: Wrong Names When Running Method
If we however run each test individually, it works, although the names are not as expected:
![image](https://private-user-images.githubusercontent.com/294347/337589222-21044e27-08cc-4f91-b082-9ea8d3f02081.png?jwt=eyJhbGciOiJIUzI1NiI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RaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQxNjEyMzlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MDkyOTg4ZTE4NWFlYzgwYzc1NTViNzZhMzZlYmVlYWFkZTNiYmI1MjJkYzUxMGM3NDAyZWU2ZGExYzU4Y2IyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.eFH9eA-zqaehEWlCtRPDIC6NjcGA6YKlaoZBFZVrTW0)
The text was updated successfully, but these errors were encountered: