{"id":32294152,"url":"https://github.com/dopecoder/fest","last_synced_at":"2026-02-21T16:02:42.081Z","repository":{"id":61973237,"uuid":"382066424","full_name":"dopecoder/fest","owner":"dopecoder","description":"fest is a simple snapshot testing utility for flutter inspired by Jest. Perform integration testing and compare snapshots ranging from Screenshots, Render Tree and Layer Tree.","archived":false,"fork":false,"pushed_at":"2021-07-01T20:17:32.000Z","size":4215,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-02T15:11:28.459Z","etag":null,"topics":["e2e-testing","flutter","flutter-package","integration-testing","jest","snapshot-testing"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dopecoder.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-01T14:49:09.000Z","updated_at":"2022-10-14T19:21:16.000Z","dependencies_parsed_at":"2022-10-24T13:30:31.467Z","dependency_job_id":null,"html_url":"https://github.com/dopecoder/fest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dopecoder/fest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecoder%2Ffest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecoder%2Ffest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecoder%2Ffest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecoder%2Ffest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dopecoder","download_url":"https://codeload.github.com/dopecoder/fest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dopecoder%2Ffest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29685044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["e2e-testing","flutter","flutter-package","integration-testing","jest","snapshot-testing"],"created_at":"2025-10-23T03:40:04.694Z","updated_at":"2026-02-21T16:02:42.076Z","avatar_url":"https://github.com/dopecoder.png","language":"Dart","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://www.github.com/dopecoder/fest\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/dopecoder/fest/master/images/fest.png\" alt=\"Markdownify\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  Fest\n  \u003cbr\u003e  \n  Flutter Snapshot Testing\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\nA simple snapshot testing utility for \u003ca href=\"https://flutter.dev/\" target=\"_blank\"\u003eflutter\u003c/a\u003e inspired by \u003ca href=\"https://jestjs.io/\" target=\"_blank\"\u003eJest\u003c/a\u003e. Perform integration testing and compare snapshots ranging from Screenshots, Render Tree and Layer Tree.\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pub.dev/packages/fest\" rel=\"nofollow\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/dopecoder/fest/master/images/pub-badge.svg\" alt=\"Pub Version\" data-canonical-src=\"https://raw.githubusercontent.com/dopecoder/fest/master/images/pub-badge.svg\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://gitter.im/fest-flutter/community\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/dopecoder/fest/master/images/gitter.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://saythanks.io/to/nramarao@hawk.iit.edu\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.paypal.me/NithinRao\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026amp;style=flat\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#key-features\"\u003eKey Features\u003c/a\u003e •\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e •\n  \u003ca href=\"#how-to-use\"\u003eHow To Use\u003c/a\u003e •\n  \u003ca href=\"#how-to-use\"\u003eRun\u003c/a\u003e •\n  \u003ca href=\"#how-to-use\"\u003eEmail\u003c/a\u003e •\n  \u003ca href=\"#credits\"\u003eCredits\u003c/a\u003e •\n  \u003ca href=\"#related\"\u003eRelated\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n## Key Features\n\n* Easy helper methods to perform snapshot testing of UI elements\n* Compare snapshots such as Screensot, Render Tree and Layer Tree\n* Remove dynamic text and widgets in your snapshot using Regex  \n  - While we perform End to End testing or UI testing, its desirable that everything is mocked out, But for the projects which have dynamic content such as dates, timers etc can use regex to remove them from the snapshot.\n* Cross platform\n  - Windows, macOS and Linux ready.\n\n## Install\n\n### Add this package under dev_dependencies:\n```\ndev_dependencies:\n  fest: ^0.1.2\n```\n\n### And then run:\n```\nflutter pub get\n```\n\n### Setup snapshot directory in the root of your project :\n```\nmkdir integration-tests\nmkdir integration-tests/snaps\n```\n\n### Create a file named app.dart inside integration-tests directory with the following contents:\n```dart\nimport 'package:flutter_driver/driver_extension.dart';\nimport 'package:\u003cpackage\u003e/main.dart' as app;\n\nvoid main() {\n  \n  enableFlutterDriverExtension();\n\n  app.main();\n}\n```\n\n### Create app_test.dart inside integration-tests directory:\n```dart\nvoid main() {\n  FlutterDriver? driver;\n  Fest? snapTest;\n\n  final splashScreenSelector = 'splash-screen'\n\n  group('Resignal', () {\n    setUpAll(() async {\n      final opts = await SnapshotTestOptions.load();\n      driver = await FlutterDriver.connect();\n      snapTest = await Fest(driver: driver, options: opts);\n    });\n\n    tearDownAll(() async {\n      driver?.close();\n    });\n\n    test('Test Login Screen', async () {\n      await driver.waitForSelector('#$splashScreenSelector');\n      await snapTest.matchRenderTreeSnapshot(splashScreenSelector);\n    });\n  });\n}\n```\n\n\n## Running the tests\n\n### Running CLI:\n```bash\n$ flutter pub run fest -h\n\nflutter Snapshot Testing Tool\n --driver-path (-d)             Supply the absolute or relative path of the app driver (default: integration-tests/app.dart)\n --tests-path (-t)              Supply the absolute or relative path of the folder containing tests (default: integration-tests/)\n --snaps-path (-p)              Supply the absolute or relative path of the folder to store snapshots (default: integration-tests/snaps/)\n --update-snapshots (-u)        Update all snapshots (all tests passes and the new snapshots are saved)\n --help (-h)                    Help\n\n```\n\n### Running app_test.dart\n```bash\n$ flutter pub run fest\n```\n#### Note: When we run this for the first time, all the tests pass and the snapshot is captured. On the following runs, the new snapshot is compared with old snapshot.\n\n### To update all snapshots:\n\n```bash\n$ flutter pub run fest -u\n```\n\n### To update a specific snapshot, we have to delete the exisiting snapshot file until an interactive test run can be implemented.\n\n## How To Use\n\nUsing this package, we can easily perform snapshot testing using these following utility functions :\n\n```dart\n// This generates an image snapshot\nFuture\u003cvoid\u003e toMatchImageSnapshot(String id) async;\n```\n\nThis creates a .image file which is list of integers representing the screenshot\n\n```dart\n// This generates a render tree snapshot\nFuture\u003cvoid\u003e toMatchRenderTreeSnapshot(String id, {List\u003cRegExp\u003e? removeExps}) async;\n```\n\nThis creates a .render file which contains the complete render tree when the above function is executed\n\n\n```dart\n// This generates a layer tree snapshot\nFuture\u003cvoid\u003e toMatchLayerTreeSnapshot(String id, {List\u003cRegExp\u003e? removeExps}) async;\n```\n\n\nThis creates a .layer file which is contains the complete layer tree when the above function is executed\n\n\n## Advanced Usage\n\nWe can programatically remove parts if the render tree or layer tree which is currently dynamic, i.e. time, dates, coundowns etc. using regex.\n\nThe second argument for the above three helper methods is a list of regex to remove form the snapshot.\n\nNote: If we add a regex after a snapshot has been created, we need to delete than snapshot and recteate it.\n\n## Email\n\nFest is an Snapshot Testing tool. Meaning, if you liked using this app or it has helped you in any way, I'd like you send me an email at \u003cnithinhrao@gmail.com\u003e about anything you'd want to say about this software. I'd really appreciate it!\n\n## Credits\n\nThis software uses the following open source packages:\n\n- [Dart](https://dart.dev/)\n- [Flutter](https://flutter.dev/)\n- [Jest](https://jestjs.io/)\n- [Mockito](https://pub.dev/packages/mockito)\n- [Args](https://pub.dev/packages/args)\n- [Build Runner](https://pub.dev/packages/build_runner)\n- [Equatable](https://pub.dev/packages/equatable)\n- Emojis are taken from [here](https://github.com/arvida/emoji-cheat-sheet.com)\n\n## Related\n\n[integration-testing](https://flutter.dev/docs/cookbook/testing/integration/introduction) - Flutter Integration testing\n\n## Support\n\n\u003ca href=\"https://www.buymeacoffee.com/nithinrao\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/purple_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" \u003e\u003c/a\u003e\n\n\u003c!-- \u003cp\u003eOr\u003c/p\u003e \n\n\u003ca href=\"https://www.patreon.com/nithinrao\"\u003e\n\t\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"\u003e\n\u003c/a\u003e --\u003e\n\n\n## License\n\nMIT\n\n---\n\n\u003e GitHub [@dopecoder](https://github.com/dopecoder) \u0026nbsp;\u0026middot;\u0026nbsp;\n\u003e Twitter [@dopecoder](https://twitter.com/dopecoder)\n\n","funding_links":["https://www.paypal.me/NithinRao","https://www.buymeacoffee.com/nithinrao","https://www.patreon.com/nithinrao"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdopecoder%2Ffest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdopecoder%2Ffest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdopecoder%2Ffest/lists"}