At my previous employer, we used CDash to display statistics about the tests that were run. When the code was run in “test” mode, additional statistics were recorded about the code and saved to an XML file. These statistics were then available in CDash to plot as history files. Unfortunately I didn’t set the CDash up - I only ever used it. I’m now attempting to set up CTest with CDash with my new employer.
My question is : what is the data format the CDash is expecting such that it can display all this data?
The data is going to be something like:
testname: simpletest
statistic1: “numberOfSteps”
staticistic type: int
statistic value: 10
statistic2: “maximumQuality”
staticistic type: float
statistic value: 0.1
etc.
I know that one could compare these statistics from one test to the next run using a baseline set of test-data. Again, never wrote this, only know that it happened.
Anyone have any ideas how one might go about this? If this requires some scripting to occur post-testing, then fine.
Is the MEASUREMENT test property what you are looking for? Note that it is a static value determined at configure time, not a value computed as part of running the test.
If you want to have the test compute a value to be reported to CDash, there’s an undocumented capability for that. It’s been on my todo list to document it for longer than I want to admit, but you can find a starting point for basic details and links here.
These are going to be values calculated from the code during the test. We have instrumented our code to record statistics about what it is doing. At the end of a run if a certain environment variable is set the code exports the statistics to a JSON format file. Our team may add or delete these statistics from the code but we don’t want to edit the cmake setup.
I think you documentation problem is best solved by an example. What I’ve found so far in dealing with CMake/CTest is the documentation is rather like the linux man pages. Great if you are looking for some fine detail about a command you already know the existence of but not so good if you don’t know what the command is or even how a thing may be performed. I’ve been dealing with CMake on and off for around 6 years and I still feel like a novice. Novices like examples to follow and edit.