-
Notifications
You must be signed in to change notification settings - Fork 168
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
Golden Testing with Widgetbook #678
Comments
Hello @vHanda! 👋 Apology for how late it took us to start working on this, we were busy stabilizing Widgetbook 3 before we start adding any new features. We liked your proposal a lot, and many other community members requested this feature as well. So we've decided that Golden Testing Support will be our next big feature in Widgetbook. We would be happy to hear more from you about your expectations, so we would like to invite you to our Discord channel to help us shape this feature and give us some feedback on our approach. |
@YoussefRaafatNasry What is state of this issue? When are you going to support this functionality in Widgetbook? |
@mjablecnik thanks for asking! This functionality is already supported today if you're using Widgetbook Cloud. Just push your builds via CI to Widgetbook Cloud, and we automatically generate your Golden Tests and provide you with a structured review process. Here, you can find a link to an interactive demo (our review feature including golden testing is featured at the end of the demo). Golden Test support will be added to our open-source package in Widgetbook 4. However, it's currently hard to estimate a timeline for this. We'll keep everyone informed via this thread! Please let me know if you have any questions. Happy to help! |
@LucasJosefiak I tried to login there into your Widgetbook Cloud but instead of login credentials I received email about waiting list: So my first question is: When will be possible to go into your Widget Cloud? Right now I am considering of using widgetbook or flutter_storybook for development of my widgets in the future and availability creation of golden tests is one from my requirements.. |
Thanks for asking!
|
One of the main reasons, I'm not going to move to WidgetBook3's annotations, is cause every screen / component of mine has a respective golden test.
Having such a large amount of golden tests is wonderful as I can quickly see what screens have changed with any change. I do a simple
make goldens
, which runs this -Additionally, I have my terminal supports sexel (showing images), and therefore I just run a 'git diff' and get to see the before and after. Please see the screenshot below -
Right now, I do this by having a simple class -
And both my golden tests and widgetbook tests are generated from this one large file that all the test information.
I think it would be much better, if golden tests could be generated from the annotations directly. This way, I wouldn't have 1 file called
golden_tests.dart
, and would instead have lots of individual files. This would result in a big performance boost as the tests could be parallelized (some quick experiments reduced the runtime by about 40% by splitting them into multiple files).I now use such a setup in 3 of my projects, and plan to for all future Flutter projects as well.
The text was updated successfully, but these errors were encountered: