Skip to content

A collection of getting-started examples of unit testing.

License

Notifications You must be signed in to change notification settings

solarisin/unit-test-examples

Repository files navigation

Example Unit Tests

GitHub Workflow Status Test Results Conventional Commits GitHub

Description

This project will serve as an example of different C++ unit testing frameworks and their integration into Github Actions and JetBrains TeamCity CI/CD.

Units

  • simple-dll
    • As the name implies, a painfully simple implementation of a MSVC++ dll, class and function.

Tests

  • ms-cpp-unit-test
    • Contains tests utilizing the Microsoft C++ Unit Test Framework, executed by VSTest.Console.exe.

Github Actions

  • msbuild-vstest-ci
    • Utilizes msbuild and then microsoft/vstest-action to discover test .dlls. Then, trx-parser to retrieve the results from the trx file and create a check.

Usage

Clone the repo and open the solution file in Visual Studio. Execute the tests using the Test Explorer, or from the command line using vstest.console.exe. Examples with JetBrains CLion will come soon.

How to Contribute

Contributions are welcome, as long as they include examples on integrating the tests with a CI/CD pipeline. Please follow the Contributor Covenant.

About

A collection of getting-started examples of unit testing.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published