Skip to content

A simple working example of cpp testing environment not will display tests in the test explorer using Catch2 Test adapter

License

Notifications You must be signed in to change notification settings

mickeyperlstein/working_catch2_testing

Repository files navigation

A working example of Catch framework working correctly with Visual studio Catch2 Test adapter

As an experienced systems architect I am used to just starting at a running pace, with presetup systems working as planned and examples and demos that just work. I have had the need to go back to Cpp, and my memories are not fond from my CS degree.

I am working on a windows system. I tried installing many types and versions of cpp on this computer and they all had an issue and didnt want to work. I decided to default back to visual studio, and installed visual studio 2022.

I then looked for a testing framework that did not require an external package manager of submodaling a git (such as google tests). I found catch2.hpp as a single dependency and was very happy.

Here is how to run this simple testing:

  1. clone the repo to your directory of choice

  2. install visual studio 2022

  3. open the extensions and install Catch2 Test Adapter extension

  4. Go to [Test]->[Configure run Settings]->[Select Solutions Wide runsettings File] select test.runsettings located in test_project

  5. Clean and Build the solution

  6. Open test explorer and (hopefully) all the tests (6 tests) will appear there._

About

A simple working example of cpp testing environment not will display tests in the test explorer using Catch2 Test adapter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages