Does anyone know how to access the test.parameters
key-value pairs passed as input to the ScheduleRun API?
This is what I am doing:
test.filter
.test.parameters
. I have ensured it is a valid JSON object.yaml
file, so a "standard" test run gets triggered on DeviceFarm.Here is my code that I use to retrieve the data:
final Bundle bundle = InstrumentationRegistry.getArguments();
for (final String key : bundle.keySet())
{
final Object obj = bundle.get(key);
Log.i(TAG, "Key - '" + key + "' ; Value - '" + obj.toString() + "'");
}
I know the test.filter
part works because the InstrumentationRegistry.getArguments()
bundle is able to retrieve the class
value which is the test that needs to be run. Unfortunately, the test.parameters
values are not present in the bundle.
Is there anything that I am missing or should I use some other mechanism to retrieve the test.parameters
?
Got confirmation from the AWS team that, at this point, they don't support this feature for Custom environments.