Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Testing Your Flutter Applications </>

Avatar for Eric Muli Eric Muli
November 12, 2022

Testing Your Flutter Applications </>

Most developers ignore tests for many reasons. Ignoring tests will always bite you in one way or another. In this workshop, we’ll first talk about the importance of testing your flutter application; then, we’ll go through different types (unit test, widget test, integration test, and golden test.) of tests and how to do them in detail.

Avatar for Eric Muli

Eric Muli

November 12, 2022
Tweet

More Decks by Eric Muli

Other Decks in Technology

Transcript

  1. What is Testing ? 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
  2. • Types of test • Benefits of testing • What

    is Unit testing? • What is testable • Mocking in testing Our Focus Today
  3. Unit Testing Widget Testing Integration Testing Other Type of Testing?

    Golden Testing Continuous Integration Types of Test Common Known Test?
  4. • Acceptance testing: Verifying whether the whole system works as

    intended. • 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. … more types of testing
  5. Benefits of Testing • Unit testing is very easy to

    write and run. • Unit testing helps us identify bugs at the early stage. • Acts as better documentation. • Gives us the confidence to refactor our code. • Improves quality
  6. Unit Testing Unit testing is a part of the automated

    testing process in which small units of code are tested with several use cases for their reliability. A unit may be a function, method, class, state, or just a variable.
  7. • State variables - State variables are variables outside the

    local scope. It may be a global variable or a class property that can be accessed by more than one unit. Usually, it holds a state. • Function/variable calls • Function arguments • Function returns • Static Methods • Bloc e.t.c Then What Should I Test?
  8. Mocking In Testing Mocks allow emulating a live web service

    or database and return specific results depending on the situation. Mocking is just the process used in unit testing when the unit being tested has external dependencies