Welltested Docs
v2.x.x
v2.x.x
  • Documentation
    • Set up
    • Unit Tests
      • Annotation
      • Generate Tests
      • Save Tests
      • Good to Knows
        • Custom Testcases
        • Regenerate Bad Tests
        • The Batching Rule
    • FAQs
      • Paid Plans
      • Code Privacy
      • Support
      • Using with FVM
    • Testability Guidelines
Powered by GitBook
On this page
  • Scope Arguments [Optional]
  • Maintaining Tests

Was this helpful?

  1. Documentation
  2. Unit Tests

Generate Tests

PreviousAnnotationNextSave Tests

Last updated 1 year ago

Was this helpful?

To generate tests for your annotated classes, run the command:

welltested generate unit

The execution can take anywhere between 1-10 minutes to generate tests depending upon the number of methods.

After a successful run, the tests appear in /test directory of your project.

In the beginning, we recommend you generate tests in batches for the best results. Check

Scope Arguments [Optional]

You may use the scope arguments to generate tests only for a certain file, class and/or method.

Examples:

welltested generate unit -f lib/login/repository.dart

welltested generate unit -c AccountsRepository -m getAllTransactions

-f, -c or -m can all be used independently of each other and will narrow the scope accordingly.

Maintaining Tests

If you make any changes to your existing functions or add new methods, you can run the same commands and welltested will auto-update the tests.

We ensure that your tests always stay up to date with minimal maintenance efforts 🙌🏼

The Batching Rule