Ozzie is your testing friend. Ozzie will take an screenshot during integration tests whenever you need. Ozzie will capture performance reports for you.

Overview

ozzie.flutter

Pub CircleCI codecov

ozzie icon art

Ozzie is your testing friend. Ozzie will take an screenshot during integration tests whenever you need. Ozzie will capture performance reports for you.

How it works

Add ozzie to your pubspec.yaml as a dev_dependency:

dev_dependencies:
  ozzie: <latest_version_here>

In your Flutter integration tests, create an instance of Ozzie, pass the FlutterDriver, give it a groupName and ask it to takeScreenshot. That simple! And whenever you have finished with tests, you can create an HTML report by asking Ozzie to generateHtmlReport.

If you want to measure the performance of your app, simple wrap your integration tests in profilePerformance and it will be added to the HTML report.

Here's an example:

import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';
import 'package:ozzie/ozzie.dart';

void main() {
  FlutterDriver driver;
  Ozzie ozzie;

  setUpAll(() async {
    driver = await FlutterDriver.connect();
    ozzie = Ozzie.initWith(driver, groupName: 'counter');
  });

  tearDownAll(() async {
    if (driver != null) driver.close();
    ozzie.generateHtmlReport();
  });

  test('initial counter is 0', () async {
    await ozzie.profilePerformance('counter0', () async {
      await driver.waitFor(find.text('0'));
      await ozzie.takeScreenshot('initial_counter_is_0');
    });
  });

  test('initial counter is 0', () async {
    await ozzie.profilePerformance('counter1', () async {
      await driver.tap(find.byType('FloatingActionButton'));
      await driver.waitFor(find.text('1'));
      await ozzie.takeScreenshot('counter_is_1');
    });
  });
}

After this, a report will be generated inside your project as ozzie/index.html:

report example

Using ozzie.yaml to control performance thresholds

You can declare, at the root of your project, an ozzie.yaml file to control the different thresholds of your performance tests. If this file is not declared, Ozzie will use internal default values:

ozzie.yaml:

integration_test_expectations:
  should_fail_build_on_warning: true
  should_fail_build_on_error: true
performance_metrics:
  missed_frames_threshold:
    warning_percentage: 5.0
    error_percentage: 10.0
  frame_build_rate_threshold:
    warning_time_in_millis: 14.0
    error_time_in_millis: 16.0
  frame_rasterizer_rate_threshold:
    warning_time_in_millis: 14.0
    error_time_in_millis: 16.0

Optional screenshots

Taking screenshots can take a while, and sometimes you might want to run your integration tests without taking screenshots. If that's the case, you can set shouldTakeScreenshots to false and skip that part, saving you some precious time:

setUpAll(() async {
  driver = await FlutterDriver.connect();
  ozzie = Ozzie.initWith(
    driver,
    groupName: 'counter',
    shouldTakeScreenshots: false,
  );
});

Maintainers

Project Lead(s):

Main Maintainer(s):

License

Copyright 2018 Jorge Coca

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...

Getx and Dio APi-Integration - Flutter RestApi Integration using Dio

Getx and Dio APi-Integration - Flutter RestApi Integration using Dio

Flutter RestApi Integration using Dio. Click this image to find videos== //Crud

Nov 5, 2022

Integration test - Copy of the official Flutter integration test plugin

integration_test This package enables self-driving testing of Flutter code on de

Jan 5, 2022

Flutter-fb-integration - Flutter And firebase integration Guide

Flutter-fb-integration - Flutter And firebase integration Guide

Quickstart Guide This project still use my firebase server config, if you want t

Feb 2, 2022

FLutter Api Integration - Flutter Rest API Integration

FLutter Api Integration - Flutter Rest API Integration

Flutter_Rest_Api_integration Flutter_Rest_Api_integration. Preview How To Use To

Feb 17, 2022

An application that helps you to quit smoking by showing your everyday performance and boosting your confidence.

