I am working in a Medical Device/FDA/ISO62304 Software documentation world.

I would like to know from those who document unit and integration tests, how do you document testing. Part of the reality of testing in this environment is that individual test cases need documentation, evidence of their (successful) execution, and traceability to a requirement describing the expected test behavior.

What is important in your test documentation? What part of your test documentation has been called into question? Has your documentation been to any degree, successfully automated? If so, what tools did you use to automate the testing?

1 Answer 1


i haven't worked on Medical devices but i do pride myself on providing inline documentation with all my test framework code. I also tend to write them so that the tests that use them are a simple as possible so they don't need more description.

I have used sphinx quite a lot for this , it works realy nicely with python but other languages might have better tools. Once you have setup the basic environment for the documentation you can just add documentation stanzas in comments by each function , method , class or anything else. I then add a job in CI to build an extract the documentation each time there is a merge to master.

The best thing you can do with test documentation is plainly document why you are doing what you are doing with some indication of where you found out why that was what needed doing. Brutal honesty is more important than a polished product here because we need to know why behaviour happens.

In terms of tracability you can do this with most decent test management tools by quoting identifiers for specification documents in the code or the systems metadata. This will require maintenance in the form of periodic reviews, its a good idea to schedule these in so you don't forget and to enforce a limit to how much they can drift.

Ultimately you will have to write code to do a lot of this and you will need to make it as transparent and self documenting as possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.