AutoTestService#
- class AutoTestService[source]#
Methods
Copy the given AutoTest configuration.
Create a new AutoTest configuration.
Create a new set within an AutoTest
Get the extended version of an AutoTest and its runs.
Delete the given AutoTest.
Update the settings of an AutoTest configuration.
Get the extended version of an AutoTestRun.
Delete an AutoTest run, this makes it possible to edit the AutoTest.
Delete an AutoTestSet (also known as level).
Update the given AutoTestSet (also known as level).
Delete an AutoTestSuite (also known as category).
Get the extended version of an AutoTest result.
Create a proxy to view the files of the given AT result through.
Get the AutoTest result for a submission.
Get all AutoTest results for a given user.
Get the attachment of an AutoTest step.
Get the contents of the given AutoTestFixture.
Get all AutoTest results on this instance.
Change the visibility of the given fixture.
Change the visibility of the given fixture.
Restart an AutoTest result.
Start a run for the given AutoTest.
Update or create a AutoTestSuite (also known as category)
- copy(json_body, *, auto_test_id)[source]#
Copy the given AutoTest configuration.
- Parameters:
json_body (
CopyAutoTestData
) – The body of the request. SeeCopyAutoTestData
for information about the possible fields. You can provide this data as aCopyAutoTestData
or as a dictionary.auto_test_id (
int
) – The id of the AutoTest config which should be copied.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The copied AutoTest configuration.
- Return type:
- create(multipart_data)[source]#
Create a new AutoTest configuration.
- Parameters:
multipart_data (
CreateAutoTestData
) – The data that should form the body of the request. SeeCreateAutoTestData
for information about the possible fields.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The newly created AutoTest.
- Return type:
- add_set(*, auto_test_id)[source]#
Create a new set within an AutoTest
- Parameters:
auto_test_id (
int
) – The id of the AutoTest wherein you want to create a set.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The newly created set.
- Return type:
- get(*, auto_test_id)[source]#
Get the extended version of an AutoTest and its runs.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest to get.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The extended serialization of an AutoTest and the extended serialization of its runs.
- Return type:
- delete(*, auto_test_id)[source]#
Delete the given AutoTest.
This route fails if the AutoTest has any runs, which should be deleted separately.
- Parameters:
auto_test_id (
int
) – The AutoTest that should be deleted.self (AutoTestService[AuthenticatedClient]) –
- Returns:
Nothing.
- Return type:
None
- patch(multipart_data, *, auto_test_id)[source]#
Update the settings of an AutoTest configuration.
- Parameters:
multipart_data (
PatchAutoTestData
) – The data that should form the body of the request. SeePatchAutoTestData
for information about the possible fields.auto_test_id (
int
) – The id of the AutoTest you want to update.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The updated AutoTest.
- Return type:
- get_run(*, auto_test_id, run_id)[source]#
Get the extended version of an AutoTestRun.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest which is connected to the requested run.run_id (
int
) – The id of the run to get.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The extended version of an AutoTestRun.
- Return type:
- stop_run(*, auto_test_id, run_id)[source]#
Delete an AutoTest run, this makes it possible to edit the AutoTest.
This also clears the rubric categories filled in by the AutoTest.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest of which the run should be deleted.run_id (
int
) – The id of the run which should be deleted.self (AutoTestService[AuthenticatedClient]) –
- Returns:
Nothing.
- Return type:
None
- delete_set(*, auto_test_id, auto_test_set_id)[source]#
Delete an AutoTestSet (also known as level).
- Parameters:
auto_test_id (
int
) – The id of the AutoTest of the to be deleted set.auto_test_set_id (
int
) – The id of the AutoTestSet that should be deleted.self (AutoTestService[AuthenticatedClient]) –
- Returns:
Nothing.
- Return type:
None
- update_set(json_body, *, auto_test_id, auto_test_set_id)[source]#
Update the given AutoTestSet (also known as level).
- Parameters:
json_body (
UpdateSetAutoTestData
) – The body of the request. SeeUpdateSetAutoTestData
for information about the possible fields. You can provide this data as aUpdateSetAutoTestData
or as a dictionary.auto_test_id (
int
) – The id of the AutoTest of the set that should be updated.auto_test_set_id (
int
) – The id of the AutoTestSet that should be updated.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The updated set.
- Return type:
- delete_suite(*, test_id, set_id, suite_id)[source]#
Delete an AutoTestSuite (also known as category).
- Parameters:
test_id (
int
) – The id of the AutoTest where the suite is located in.set_id (
int
) – The id of the AutoTestSet where the suite is located in.suite_id (
int
) – The id of the AutoTestSuite you want to delete.self (AutoTestService[AuthenticatedClient]) –
- Returns:
Nothing.
- Return type:
None
- get_result(*, auto_test_id, run_id, result_id)[source]#
Get the extended version of an AutoTest result.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest in which the result is located.run_id (
int
) – The id of run in which the result is located.result_id (
int
) – The id of the result you want to get.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The extended version of a AutoTestResult.
- Return type:
- create_output_html_proxy(json_body, *, auto_test_id, run_id, result_id, suite_id)[source]#
Create a proxy to view the files of the given AT result through.
This allows you to view files of an AutoTest result (within a suite) without authentication for a limited time.
- Parameters:
json_body (
CreateOutputHtmlProxyAutoTestData
) – The body of the request. SeeCreateOutputHtmlProxyAutoTestData
for information about the possible fields. You can provide this data as aCreateOutputHtmlProxyAutoTestData
or as a dictionary.auto_test_id (
int
) – The id of the AutoTest in which the result is located.run_id (
int
) – The id of run in which the result is located.result_id (
int
) – The id of the result from which you want to get the files.suite_id (
int
) – The suite from which you want to proxy the output files.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The created proxy.
- Return type:
- get_result_by_submission(*, auto_test_id, run_id, submission_id)[source]#
Get the AutoTest result for a submission.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest in which to get the result.run_id (
int
) – The id of the AutoTestRun in which to get the result.submission_id (
int
) – The id of the submission from which you want to get the result.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The AutoTest result for the given data.
- Return type:
- get_results_by_user(*, auto_test_id, run_id, user_id)[source]#
Get all AutoTest results for a given user.
If you don’t have permission to see the results of the requested user an empty list will be returned.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest in which to get the results.run_id (
int
) – The id of the AutoTestRun in which to get the results.user_id (
int
) – The id of the user of which we should get the results.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The list of AutoTest results for the given user, sorted from oldest to latest.
- Return type:
- get_attachment(*, auto_test_id, run_id, step_result_id)[source]#
Get the attachment of an AutoTest step.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest in which the result is located.run_id (
int
) – The id of run in which the result is located.step_result_id (
int
) – The id of the step result of which you want the attachment.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The attachment data, as an application/octet-stream.
- Return type:
- get_fixture(*, auto_test_id, fixture_id)[source]#
Get the contents of the given AutoTestFixture.
- Parameters:
auto_test_id (
int
) – The AutoTest this fixture is linked to.fixture_id (
int
) – The id of the fixture which you want the content.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The content of the given fixture.
- Return type:
- get_not_started_results(*, offset=0, limit=50, state='not_started')[source]#
Get all AutoTest results on this instance.
- Parameters:
offset (
int
) – First non started result to get.limit (
int
) – Amount of non started results to get.state (
Literal
['not_started'
]) – The state the results should be in, currently only not_started is supported.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The (limited) results of this instance, and the total amount of non requested results.
- Return type:
- hide_fixture(*, auto_test_id, fixture_id)[source]#
Change the visibility of the given fixture.
Doing a POST request to this route will hide the fixture, doing a DELETE request to this route will set hidden to False.
- Parameters:
auto_test_id (
int
) – The AutoTest this fixture is linked to.fixture_id (
int
) – The fixture which you to hide or show.self (AutoTestService[AuthenticatedClient]) –
- Returns:
Nothing.
- Return type:
None
- show_fixture(*, auto_test_id, fixture_id)[source]#
Change the visibility of the given fixture.
Doing a POST request to this route will hide the fixture, doing a DELETE request to this route will set hidden to False.
- Parameters:
auto_test_id (
int
) – The AutoTest this fixture is linked to.fixture_id (
int
) – The fixture which you to hide or show.self (AutoTestService[AuthenticatedClient]) –
- Returns:
Nothing.
- Return type:
None
- restart_result(*, auto_test_id, run_id, result_id)[source]#
Restart an AutoTest result.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest in which the result is located.run_id (
int
) – The id of run in which the result is located.result_id (
int
) – The id of the result you want to restart.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The extended version of a AutoTestResult.
- Return type:
- start_run(*, auto_test_id)[source]#
Start a run for the given AutoTest.
- Parameters:
auto_test_id (
int
) – The id of the AutoTest for which you want to start a run.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The started run or a empty mapping if you do not have permission to see AutoTest runs.
- Return type:
- update_suite(json_body, *, auto_test_id, set_id)[source]#
Update or create a AutoTestSuite (also known as category)
- Parameters:
json_body (
UpdateSuiteAutoTestData
) – The body of the request. SeeUpdateSuiteAutoTestData
for information about the possible fields. You can provide this data as aUpdateSuiteAutoTestData
or as a dictionary.auto_test_id (
int
) – The id of the AutoTest in which this suite should be created.set_id (
int
) – The id the AutoTestSet in which this suite should be created.self (AutoTestService[AuthenticatedClient]) –
- Returns:
The just updated or created AutoTestSuite.
- Return type: