From the course: Scripting for Testers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Gathering data

Gathering data - Python Tutorial

From the course: Scripting for Testers

Start my 1-month free trial

Gathering data

- [Instructor] Testers need to find out data about applications, but they also often need to report that data to others, so let's take a look at some of the tools that we can use to help us automate report generation. We'll be looking at some test timing data for test runs. In the exercise files, I've provided a CSV file that has a bunch of data made up about a fictional set of test runs. So what we want to look at is how we can create a column chart showing how much slower or faster a current run is from the average runtimes for that test and we'll look at how we can store the historical data in a table so that we can look back through it later if we want to. The first thing we'll start with is reading in the CSV file. Python helps us out with this by providing a module called csv that makes it easier to use and manipulate CSV files. So the first thing that we'll do is read this file in, so we'll use this construct with open() and then we'll give it a file name, so we'll call it…

Contents