@RestController @RequestMapping(path="api/v1/tests") public class TestRestAPI extends AbstractRestResource
The URL pattern:
gson, logger| Constructor and Description |
|---|
TestRestAPI(MongoTestDAO testDAO,
TestService testService,
LogService logService,
TestRunServicesCache testRunServices) |
copyDBObject, maskValuespublic TestRestAPI(MongoTestDAO testDAO, TestService testService, LogService logService, TestRunServicesCache testRunServices)
testDAO - low-level data service for teststestService - test service for retrieving calculated datalogService - service to log basic crud for end user recordtestRunServices - factory providing access to test run services@GetMapping(produces="application/json") public String getTests(@RequestParam(value="release",required=false) String release, @RequestParam(value="schema",required=false) Integer schema, @RequestParam(value="skip",defaultValue="0") int skip, @RequestParam(value="count",defaultValue="50") int count)
@PostMapping(consumes="application/json",
produces="application/json")
public String createTest(@RequestBody
TestDetails testDetails)
@GetMapping(path="/{test}",
produces="application/json")
public String getTest(@PathVariable(value="test")
String test)
@PutMapping(produces="application/json",
consumes="application/json")
public String updateTest(@RequestBody
TestDetails testDetails)
@DeleteMapping(value="/{test}")
public void deleteTest(@PathVariable(value="test")
String test,
@RequestParam(value="clean",defaultValue="true")
boolean clean)
test - the name of the testclean - true to remove all related test runs as well@GetMapping(path="/{test}/drivers",
produces="application/json")
public String getTestDrivers(@PathVariable(value="test")
String test,
@RequestParam(value="activeOnly",defaultValue="true")
boolean activeOnly)
@GetMapping(path="/{test}/props/{property:.+}",
produces="application/json")
public String getTestProperty(@PathVariable(value="test")
String test,
@PathVariable(value="property")
String property)
@PutMapping(path="/{test}/props/{property:.+}",
produces="application/json",
consumes="application/json")
public String setTestProperty(@PathVariable(value="test")
String test,
@PathVariable(value="property")
String property,
@RequestBody
PropSetBean propBean)
@DeleteMapping(path="/{test}/props/{property:.+}",
produces="application/json",
consumes="application/json")
public String unsetTestProperty(@PathVariable(value="test")
String test,
@PathVariable(value="property")
String property,
@RequestBody
PropSetBean propBean)
@GetMapping(path="/{test}/runs",
produces="application/json")
public String getTestRuns(@PathVariable(value="test")
String test,
@RequestParam(value="skip",defaultValue="0")
int skip,
@RequestParam(value="count",defaultValue="50")
int count,
@RequestParam(value="state",defaultValue="")
String stateStr)
@PostMapping(path="/{test}/runs",
produces="application/json",
consumes="application/json")
public String createTestRun(@PathVariable(value="test")
String test,
@RequestBody
TestRunDetails testRunDetails)
@GetMapping(path="/{test}/runs/{run}",
produces="application/json")
public String getTestRun(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@PutMapping(path="/{test}/runs",
consumes="application/json",
produces="application/json")
public String updateTestRun(@PathVariable(value="test")
String test,
@RequestBody
TestRunDetails testRunDetails)
@DeleteMapping(path="/{test}/runs/{run}")
public void deleteTestRun(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run,
@RequestParam(value="clean",defaultValue="true")
boolean clean)
test - the name of the testrun - the name of the test runclean - true to remove all related test run data as well@GetMapping(path="/{test}/runs/{run}/props/{property:.+}",
produces="application/json")
public String getTestRunProperty(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run,
@PathVariable(value="property")
String property)
@PutMapping(path="/{test}/runs/{run}/props/{property:.+}",
produces="application/json",
consumes="application/json")
public String setTestRunProperty(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run,
@PathVariable(value="property")
String property,
@RequestBody
PropSetBean propBean)
@GetMapping(path="/{test}/runs/{run}/summary",
produces="application/json")
public String getTestRunSummary(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@GetMapping(path="/{test}/runs/{run}/state",
produces="application/json")
public String getTestRunState(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@PostMapping(path="/{test}/runs/{run}/schedule",
produces="application/json",
consumes="application/json")
public String scheduleTestRun(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run,
@RequestBody
TestRunSchedule schedule)
@PostMapping(path="/{test}/runs/{run}/terminate",
produces="application/json",
consumes="application/json")
public String terminateTestRun(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@GetMapping(path="/{test}/runs/{run}/exportProps",
produces="application/json")
public String exportProps(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run)
@PostMapping(path="/{test}/runs/{run}/importProps",
produces="application/json",
consumes="application/json")
public String importProps(@PathVariable(value="test")
String test,
@PathVariable(value="run")
String run,
@RequestBody
PropSetBean propBean)
@GetMapping(path="/{test}/exportProps",
produces="application/json")
public String exportTestProps(@PathVariable(value="test")
String test)
@PostMapping(path="/{test}/importProps",
produces="application/json",
consumes="application/json")
public String importTestProps(@PathVariable(value="test")
String test,
@RequestBody
PropSetBean propBean)
Copyright © 2005–2018 Alfresco Software. All rights reserved.