/starter_examples

Starter examples to quickly experience welltested's test generation capabilities.

Primary LanguageC++

starter_examples

Curated examples to try out unit test generation with welltested.

The repository consists of following types of examples:

1. Basic

No external dependencies and hence no mocking required.

2. With External Dependencies

External dependencies need to be mocked and simulated.

To Get Started.

  1. First, activate the cli using dart pub global activate welltested.
  2. In the root of your project, do a welltested init and insert your API Key.

Steps to generate test (Basic).

  1. Annotate Calculator with @Welltested Calculator annotated
  2. Run the command: welltested generate unit Calculator tests

Steps to generate test (With External Dependencies).

  1. Annotate DioClient with @Welltested DioClient annotated
  2. Run the command: welltested generate unit DioClient tests

For reference, you may find the final generated tests in the /generated-tests branch