VSoftTechnologies / DUnitX

Delphi Unit Test Framework
Apache License 2.0
385 stars 201 forks source link

Extension to DUnitX for traceability, according to best practices and safety standards #204

Open Glorfindel2017 opened 6 years ago

Glorfindel2017 commented 6 years ago

Dear sirs, i have developed an extension to DUnitX, in order to log the id of the test, the traceability to the requirements, to the design, to the implement, to describe the test intent and to log the expected and actual values. The different types of tests (functional, non-functional, nominal, degraded, GUI, domain, etc.) can also be logged. Typically, when used this allows the test team to generate a complete test report according to best practices, including high quality standards such as ISO IEC 61508.

I have no intention of keeping this for myself and would gladly contribute this to your project. As your project is well designed, i was able to make my extensions without changing any of your code. However, from a long-term perspective, it might be interesting to refactor the code, to think in [Attributes] instead of log, etc. A better integration might lead to a better implementation.

How can we proceed for me to deliver this to you guys? Currently, i have the extended sources and a small but significant example. i'm still working on it to have a better structured XML report, but this should only take a couple of weeks (mostly because of IRL things). What do you need? Do you actually need a set of unit tests on the unit tests? examples, .CHM, experts? Please let me know so that i can deliver what can help you most.

Best regards, Thierry PS. I have attached the current state of the XML file report for the Car example test i've built as an example. Obviously, it's going to be much better structured, but all the elements i've added are there dunitx-results.zip

vincentparrett commented 5 years ago

The default xml output format for DUnitX is compatible with NUnit - NUnit uses the PropertyAttribute to add properties to the xml. I'd be happy to look at at PR that implements a PropertyAttribute - ITestResult & IFixtureResult would need a list of property name=value pairs so that the information is available in the loggers - wouldn't be too difficult to implement, unfortunately I'm extremely short of free time right now.