Generate Tests

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 The Batching Rule

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 🙌🏼

Last updated