0

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 Answers1

0

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.

damorin
  • 1,389
  • 1
  • 12
  • 15
  • Thanks for the suggestion, somehow is not really what I'm looking for. The thing is that we want to avoid the use of an extra tool in the project. And also the reporting is a little cluttered in my opinion, I feel it might still require some manual work to put the report into the templates that the management of the project uses. – Dr. Darwin Oct 15 '20 at 12:57