postgresql table for storing automation test results
Posted
by Martin
on Stack Overflow
See other posts from Stack Overflow
or by Martin
Published on 2010-03-26T06:20:41Z
Indexed on
2010/03/26
6:23 UTC
Read the original article
Hit count: 388
I am building an automation test suite which is running on multiple machines, all reporting their status to a postgresql database. We will run a number of automated tests for which we will store the following information:
- test ID (a GUID)
- test name
- test description
- status (running, done, waiting to be run)
- progress (%)
- start time of test
- end time of test
- test result
- latest screenshot of the running test (updated every 30 seconds)
The number of tests isn't huge (say a few thousands) and each machine (say, 50 of them) have a service which checks the database and figures out if it's time to start a new automated test on that machine.
How should I organize my SQL table to store all the information? Is a single table with a column per attribute the way to go?
If in the future I need to add attributes but want to keep compatibility with old database format (ie I may not want to delete and create a new table with more columns), how should I proceed? Should the new attributes just be in a different table?
I'm also thinking of replicating the database. In case of failure, I don't mind if the latest screenshots aren't backed up on the slave database. Should I just store the screenshots in its own table to simplify the replication?
Thanks!
© Stack Overflow or respective owner