catchorg / catchorg/Catch2

Tests ordering

Open
#60 6 comments 2 reactions 0 assignees View on GitHub
Feature Request
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

This is a features request. It is of low priority but will be nice to have. Maybe the feature already exists?

I have tests in different source (.cpp) files. Each cpp file has a group of related tests. Sometimes, one group of tests relies on objects that are also tested but in another group. I would like to order them such that the group of tests that relies on some objects is tested AFTER the group of tests that test the objects in the first place.

That may have been confusing so here is an example:

GROUP1 - tests for sorting on containers (containerSortTests.cpp)
GROUP2 - tests for containers to make sure they work properly (containerTests.cpp)

I would like Group2 tests to be tested before Group1. If Group2 tests fail, then Group1 will most likely fail regardless. The 'ordering' of the failure will tell me to fix the containers first.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.