AutoTestService#

class AutoTestService[source]#

Methods

copy

Copy the given AutoTest configuration.

create

Create a new AutoTest configuration.

add_set

Create a new set within an AutoTest

get

Get the extended version of an AutoTest and its runs.

delete

Delete the given AutoTest.

patch

Update the settings of an AutoTest configuration.

get_run

Get the extended version of an AutoTestRun.

stop_run

Delete an AutoTest run, this makes it possible to edit the AutoTest.

delete_set

Delete an AutoTestSet (also known as level).

update_set

Update the given AutoTestSet (also known as level).

delete_suite

Delete an AutoTestSuite (also known as category).

get_result

Get the extended version of an AutoTest result.

create_output_html_proxy

Create a proxy to view the files of the given AT result through.

get_result_by_submission

Get the AutoTest result for a submission.

get_results_by_user

Get all AutoTest results for a given user.

get_attachment

Get the attachment of an AutoTest step.

get_fixture

Get the contents of the given AutoTestFixture.

get_not_started_results

Get all AutoTest results on this instance.

hide_fixture

Change the visibility of the given fixture.

show_fixture

Change the visibility of the given fixture.

restart_result

Restart an AutoTest result.

start_run

Start a run for the given AutoTest.

update_suite

Update or create a AutoTestSuite (also known as category)

copy(json_body, *, auto_test_id, extra_parameters=None)[source]#

Copy the given AutoTest configuration.

Parameters:
Returns:

The copied AutoTest configuration.

Return type:

AutoTest

create(multipart_data, *, extra_parameters=None)[source]#

Create a new AutoTest configuration.

Parameters:
Returns:

The newly created AutoTest.

Return type:

AutoTest

add_set(*, auto_test_id, extra_parameters=None)[source]#

Create a new set within an AutoTest

Parameters:
Returns:

The newly created set.

Return type:

AutoTestSet

get(*, auto_test_id, latest_only=False, extra_parameters=None)[source]#

Get the extended version of an AutoTest and its runs.

Parameters:
Returns:

The extended serialization of an AutoTest and the extended serialization of its runs.

Return type:

ResultDataGetAutoTestGet

delete(*, auto_test_id, extra_parameters=None)[source]#

Delete the given AutoTest.

This route fails if the AutoTest has any runs, which should be deleted separately.

Parameters:
Returns:

Nothing.

Return type:

None

patch(multipart_data, *, auto_test_id, extra_parameters=None)[source]#

Update the settings of an AutoTest configuration.

Parameters:
Returns:

The updated AutoTest.

Return type:

AutoTest

get_run(*, auto_test_id, run_id, latest_only=False, extra_parameters=None)[source]#

Get the extended version of an AutoTestRun.

The result will also include all the results of the run. If you set the latest_only query parameter to a truthy value only the results of latest submissions will be provided.

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.

  • latest_only (bool) – Only retrieve the results for the latest submission by a user.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

The extended version of an AutoTestRun.

Return type:

ExtendedAutoTestRun

stop_run(*, auto_test_id, run_id, extra_parameters=None)[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:
Returns:

Nothing.

Return type:

None

delete_set(*, auto_test_id, auto_test_set_id, extra_parameters=None)[source]#

Delete an AutoTestSet (also known as level).

Parameters:
Returns:

Nothing.

Return type:

None

update_set(json_body, *, auto_test_id, auto_test_set_id, extra_parameters=None)[source]#

Update the given AutoTestSet (also known as level).

Parameters:
Returns:

The updated set.

Return type:

AutoTestSet

delete_suite(*, test_id, set_id, suite_id, extra_parameters=None)[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.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

Nothing.

Return type:

None

get_result(*, auto_test_id, run_id, result_id, extra_parameters=None)[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.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

The extended version of a AutoTestResult.

Return type:

ExtendedAutoTestResult

create_output_html_proxy(json_body, *, auto_test_id, run_id, result_id, suite_id, extra_parameters=None)[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:
Returns:

The created proxy.

Return type:

Proxy

get_result_by_submission(*, auto_test_id, run_id, submission_id, extra_parameters=None)[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.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

The AutoTest result for the given data.

Return type:

ExtendedAutoTestResult

get_results_by_user(*, auto_test_id, run_id, user_id, extra_parameters=None)[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.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

The list of AutoTest results for the given user, sorted from oldest to latest.

Return type:

Sequence[AutoTestResult]

get_attachment(*, auto_test_id, run_id, step_result_id, extra_parameters=None)[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.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

The attachment data, as an application/octet-stream.

Return type:

bytes

get_fixture(*, auto_test_id, fixture_id, extra_parameters=None)[source]#

Get the contents of the given AutoTestFixture.

Parameters:
Returns:

The content of the given fixture.

Return type:

bytes

get_not_started_results(*, offset=0, limit=50, state='not_started', extra_parameters=None)[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.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

The (limited) results of this instance, and the total amount of non requested results.

Return type:

AllAutoTestResults

hide_fixture(*, auto_test_id, fixture_id, extra_parameters=None)[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:
Returns:

Nothing.

Return type:

None

show_fixture(*, auto_test_id, fixture_id, extra_parameters=None)[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:
Returns:

Nothing.

Return type:

None

restart_result(*, auto_test_id, run_id, result_id, extra_parameters=None)[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.

  • extra_parameters (Optional[Mapping[str, Union[str, bool, int, float]]]) – The extra query parameters you might want to add. By default no extra query parameters are added.

  • self (AutoTestService[AuthenticatedClient]) –

Returns:

The extended version of a AutoTestResult.

Return type:

ExtendedAutoTestResult

start_run(*, auto_test_id, extra_parameters=None)[source]#

Start a run for the given AutoTest.

Parameters:
Returns:

The started run or a empty mapping if you do not have permission to see AutoTest runs.

Return type:

ExtendedAutoTestRun | Mapping[str, Literal[‘’]]

update_suite(json_body, *, auto_test_id, set_id, extra_parameters=None)[source]#

Update or create a AutoTestSuite (also known as category)

Parameters:
Returns:

The just updated or created AutoTestSuite.

Return type:

AutoTestSuite