Android Test Orchestrator not working with Android X

For anyone else struggling with the Cannot convert string value 'ANDROIDX_TEST_ORCHESTRATOR' to an enum value of type 'com.android.builder.model.TestOptions$Execution' (valid case insensitive values: HOST, ANDROID_TEST_ORCHESTRATOR) error message, ANDROIDX_TEST_ORCHESTRATOR seems to be incompatible with the latest version of IntelliJ (2018.3.5), it worked fine in Android Studio (3.3.2).


Purely by guessing, I changed the following in my gradle config

from:

  testOptions {
    execution 'ANDROID_TEST_ORCHESTRATOR'
  }

to

  testOptions {
    execution 'ANDROIDX_TEST_ORCHESTRATOR'
  }

and all seems to work.