-
Notifications
You must be signed in to change notification settings - Fork 6
Rn/upload screenshots #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerService.kt
Outdated
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerServiceImpl.kt
Outdated
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerServiceImpl.kt
Outdated
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerServiceImpl.kt
Outdated
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerService.kt
Outdated
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerServiceImpl.kt
Outdated
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerServiceImpl.kt
Outdated
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerServiceImpl.kt
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerService.kt
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerService.kt
Show resolved
Hide resolved
AndroidXCI/lib/src/main/kotlin/dev/androidx/ci/testRunner/TestRunnerServiceImpl.kt
Show resolved
Hide resolved
| val testName = testNames.keys.find { testName -> | ||
| visitor.fileName.startsWith(testName) | ||
| } | ||
| val testIdentifier = testNames[testName] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work fine if testName is null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, checking if testIdentifier is null in the next line. So, I believe this should be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i was wondering what happens with testNames[null].
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/get.html
get is declared to receive K which is nonNull here, idk the implementation but we are passing a nullable value to a non-null key.. not sure why compiler doesn't complain about this :/. do we have a test that covers testName being null here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, there are tests which basically cover this scenario. But, I have also more files to make sure this scenario is fully covered.
Here's the output for different files:
filename = redfin-30-en-portrait-test_results_merged.xml
testName = null
testIdentifier = null
filename = logcat
testName = null
testIdentifier = null
filename = test_result_1.xml
testName = null
testIdentifier = null
filename = test_result_2.xml
testName = null
testIdentifier = null
filename = 0000_logcat
testName = null
testIdentifier = null
filename = 0001_logcat
testName = null
testIdentifier = null
filename = class1_name1_emulator_actual.png
testName = class1_name1
testIdentifier = TestIdentifier(className=class1, name=name1, runNumber=0)
filename = class1_name1_emulator_diff.png
testName = class1_name1
testIdentifier = TestIdentifier(className=class1, name=name1, runNumber=0)
filename = class1_name1_emulator_expected.png
testName = class1_name1
testIdentifier = TestIdentifier(className=class1, name=name1, runNumber=0)
filename = class1_name1_emulator_goldResult.textproto
testName = class1_name1
testIdentifier = TestIdentifier(className=class1, name=name1, runNumber=0)
filename = class5_name5_emulator_goldResult.textproto
testName = null
testIdentifier = null
filename = redfin-30-en-portrait-test_results_merged.xml
testName = null
testIdentifier = null
filename = logcat
testName = null
testIdentifier = null
filename = test_result_1.xml
testName = null
testIdentifier = null
filename = test_result_2.xml
testName = null
testIdentifier = null
filename = 0000_logcat
testName = null
testIdentifier = null
filename = 0001_logcat
testName = null
testIdentifier = null
filename = class1_name1_emulator_actual.png
testName = null
testIdentifier = null
filename = class1_name1_emulator_diff.png
testName = null
testIdentifier = null
filename = class1_name1_emulator_expected.png
testName = null
testIdentifier = null
filename = class1_name1_emulator_goldResult.textproto
testName = null
testIdentifier = null
filename = class5_name5_emulator_goldResult.textproto
testName = null
testIdentifier = null
filename = redfin-30-en-portrait-test_results_merged.xml
testName = null
testIdentifier = null
filename = logcat
testName = null
testIdentifier = null
filename = test_result_1.xml
testName = null
testIdentifier = null
filename = test_result_2.xml
testName = null
testIdentifier = null
filename = 0000_logcat
testName = null
testIdentifier = null
filename = 0001_logcat
testName = null
testIdentifier = null
filename = class1_name1_emulator_actual.png
testName = null
testIdentifier = null
filename = class1_name1_emulator_diff.png
testName = null
testIdentifier = null
filename = class1_name1_emulator_expected.png
testName = null
testIdentifier = null
filename = class1_name1_emulator_goldResult.textproto
testName = null
testIdentifier = null
filename = class5_name5_emulator_goldResult.textproto
testName = null
testIdentifier = null
Upload screenshot files to ants.