Generate Tests
Last updated
Was this helpful?
Last updated
Was this helpful?
To generate tests for your annotated classes, run the command:
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
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.
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 🙌🏼