-
Notifications
You must be signed in to change notification settings - Fork 38
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
[IDE Plugin] More flexible screenshots paths detection #467
Comments
Thank you for using Roborazzi! "results": [
{
"golden_file_path": "xxx/git/conference-app-2024/feature/profilecard/build/outputs/roborazzi/ProfileCardScreenTest[ProfileCardScreen - when profile card is not found - input nickname - input occupation - click create button - click edit button - it should show edit screen].png",
"timestamp": 839363151954000,
"context_data": {
"roborazzi_description_class": "io.github.droidkaigi.confsched.profilecard.ProfileCardScreenTest"
},
"type": "recorded"
},
{
"golden_file_path": "xxx/git/conference-app-2024/feature/profilecard/build/outputs/roborazzi/ProfileCardScreenTest[ProfileCardScreen - when profile card is not found - input nickname - input occupation - click create button - click edit button - it should show edit screen].png",
"timestamp": 839363091096916,
"context_data": {
"roborazzi_description_class": "io.github.droidkaigi.confsched.profilecard.ProfileCardScreenTest"
},
"type": "recorded"
}
] |
I've created a issue for this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@takahirom Thank you so much for library and all the collaborators.
Problem: by default, IDE plugin looks for screenshot names by next pattern:
{selected screenshots folder in settings}/{Test class name}.{Test name}.png
If I change this pattern, IDE Plugin breaks, it could not resolve paths to generated screenshots.
Consider the next case:
I have test class:
And I want to store screenshot of this test in path:
src/test/screenshots/com.test.TestClass/myTest.png
IDE plugin would not detect location of this screenshot and show empty window when focused on it.
Possible solution as I see it:
Generate some mapping file for IDE plugin, where key is full-qualified test name and value is path to screenshot.
Mapping file will be edited on each captureRoboImage()
Possible example of mapping in this case in JSON format:
We could store it in some location of build directory, for example, build/intermediates/roborazzi
And look for screenshot path by testName key.
It's will be also nice to have ability to disable mapping file generation, for example, via gradle plugin extension property to reduce possible performance affects on CI.
@takahirom What do you think about this solution?
The text was updated successfully, but these errors were encountered: