I am working on a project which involves documenting test logs. I want to know the structure of test logs (what should be included).
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
A test log is simply a log used for testing. ISO 9000 compliant timber companies typically have detailed guidelines for the structure of test logs. For example, they must still include bark, must be between five and ten meters long, and between 50 and 100 centimeters in diameter. Like production logs, test logs must have visibly apparent concentric rings when viewed in cross-section. There may also be certain density requirements that vary from species to species.
Some insect damage is inevitable, but typically a test log must have no more than 3 bore holes per linear meter.
On a more serious note, if I were keeping a test log solely for my own use, I would fill it with details that I would otherwise forget, and I would organize it in a way that would be useful in my own circumstances. I do not know myself well enough to know exactly which details or organization would be most useful to me, and even if I did, it is likely that they would change over time. Rather than try to design the perfect test log structure, I would think about it for about five minutes, start using it, and then re-evaluate as necessary.
I think structuring a test log is kind of like commenting your code: you will not know whether you "got it right" until later. Luckily, you are free to change your mind and do something different going forward.
You can use that approach with other things, too.
I hope I did not misunderstand your question, but for me it seems to be very abstract. In general, the answer depends on
If you answer this question to yourself, then you will know what information the viewer would want to see in the log files.
However, I can also suggest you to take a look into standard logging frameworks like Log4j logs which might also give you some insight. This is something I found on google. Hope this helps.
At least you must include all verifications you perform and their status (pass/fail) and an overall conclusion (if test passed or failed). Other interesting points would be test execution time, timestamp on test start and environment info (os/browser version) if it does matter in your case.
IMHO the log should be in some parsable format like XML (or well formed HTML or plain text with some unique tags), when you've got lots of them you do not want to open each one by hand. Better if you can organize a file hierarchy or store them in a database.
Then you can have some tools to parse the logs for data analysis.
For a good example of well-formated test logs, see the TAP protocol:
It is used primarily by Perl, but it can be used by JUnit and other tools as well.