ATS : Reading data from Test Explorer database

Introduction

We have listed here different REST calls which can be used to communicate with the HTTP DB Logger application in order to read data from a Test Explorer database.



Get list of runs

getRuns returns a list of Runs that matched a certain criteria

body parameters description optional
dbHost DB host Y
dbPort DB port Y
dbName DB name
dbUser DB user Y
dbPassword DB password Y
name Name of the Run Y
product Name of the tested application Y
version Version of the tested application Y
build Build of the tested application Y
os OS of the tested application Y
timeOffset The caller's UTC offset Y
currentTimestamp The caller's current timestamp in ms Y
columns The columns to return Y

Default connection parameters

If not specified, the dbHost is localhost , the dbPort is 1433 (default for MSSQL), the dbUser is AtsUser , the dbPassword is AtsPassword

Time offset

This offset is applied to the Run's start and end timestamps, so they are fixed to the caller's time zone

Current timestamp

In case the Run is not over, we cannot properly calculate its duration . In such case, we use the provided timestamp as an end timestamp.

Columns

If not provided, all supported table columns describing a Run are returned.

You can specify which columns to return by providing comma separated list.

The currently supported list is: name, product, version, build, os, scenariosTotal, scenariosFailed, testcasesTotal, testcasesfailed, testcasesSkipped, dateStart, dateEnd, duration and userNote.



Example usage

Let's have a look at this example:

http://localhost:8080/ats-httpdblogger/service/reporter/getRuns?dbName=MyTests&os=windows&numberItems=3&columns=name, version, build, duration

Here is the explanation:

  • Base URI http://localhost:8080/ats-httpdblogger/service/reporter/getRuns?
    It points to address of the the HTTP DB Logger Application and its public operation called getRuns
  • dbName - a must have parameter saying the database to work with
  • os - the operating system property of the runs
  • numberItems - max number of runs to be returned
  • columns - which columns to show

A possible result could be:

{"runs":[
{"Run":"Supreme Product Integration Tests", "Version":"3.12", "Build":"823", "Duration":"00:01:36"}
{"Run":"Supreme Product Integration Tests", "Version":"3.12", "Build":"821", "Duration":"00:08:13"}
{"Run":"Supreme Product Integration Tests", "Version":"3.12", "Build":"799", "Duration":"00:02:41"}
]}

We have returned info about 3 runs with specified OS. We got back only the specified columns.




The list of supported GET methods is supposed to grow



Back to parent page

Go to Table of Contents