Open santiagopagani opened 2 years ago
Hi, I also find the idea of a global configuration very useful. Currently, to link test cases with test results, we have to add :results: [[tr_link('title', 'case')]]
to all the GTest test cases.
I would be willing to implement this feature if this discussion leads to something concrete.
I have just realised that the needs_global_options
actually exists 😮 Sorry!
As for linking multiple tests results to test cases, hopefully #68 will get through.
Hi,
I would like to know if
test_reports
currently supports our use case. Namely, we have multiple software requirements, where each requirement usually matches a method of a class. For example, let's say, we haveClassA
with methodsget()
andset()
, and we then haveReqA_get
, andReqA_set
.For testing we use GTest, and we normally have a test file with a test class that tests an entire class. For example, we would have GTest class
TestClassA
for testingClassA
. The test involves multiple test functions, where multiple test functions are involved in testing a method ofClassA
. For example, we would haveTestClassA_get_1
, andTestClassA_get_2
for test methodget()
ofClassA
, and we would haveTestClassA_set_1
,TestClassA_set_2
, andTestClassA_set_3
for testing methodset()
ofClassA
. We then define the Test Specification in such a way that we have one specification per test.The xml output from GTest for the test cases would be (summarizing only the class name and case name):
classname="TestClassA"
andname="get_1"
classname="TestClassA"
andname="get_2"
classname="TestClassA"
andname="set_1"
classname="TestClassA"
andname="set_2"
classname="TestClassA"
andname="set_3"
So far, by having a configuration as for example
we need to have the same name as the test class in all test specifications, e.g.,
.. test:: TestClassA
, and we would get ALL test cases in the test fileTestClassA
linked to every test specification. However, we would like to have each test case only linked with its corresponding test specification.One way to do this would be to adapt the
tr_link
function such that it could take a tupple of multiple things that need to be matched. We could then addclassname
andcasename
to the test specification and then have both things matched to the xml.Thank you for the great work.