jeudi 31 août 2017

What is Android Test Orchestrator?

Google released Android Testing Support Library 1.0 recently. After reading the overview, I'm a little confused with Android Test Orchestrator.

It said

Typically, AndroidJUnitRunner runs all tests in the same instrumentation process, which can cause a number of problems.

Can you explain which kinds of problems will be caused by using the same instrumentation process?

if one test crashes, it prevents the remainder of the test suite from running

Through my experience, one test crash won't prevent from other test cases from running. Please point out what I misunderstood here?

And from Android Testing Orchestrator developer guide,

For completeness, Android Test Orchestrator runs pm clear after each test.

So Android Test Orchestrator will run pm clear [test_package_name] after each test, right?

Through my test, pm clear [app_package_name] won't be executed after each test. That means the data of application under test will not be cleared. So test cases might still have dependencies on each other. For example:

  • Test case A stores a SharedPreference key-value
  • Test case B which runs after test case A can read out the value stored by test case A

Overall, after some trial, I did not find any advantage of Android Test Orchestrator. Can somebody help to address my confusion? Thanks.

Aucun commentaire:

Enregistrer un commentaire