Accelerate your Flutter test suite with lightning speed! ⚡

Tests with testRocket Tests with testRocket

Sample : 4600 tests running in ~1 min...

Show your support

Buy Me A Coffee

Features

  • Dramatically speeds up test execution: By bundling tests into a single file, testRocket significantly reduces the overall runtime of your test suite.
  • Simplifies test organization: Automatically collects and consolidates tests from across your project, eliminating the need for manual test management.
  • Test reporting: Generate test reports in .testRocket directory.
  • User-friendly command-line interface: Interact with the tool using intuitive commands designed for clarity and ease of use.
  • Upcoming: Support for test run with coverage

Installation

Activate the testRocket command line tool using this command:

dart pub globabl activate testRocket

Usage

Core Commands

  • testRocket bundle: Creates the bundled test file.
  • testRocket run: Executes the bundled tests.
    • --coverage: Runs tests with code covergae.
    • --report: Generates test reports in .testRocket directory.

Test reporting

Test reporting is a feature built to analyze testing trends in your team. Running testRocket run command with --report generates a report of the tests run the .testRocket directory. It is recommended to commit .testRocket directory to your versions control system to track patterns and trends across your team.

Please use --report flag only in your repository's githooks,(preferrably .pre-commit) to log test run report for changes done by each author. Using --report. When the flag is used outside the githooks, it will generate a report for test runs for change that might not be committed to your version control.

Some tests are failing. Why?!

Test failure with testRocket expose vulnerabilities in the test suite. If tests are passing with the regular flutter run but fail in the testRocket run, then there is a good chance the tests are not truly isolated. Hence, the tests might be sharing some resource in the test environment, eg; a shared service locator, a ViewBinding, etc.