@RestController
@RequestMapping(path="api/v1/tests/{test}/runs/{run}/results")
public class ResultsRestAPI
extends AbstractRestResource
The URL pattern:
| Modifier and Type | Field and Description |
|---|---|
static String |
ALL_EVENT_NAMES
states not to filter by event names when query event results
|
gson, logger| Constructor and Description |
|---|
ResultsRestAPI(TestRunServicesCache services) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAllEventsFilterName() |
String |
getEventResultEventNames(String test,
String run) |
String |
getEventResults(String test,
String run,
String filterEventName,
String filterSuccess,
int skipResults,
int numberOfResults) |
org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody |
getReportCSV(String test,
String run) |
org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody |
getReportXLSX(String test,
String run) |
String |
getTimeSeriesResults(String test,
String run,
long fromTime,
String timeUnit,
long reportPeriod,
int smoothing,
boolean chartOnly)
Retrieve an approximate number of results, allowing for a smoothing factor
(Simple Moving Average) -
the number of data results to including in the moving average.
|
copyDBObject, maskValuespublic static final String ALL_EVENT_NAMES
public ResultsRestAPI(TestRunServicesCache services)
services - object providing access to necessary test run servicestest - the name of the testrun - the name of the run@GetMapping(path="/csv",
produces="text/csv")
public org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody getReportCSV(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@GetMapping(path="/xlsx",
produces="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
public org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody getReportXLSX(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@GetMapping(path="/eventNames",
produces="application/json")
public String getEventResultEventNames(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@GetMapping(path="/allEventsFilterName",
produces="application/json")
public String getAllEventsFilterName()
@GetMapping(path="/ts",
produces="application/json")
public String getTimeSeriesResults(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run,
@RequestParam(value="fromTime",defaultValue="O")
long fromTime,
@RequestParam(value="timeUnit",defaultValue="SECONDS")
String timeUnit,
@RequestParam(value="reportPeriod",defaultValue="1")
long reportPeriod,
@RequestParam(value="smoothing",defaultValue="1")
int smoothing,
@RequestParam(value="chartOnly",defaultValue="true")
boolean chartOnly)
fromTime - the approximate time to start fromtimeUnit - the units of the 'reportPeriod' (default SECONDS). See TimeUnit.reportPeriod - how often a result should be output. This is expressed as a multiple of the 'timeUnit'.smoothing - the number of results to include in the Simple Moving Average calculationschartOnly - true to filter out results that are not of interest in performance charts@GetMapping(path="/eventResults",
produces="application/json")
public String getEventResults(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run,
@RequestParam(value="filterEventName",defaultValue="(All Events)")
String filterEventName,
@RequestParam(value="filterSuccess",defaultValue="All")
String filterSuccess,
@RequestParam(value="skipResults",defaultValue="0")
int skipResults,
@RequestParam(value="numberOfResults",defaultValue="10")
int numberOfResults)
Copyright © 2005–2018 Alfresco Software. All rights reserved.