Documentation
¶
Index ¶
- type APIHandler
- func (ah *APIHandler) GetTest(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRun(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRunDetails(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRunStatus(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRuns(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTests(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestRun(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestRunCancel(w http.ResponseWriter, r *http.Request)
- type GetTestResponse
- type GetTestRunDetailedTask
- type GetTestRunDetailedTaskLog
- type GetTestRunDetailsResponse
- type GetTestRunResponse
- type GetTestRunTask
- type GetTestRunsResponse
- type GetTestsResponse
- type PostTestRunCancelRequest
- type PostTestRunCancelResponse
- type PostTestRunRequest
- type PostTestRunResponse
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIHandler ¶
type APIHandler struct {
// contains filtered or unexported fields
}
func NewAPIHandler ¶
func NewAPIHandler(logger logrus.FieldLogger, coordinator types.Coordinator) *APIHandler
func (*APIHandler) GetTest ¶
func (ah *APIHandler) GetTest(w http.ResponseWriter, r *http.Request)
GetTest godoc @Id getTest @Summary Get test definition by test ID @Tags Test @Description Returns the test definition with given ID. @Produce json @Param testId path string true "ID of the test definition to get details for" @Success 200 {object} Response{data=GetTestResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test/{testId} [get]
func (*APIHandler) GetTestRun ¶
func (ah *APIHandler) GetTestRun(w http.ResponseWriter, r *http.Request)
GetTestRun godoc @Id getTestRun @Summary Get test run by run ID @Tags TestRun @Description Returns the run details with given ID. Includes a summary and a list of task with limited details @Produce json @Param runId path string true "ID of the test run to get details for" @Success 200 {object} Response{data=GetTestRunResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId} [get]
func (*APIHandler) GetTestRunDetails ¶
func (ah *APIHandler) GetTestRunDetails(w http.ResponseWriter, r *http.Request)
GetTestRunDetails godoc @Id getTestRunDetails @Summary Get detailed test run by run ID @Tags TestRun @Description Returns the run details with given ID. Includes a summary and a list of task with all details (incl. logs & task configurations) @Produce json @Param runId path string true "ID of the test run to get details for" @Success 200 {object} Response{data=GetTestRunDetailsResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/details [get]
func (*APIHandler) GetTestRunStatus ¶
func (ah *APIHandler) GetTestRunStatus(w http.ResponseWriter, r *http.Request)
GetTestRunStatus godoc @Id getTestRunStatus @Summary Get test run status by run ID @Tags TestRun @Description Returns the run status with given ID. @Produce json @Param runId path string true "ID of the test run to get the status for" @Success 200 {object} Response{data=string} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/status [get]
func (*APIHandler) GetTestRuns ¶
func (ah *APIHandler) GetTestRuns(w http.ResponseWriter, r *http.Request)
GetTestRuns godoc @Id getTestRuns @Summary Get list of test runs @Tags TestRun @Description Returns a list of all test runs. @Produce json @Param test_id query string false "Return test runs for this test ID only" @Success 200 {object} Response{data=[]GetTestRunsResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_runs [get]
func (*APIHandler) GetTests ¶
func (ah *APIHandler) GetTests(w http.ResponseWriter, r *http.Request)
GetTests godoc @Id getTests @Summary Get list of test definitions @Tags Test @Description Returns the list of test definitions. These test definitions can be used to create new test runs and are supplied via the assertoor configuration. @Produce json @Success 200 {object} Response{data=[]GetTestsResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/tests [get]
func (*APIHandler) PostTestRun ¶
func (ah *APIHandler) PostTestRun(w http.ResponseWriter, r *http.Request)
PostTestRun godoc @Id postTestRun @Summary Schedule new test run by test ID @Tags TestRun @Description Returns the test & run id of the scheduled test execution. @Produce json @Param runOptions body PostTestRunRequest true "Rest run options" @Success 200 {object} Response{data=PostTestRunResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run [post]
func (*APIHandler) PostTestRunCancel ¶
func (ah *APIHandler) PostTestRunCancel(w http.ResponseWriter, r *http.Request)
PostTestRunCancel godoc @Id postTestRunCancel @Summary Cancel test run by test ID @Tags TestRun @Description Returns the test/run id & status of the cancelled test. @Produce json @Param runId path string true "ID of the test run to cancel" @Param cancelOptions body PostTestRunCancelRequest true "Test cancellation options" @Success 200 {object} Response{data=PostTestRunCancelResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/cancel [post]
type GetTestResponse ¶
type GetTestRunDetailedTask ¶
type GetTestRunDetailedTask struct {
Index uint64 `json:"index"`
ParentIndex uint64 `json:"parent_index"`
Name string `json:"name"`
Title string `json:"title"`
Started bool `json:"started"`
Completed bool `json:"completed"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Timeout uint64 `json:"timeout"`
RunTime uint64 `json:"runtime"`
Status string `json:"status"`
Result string `json:"result"`
ResultError string `json:"result_error"`
Log []*GetTestRunDetailedTaskLog `json:"log"`
ConfigYaml string `json:"config_yaml"`
}
type GetTestRunDetailsResponse ¶
type GetTestRunDetailsResponse struct {
RunID uint64 `json:"run_id"`
TestID string `json:"test_id"`
Name string `json:"name"`
Status types.TestStatus `json:"status"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Tasks []*GetTestRunDetailedTask `json:"tasks"`
}
type GetTestRunResponse ¶
type GetTestRunResponse struct {
RunID uint64 `json:"run_id"`
TestID string `json:"test_id"`
Name string `json:"name"`
Status types.TestStatus `json:"status"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Tasks []*GetTestRunTask `json:"tasks"`
}
type GetTestRunTask ¶
type GetTestRunTask struct {
Index uint64 `json:"index"`
ParentIndex uint64 `json:"parent_index"`
Name string `json:"name"`
Title string `json:"title"`
Started bool `json:"started"`
Completed bool `json:"completed"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Timeout uint64 `json:"timeout"`
RunTime uint64 `json:"runtime"`
Status string `json:"status"`
Result string `json:"result"`
ResultError string `json:"result_error"`
}