Chapter 6. Test Management/Reporting System

In Chapter 3, you learned how to access a database to store and retrieve structured data for use in a Python script, but what about situations where a database is overkill? It is precisely for these kinds of situations that XML exists, and Python is brimming with features to enable you to write to, query, and otherwise manipulate XML.

The test management and reporting system in this chapter shows how you can use XML to store and retrieve structured data in a Python script.

The application will perform the following functions:

  • Enable a user to run tests and report on the pass or fail results of the tests

  • Enable a user to list the test runs, by date

  • Enable a user to show test run results for any previous test run

  • Enable a user to output the results of any completed test run to an HTML file, so that results can be viewed in a web browser

Using the Program

You can get to the program by navigating to the directory corresponding to this chapter. As in the previous chapters, the files are available for download from www.wrox.com. To run the application, simply go to a command prompt, and from the directory on your system where the Chapter 6 program files are located, type ...

Get Python® Create-Modify-Reuse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.