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
Support skipping fresh install #142
Comments
Ironically, the '--no-build' option was created as a result of an issue I opened (flutter/flutter#28662) for another project. 😄 I usually like to describe the use case(s) adding a feature covers and how it should be used. In this case it seems that there is a clear performance advantage in using this feature if re-running screenshots locally (when not in CI). So adding an option to enable this feature from the command line would seem to be the way to go. For example,
Would this work for you? Can you elaborate on any other use cases if any (for example, native permission dialog blockers)? |
My immediate use case is to work around native iOS permission notifications. In this case, my plan is to install the app, use a command to accept the permissions, then run the screenshots tests. We might also have backend web service changes that need to be tested against a previously installed app to make sure nothing broke. It would not be necessary to rebuild the app in this case. |
Both use cases seem to be ones that are run locally (and not in a CI environment). So implementing by passing a parameter from the command line (as described above) seems like the way to go. Please confirm. |
These would mostly be run in a CI env but also manually as needed. The additional command line parameter would be perfect for us!! Thanks so much and it's funny how you wrote up the initial issue related to '--no-build'. |
On reconsideration: Would a config in screenshots.yaml still work for you? |
That would work as well! |
Implemented!
For usage, see https://github.com/mmcc007/screenshots/blob/%23142-no-build/README.md#device-parameters. Please let me know how it goes. |
Works perfectly! Very fast and works as expected |
Great! Thanks for confirming. I could also add it to the command line to globally over-ride any settings in screenshots.yaml. Please let me know if you think this would also be useful or just over-kill for your use case, or in general. |
Actually, that would be useful as well so we don't need to modify our source for a specific version when doing regression testing. We consider our configs part of that "version" with the app itself. |
Added support from command line.
See usage at Please let me know how it goes. |
It works, but I wasn't immediately sure how to use the command. Does --[no-]build mean it could be --no-build or --build? What if you do --no-build false? Is that the same as --build true? This is due to the wording of the flutter command, but users will likely have to try each command to make sure. This might be just tweaking the docs slightly. Maybe (and this is a different item completely) it would be helpful for screenshots to print the options it's using. Thank you so much!! Fantastic tool!! |
I know what you mean. Changed invocation from command line to make it consistent with how it is used in config file. Added no build messaging. Try it out with:
See usage at Please let me know how it goes. |
Looks good! |
Great!. If there is nothing else will merge and close. Thanks for your feedback, confirmations and affirmations. If you like screenshots, you oughta put a star🌟 on it! 😂 |
Flutter added a parameter: "flutter drive --no-build" to allow running on a preinstalled app and not re-building/installing. This would be useful for a number of reasons including working around native permission dialog blockers.
flutter/flutter#30818
The text was updated successfully, but these errors were encountered: