Requirement tracking Doxygen

1.9k views Asked by At

I'm trying to generate a table of requirements covered by my tests using doxygen, I have seen this post https://stackoverflow.com/a/50827066/13269917 which works fine and generates a table that link requirements to tests, so in my code, before the test, I add the following command: /// @req{req01}: Req01 description. that generates something like:

Member TEST_F (SomeTestFixture, testName)
    req01: Req01 description
    req02: Req02 description

This is really good, however I would like to have a table that links test to requirements, I was thinking on taking the requirements from somewhere (perhaps have a .dox with the req. list and description) and add it as input to Doxygen, and define a custom command that could find(link) the requirement automatically, so in my code I would only need to add the requirement ID, for example:

/// @req{req01}
TEST_F (SomeTestFixture, testName)
{
     ... test body
}

/// @req{req02}
TEST_F (SomeTestFixture, testName)
{
     ... test body
}

/// @req{req01}
TEST_F (SomeTestFixture, AnotherTestName)
{
     ... test body
}

So that the generated output looks something like:

Req01: req01: Req01 description:
    TEST_F (SomeTestFixture, testName)
    TEST_F (SomeTestFixture, AnotherTestName)

Req02: req02: Req02 description:
    TEST_F (SomeTestFixture, testName)

Do you have any suggestion for a custom command or a way to achieve this?

1

There are 1 answers

1
damorin On

take a look at reqflow that create traceability matrix. I'm using that to trace the requirements to the code and requirements to the test cases.

http://goeb.github.io/reqflow/#example-of-report

It can be configured with regexp to capture requirements.