An application that helps you to quit smoking by showing your everyday performance and boosting your confidence.

This Project is developed in HACKTOBERFEST 2022 By I Can And I Will An application that helps you to quit smoking by showing your everyday performance

Oct 27, 2022

A tool for digitizing medical history, prescriptions, and reports.

A tool for digitizing medical history, prescriptions, and reports.

Shealth A tool for digitising medical history, prescriptions and report Landing page Login page Home page Registeration page Installation To render re

Dec 26, 2022

SeizeYourSpace - An App to capture details about folks interested in joining Publicis Sapient. Especially useful at events!

SeizeYourSpace - An App to capture details about folks interested in joining Publicis Sapient. Especially useful at events!

photo_job A simple app to take in candidate applications at a Conference Booth. This simplifies the work for a recruiter and eliminates the paper work

Jul 11, 2022

Mobile secure keyboard to prevent KeyLogger attack and screen capture.

Mobile secure keyboard to prevent KeyLogger attack and screen capture.

Mobile secure keyboard to prevent KeyLogger attack and screen capture. Screenshots Alphanumeric Numeric Getting started To use this plugin, add flutte

Dec 22, 2022

Color detection in images to capture presense of known objects.

Color detection in images to capture presense of known objects.

swatch Color detection in images to capture presence of known objects. Why? There is great object and face detection software out there, but sometimes

Dec 7, 2022
Owner
Jorge Coca
Head of Engineering - @VGVentures. Google Developer Experter - Flutter Ex core mobile @bmw-tech. Organizer of @ChicagoFlutter.
Jorge Coca
A composable, light-weight package that can be used as a placeholder whenever you need some fake data

API Placeholder A composable, light-weight package that can be used as a placeholder whenever you need some fake data. With this package, you can get

ASMIT VIMAL 2 Feb 27, 2022
Custom flutter testing CLI tool for individual test runs and group testing

fluttertest Custom flutter testing CLI tool for inidividual test runs or group testing Overview Flutter is a great framework which has helps developer

vi_mi 15 Nov 6, 2022
Simple and complete Flutter hooks testing utilities that encourage good testing practices.

Flutter Hooks Testing Library Simple and complete Flutter hooks testing utilities that encourage good testing practices. Inspired by react-hooks-testi

Daichi Furiya 24 Dec 2, 2022
Ouday 25 Dec 15, 2022
Integration Test Preview allows tests on multiple screen sizes in a single e2e test run.

Integration Test Preview has pre-configured methods that allow for faster test deployment for end to end (e2e) test coverage (using Android and iOS pl

The Mobile Applications Community 3 Aug 23, 2022
Integrationtestapp - Introduction and example on Flutter Integration Testing

integrationtestapp Flutter Project with integration test example. Setup integrat

null 0 Feb 11, 2022
Messenger is an instant messaging app & by using this you can send message to your friend and family virtually

⚡️ Flash Chat ⚡️ Our Goal ?? The objective of this project is to learn how to incorporate Firebase into our Flutter apps. We'll be using Firebase Clou

Prashant Kumar Singh 7 Dec 3, 2022
Messenger is an instant messaging app & by using this you can send message to your friend and family virtually

⚡️ Flash Chat ⚡️ Our Goal ?? The objective of this project is to learn how to incorporate Firebase into our Flutter apps. We'll be using Firebase Clou

Prashant Kumar Singh 7 Jun 19, 2022
Be together, whenever. A simple way to text chat and plan things all in one place for flutter developers.

Flutterdevconnect Be together, whenever. A simple way to text chat and plan things all in one place for flutter developers. Android IOS Web PWA Androi

Sanskar Tiwari 69 Aug 27, 2022
Flutter error catching & handling plugin. Handles and reports exceptions in your app!

Catcher Catcher is Flutter plugin which automatically catches error/exceptions and handle them. Catcher offers multiple way to handle errors. Catcher

Jakub 697 Jan 7, 2023