Note: This article only applies to TestTrack 2011.1 and earlier. If you use TestTrack 2012 or later, see Exporting TestTrack 2012 and Later Data to Excel.
TestTrack projects can be accessed using the TestTrack ODBC driver. This read-only driver lets you query your databases using ODBC-compatible products, such as Microsoft Excel.
Installing and configuring the driver
- Download the ODBC driver for your TestTrack version. (2009, 2010, 2011)
- Unzip the file.
- Open the directory and double-click Setup.exe. Follow the onscreen installation instructions.
- To configure the driver, choose Start > Settings > Control Panel.
- Open the ODBC Data Source Administrator.
- On the User DSN tab, select TestTrack ODBC Datasource and click Configure.
The ODBC TestTrack Setup dialog box opens. The data source field is automatically populated but this field can be changed. When you configure the data source, an error may be returned. If you receive an error, it is generally due to a missing .dll. The missing .dll is included in the zip file. Copy ttc4dll.dll into the system folder.
- Click Browse to set the database path.
Navigate to the project directory you want to query. The default project database location is the computer where the TestTrack Server is installed.
- Click Open.
- Click OK. The driver is configured.
Using Microsoft Query to retrieve data
- Start Microsoft Excel and open a new workbook.
- Choose Data > Import External Data > New Database Query. The Choose Data Source dialog box opens.
- On the Databases tab, select TestTrack ODBC Datasource and click OK. The Excel Query Wizard opens. This wizard is used to perform simple queries.
- Click Cancel to perform a more complex query. You are prompted to confirm that you want to edit the query in Microsoft Query.
- Click Yes. The Microsoft Query Editor opens. For this example, we will create a query that includes the Defect Number, Product, and Version Found.
- Add the following tables: DEFECTS, FLDPROD and REPORTBY. Click Close after the three tables are added.
- The Query Editor creates links, or joins, between the tables. Make sure you remove all joins.
- After the joins are removed, expand the tables so you can view all fields.
- Double-click the DEFECTNUM column in the DEFECTS table. Double-click the DESCRIPTOR column in FLDPROD table. Double-click the VERSNFOUND column in the REPORTBY table. The columns are added to the bottom half of the split screen window.
- Create joins to link the tables. Click and drag IDPRODUCT in the DEFECTS table to IDRECORD in the FLDPROD table. Next, click and drag IDRECORD in the DEFECTS table to IDDEFREC in the REPORTBY table.
- Click the SQL button in the menu bar. Verify the SQL matches the following:
SELECT DEFECTS.DEFECTNUM, FLDPROD.DESCRIPTOR, REPORTBY.VERSNFOUND FROM DEFECTS DEFECTS, FLDPROD FLDPROD, REPORTBY REPORTBY WHERE DEFECTS.IDPRODUCT = FLDPROD.IDRECORD AND DEFECTS.IDRECORD = REPORTBY.IDDEFREC
The query determines the product name using the WHERE DEFECTS.IDPRODUCT = FLDPROD.IDRECORD and determines the version using AND DEFECTS.IDRECORD = REPORTBY.IDDEFREC as part of the WHERE statement.
- Click OK to close the SQL dialog box.
- To return the data to Excel, choose File > Return Data to Microsoft Office Excel. You are prompted for a starting cell to return the data to.
- Select A1 to start at the beginning of the page. After the data is returned to Excel, you can update the query information by right-clicking anywhere on the data output and selecting Refresh Data.