3

I am working on a project which involves documenting test logs. I want to know the structure of test logs (what should be included).

4 Answers 4

6

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.

2
  • 1
    I see what you did there! :-) Sep 21, 2012 at 14:12
  • Thank you for your response. This is what I actually needed.
    – deepz
    Sep 21, 2012 at 14:49
1

I hope I did not misunderstand your question, but for me it seems to be very abstract. In general, the answer depends on

  1. What is the purpose of this log?
  2. Who will be using it?

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.

5
  • The purpose of this log is to collect the overall test results. The person using it, is me. I just wanted to know the contents included in it for my documentation.
    – deepz
    Sep 21, 2012 at 14:48
  • I would add that even if it's just for you, consider if anyone else needs to read them afterwards and add information accordingly. Possibly next person doing your job at some point?
    – Edu
    Sep 22, 2012 at 12:37
  • @Edu so what do you want me to do? have a flexible log structure?
    – deepz
    Sep 24, 2012 at 20:09
  • @deepz Write the test log so that someone else can understand it. This doesn't mean that the log entry needs to be long, but it should describe things in context. It is also a wonder how much details one can forget in a year. So, write down what matters, but only that.
    – Edu
    Sep 25, 2012 at 13:45
  • @Edu Thank you for your advise. I will do as you said :)
    – deepz
    Sep 25, 2012 at 14:37
1

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.

2
  • Thank you for your response. I'll definitely add and do this in my log.
    – deepz
    Sep 25, 2012 at 9:56
  • I agree that a structured format (XML, CSV, etc) is best. This lets a tool like Microsoft's Log Parser do the queries for you in a straightforward manner. Sep 25, 2012 at 10:55
0

For a good example of well-formated test logs, see the TAP protocol:

http://testanything.org/wiki/index.php/Main_Page

It is used primarily by Perl, but it can be used by JUnit and other tools as well.

0

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.