Opened 7 years ago

Last modified 3 years ago

#2350 new task

Define a framework for unit-test documentation

Reported by: tomek Owned by:
Priority: medium Milestone: Outstanding Tasks
Component: documentation Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description (last modified by tomek)

Many unit-tests lack description of their scope and purpose. It would be useful to have a consistent way to document them.

One simple approach to that problem is to define a macro that will call TEST and TEST_F macros from gtest, but will take additional parameter(s).

Such additional parameter would be test description.
Another parameter to consider would be the component the test is covering (auth, resolver, dhcp4, dhcp6 etc.)

With such extension, it would be possible to write a script that will parse all unit-test code and generate test report. Together with GTEST_OUTPUT=xml:results.xml passed to unit-tests, it would allow us to generate a proper test report that could be further processed.

Subtickets

Change History (4)

comment:1 Changed 4 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

comment:2 Changed 3 years ago by tomek

  • Description modified (diff)
  • Milestone changed from Outstanding Tasks to Kea-proposed

comment:3 Changed 3 years ago by tomek

  • Milestone changed from Kea-proposed to Outstanding Tasks

comment:4 Changed 3 years ago by tomek

It's a nice concept, but we have more pressing matters to solve. Let's keep it in outstanding for now.

Note: See TracTickets for help on using tickets.