Slide 1

Slide 1 text

Testing in Flutter Danvick Miller

Slide 2

Slide 2 text

Introduction • Testing is the process of evaluating and verifying that a software product or application does what it is supposed to do • The benefits of testing include preventing bugs, reduce development costs and improving performance

Slide 3

Slide 3 text

Types Unit testing 1 Widget testing 2 Integration testing 3

Slide 4

Slide 4 text

Unit Testing • A unit is the smallest testable component of an application • Tests a function, method or class • Goal is to verify the correctness of units of logic with a variety of conditions • External dependencies of the unit under test are generally mocked • Unit tests generally don’t read from or write to disk, render to screen, or receive user actions from outside the process running the test

Slide 5

Slide 5 text

Widget testing • Tests a single widget • In other UI frameworks referred to as component test • The goal of a widget test is to verify that the widget’s UI looks and interacts as expected • Tests to see if widget receives and responds to user actions and events, perform layout, and instantiate child widgets

Slide 6

Slide 6 text

Integration testing • An integration test tests a complete app or a large part of an app • The goal of an integration test is to verify that all the widgets and services being tested work together as expected • Can also be used to verify your app’s performance • Generally run on a real device or an emulator

Slide 7

Slide 7 text

Other types of tests • Acceptance testing: Verifying whether the whole system works as intended. • Integration testing: Ensure software components or functions operate together. • Functional testing: Checking functions by emulating business scenarios, based on functional requirements. Black-box testing is a common way to verify functions. • Performance testing: Testing how the software performs under different workloads. • Regression testing: Checking whether new features break or degrade functionality. Sanity testing can be used to verify menus, functions and commands at the surface level, when there is no time for a full regression test. • Stress testing: Testing how much strain the system can take before it fails. • Usability testing: Validating how well a customer can use an application to complete a task.

Slide 8

Slide 8 text

Demo Time! Talk is cheap, show me the code. - Linus Tovarlds