CommandDash / starter_examples

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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


Languages

Language:C++ 41.9%Language:CMake 35.4%Language:Dart 13.3%Language:HTML 3.4%Language:Swift 3.1%Language:C 2.6%Language:Kotlin 0.2%Language:Objective-C 0.1%