roboDirectives are ignored when running in FTL
changusmc opened this issue · comments
Describe the bug
A clear and concise description of what the bug is.
--robo-directives
is one of the two flags that Firebase Test Labs allows for Robo Tests to be ran. Flank currently supports --robo-script
. Flank doesn't allow for both flags to be set at the same, but when only robo-directives
is set whether thru the YAML or CLI, it's unused when determining the type in test_runner/src/main/kotlin/ftl/run/platform/android/ResolveApks.kt
. The code will determine that it is a SanityRoboTestContext
which will then ignore the roboDirective
even though it is passed in by the caller.
To Reproduce
Steps to reproduce the behavior:
- java -jar flank.jar firebase test android run --robo-directives=click:$your_resource=,text:$your_resource=$username,text:$your_resource=$password
- Set a breakpoint in ResolveApks and observe the type is
SanityRoboTestContext
- Running with
--debug
also confirms the robo-directive is not in the http request
Jan 27, 2022 5:40:35 PM com.google.api.client.util.LoggingByteArrayOutputStream close
CONFIG: {
"testMatrixId": "foo",
"testSpecification": {
"testTimeout": "60s",
"androidRoboTest": {
"appApk": {
"gcsPath": "bar"
},
"roboMode": "ROBO_VERSION_2"
},
"testSetup": {
"directoriesToPull": [
"/sdcard",
"/storage/emulated/0/Download/"
]
}
},
"environmentMatrix": {
"androidDeviceList": {
"androidDevices": [
{
"androidModelId": "blueline",
"androidVersionId": "28",
"locale": "en_US",
"orientation": "portrait"
}
]
}
},
- The video shows that it is not executing the commands set in the directives
Expected behavior
A clear and concise description of what you expected to happen.
Expectation is that Robo Test follows the script passed in
Details (please complete the following information):
Have you tested on the latest Flank snapshot?
Yes
Post the output of
flank --version
.
android ➤ java -jar /Users/changd/dev/flank/test_runner/build/libs/flank.jar --version
version: local_snapshot
revision: 8fb4ca3
session id: b342059b-e68e-4191-94f9-2f442ca76091
Total run duration: 0m 0s
Also tested on the latest release
Additional context
Add any other context about the problem here.
I can put up a PR with something that fixes it, whether it passes your code review is another question.
@bootstraponline I tested on the master snapshot and the directives are working now.
The roboscript continues to work as before.
Thanks for making a release!