Generating a Trend Report (Quality Analytics)

Using Quality Analytics API, you can generate a report that shows coverage over time. If you need to generate a trend report, you can reuse the following sample code to generate a report and get the URL to view it.

Please checkout SeaLights API Reference to see the full and latest API syntax available.

Script Dependencies

  • jq

  • curl

Script Configuration

Variable
Required
Type
Default
Description

DOMAIN

string

The domain for your SeaLights account lab.

SL_API_TOKEN

string

An API token for your lab (generated in the settings tab of the web app)

Script Output

  • The output of the script is written to: report.url

https://<DOMAIN>/quality-analytics/trend-report/single/<REPORT_ID>;from_public_api=true

Generating a Coverage Trend Report

Coverage Trend report allows the user to select test stages from a single application and see aggregated data over time or over reference builds.

This report will show:

  • Selected test stages overall and modified coverage (aggregated, and broken down per test stage)

  • Entire build coverage and modified coverage (aggregated across all test stages, optional additional chart element)

  • Number of methods and modified methods (optional additional chart element)

More information about the Coverage Trend report can be found here.

Report Configuration

Variable
Required
Type
Default
Description

APP_NAME

string

App to report

BRANCH_NAME

string

Branch to report

ALL_BUILDS

boolean

true

When true, show trend over time. When false, show trend over reference builds.

INTERVAL

ONE_WEEK | TWO_WEEKS | THREE_WEEKS | FOUR_WEEKS | ONE_MONTH

ONE_MONTH

When ALL_BUILDS is true, defines at which intervals to calculate coverage.

SELECTED_TEST_STAGES

string[]

8 most active test stages

Defines which test stages should be included in the report.

DATE_RANGE_LABEL

LAST_MONTH | LAST_TWO_MONTHS | LAST_THREE_MONTHS | LAST_SIX_MONTHS | LAST_YEAR | CUSTOM

LAST_SIX_MONTHS

Defines the date range of the report

REPORT_START_DATE

number ms

When date range is CUSTOM, defines the start date of the report.

REPORT_END_DATE

number ms

When date range is CUSTOM, defines the end date of the report.

NUM_OF_METHODS_CHART_ELEMENT

boolean

false

the report will include an additional chart element representing the number of methods.

ALL_TEST_STAGES

boolean

false

the report will include an additional chart line representing all test stages coverage.

COVERAGE_GATE_CHART_ELEMENT

boolean

false

Additional chart line representing the coverage gate.

Script

Generating a Group Coverage Trend Report

Group Coverage Trend report allows the user to select multiple applications and see aggregated data over time.

This report will show:

  • All applications aggregated overall coverage and modified coverage

  • Per application overall coverage and modified coverage

  • Number of methods and modified methods (optional additional chart element)

More information about the Group Coverage Trend report can be found here.

Report Configuration

APP_BRANCHES

AppBranch[]

List of App-Branches for the report.

INTERVAL

ONE_WEEK | TWO_WEEKS | THREE_WEEKS | FOUR_WEEKS | ONE_MONTH

ONE_MONTH

Defines at what intervals to calculate coverage.

DATE_RANGE_LABEL

LAST_MONTH | LAST_TWO_MONTHS | LAST_THREE_MONTHS | LAST_SIX_MONTHS | LAST_YEAR | CUSTOM

LAST_SIX_MONTHS

Defines the date range of the report.

REPORT_START_DATE

number ms

When date range is CUSTOM, defines the start date of the report.

REPORT_END_DATE

number ms

When date range is CUSTOM, defines the end date of the report.

NUM_OF_METHODS_CHART_ELEMENT

boolean

false

the report will include an additional chart element representing the number of methods.

Script

Last updated

Was this helpful?