https://github.com/samuelematias/calculator_app
๐งช A simple Flutter app with several unit tests, widget testing, and integration tests/e2e.
https://github.com/samuelematias/calculator_app
dart e2e-testing flutter integration-testing unit-testing widget-testing
Last synced: 18 days ago
JSON representation
๐งช A simple Flutter app with several unit tests, widget testing, and integration tests/e2e.
- Host: GitHub
- URL: https://github.com/samuelematias/calculator_app
- Owner: samuelematias
- Created: 2020-12-02T11:16:15.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-02T23:26:10.000Z (over 5 years ago)
- Last Synced: 2025-06-30T08:03:22.970Z (11 months ago)
- Topics: dart, e2e-testing, flutter, integration-testing, unit-testing, widget-testing
- Language: HTML
- Homepage: https://caster.io/courses/testing-fundamentals-of-flutter
- Size: 424 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# calculator_app
Calculator - [Caster.IO](https://caster.io) project to showcase testing techniques
> NOTE: **There are some tips in the PR's descriptions**, so take a look there!
## Class / PR / Branch
[Lesson 1: What is the difference between unit testing, widget testing, and integration testing?](https://caster.io/lessons/lesson-1-what-is-the-difference-between-unit-testing-widget-testing-and-integration-testing) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/1) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson1)
[Lesson 2: Writing your first unit test](https://caster.io/lessons/lesson-2-writing-your-first-unit-test) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/2) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson2)
[Lesson 3: Running your tests from the terminal](https://caster.io/lessons/lesson-3-running-your-tests-from-the-terminal) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/3) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson3)
[Lesson 4: The structure of a good test](https://caster.io/lessons/lesson-4-the-structure-of-a-good-test) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/4) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson4)
[Lesson 5: Using expect() in your tests](https://caster.io/lessons/lesson-5-using-expect-in-your-tests) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/5) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson5)
[Lesson 6: All you need to know about Matchers](https://caster.io/lessons/lesson-6-all-you-need-to-know-about-matchers) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/6) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson6)
[Lesson 7: Grouping your tests using the group() function](https://caster.io/lessons/lesson-7-grouping-your-tests-using-the-group-function) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/7) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson7)
[Lesson 8: Testing code that throws an Error or an Exception](https://caster.io/lessons/lesson-8-testing-code-that-throws-an-error-or-an-exception) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/8) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson8)
[Lesson 9: Sharing code between tests with setUp() and tearDown()](https://caster.io/lessons/lesson-9-sharing-code-between-tests-with-setup-and-teardown) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/9) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson9)
[Lesson 10: Testing Futures](https://caster.io/lessons/lesson-10-testing-futures) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/10) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson10)
[Lesson 11: Testing Streams](https://caster.io/lessons/lesson-11-testing-streams) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/11) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson11)
[Lesson 12: Writing your first widget test](https://caster.io/lessons/lesson-12-writing-your-first-widget-test) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/12) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson12)
[Lesson 13: The difference between pumpWidget(), pump() and pumpAndSettle()](https://caster.io/lessons/lesson-13-the-difference-between-pumpwidget-pump-and-pumpandsettle) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/13) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson13)
[Lesson 14: Finding a widget in your widget tree using CommonFinders](https://caster.io/lessons/lesson-14-finding-a-widget-in-your-widget-tree-using-commonfinders) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/14) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson14)
[Lesson 15: Interacting with your widgets using WidgetTester](https://caster.io/lessons/lesson-15-interacting-with-your-widgets-using-widgettester) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/15) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson15)
[Lesson 16: Verifying your widget tests using a Matcher from flutter_test](https://caster.io/lessons/lesson-16-verifying-your-widget-tests-using-a-matcher-from-flutter_test) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/16) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson16)
[Lesson 17: Testing smaller widgets in isolation](https://caster.io/lessons/-lesson-17-testing-smaller-widgets-in-isolation) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/17) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson17)
[Lesson 18: Controlling the behavior of your dependencies using mockito](https://caster.io/lessons/lesson-18-controlling-the-behavior-of-your-dependencies-using-mockito) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/18) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson18)
[Lesson 19: Stubbing synchronous methods with mock](https://caster.io/lessons/lesson-19-stubbing-synchronous-methods-with-mockito) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/19) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson19)
[Lesson 20: Stubbing asynchronous methods using mockito](https://caster.io/lessons/lesson-20-stubbing-asynchronous-methods-using-mockito) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/20) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson20)
[Lesson 21: Verifying interactions with mockito](https://caster.io/lessons/lesson-21-verifying-interactions-with-mockito) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/21) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson21)
[Lesson 22: Using golden files to verify pixel-perfect widgets](https://caster.io/lessons/lesson-22-using-golden-files-to-verify-pixel-perfect-widgets) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/22) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson22)
[Lesson 23: Collecting code coverage from your tests](https://caster.io/lessons/lesson-23-collecting-code-coverage-from-your-tests) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/23) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson23)
[Lesson 24: Running integration tests with flutter_driver](https://caster.io/lessons/lesson-24-running-integration-tests-with-flutter_driver) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/24) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson24)
[Lesson 25: Taking automated screenshots of your application](https://caster.io/lessons/lesson-25-taking-automated-screenshots-of-your-application) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/25) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson25)
[Lesson 26: Running your tests on Github Actions](https://caster.io/lessons/lesson-26-running-your-tests-on-github-actions) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/26) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson26)
[Lesson 27: Using Codemagic for your CI/CD needs](https://caster.io/lessons/lesson-27-using-codemagic-for-your-cicd-needs) ๐๐พ [PR](https://github.com/samuelematias/calculator_app/pull/27) ๐๐พ [Branch](https://github.com/samuelematias/calculator_app/tree/lesson27)
## License
```
MIT License
Copyright (c) 2020 Samuel Matias
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```