Remove Jobs

Applies to TestEngine 1.31, last modified on December 20, 2024

To remove completed jobs from the TestEngine database, use the following operations:

Remove a single job

Using API

DELETE  http://<testengine-host>:8080/api/v1/testjob/{testjobId}/delete

Authentication

The request must be authenticated by a TestEngine user.
Note: If you authenticate as a non-admin user, you will be able to remove only test jobs that you have started. If you authenticate as an administrator, you will be able to remove any test job in TestEngine.

See details on SwaggerHub.

Use the following command line:

curl -u "user:password" -X DELETE "http://localhost:8080/api/v1/testjobs/{testjobId}/delete"

In this example:

-u user:password

Authenticates the request with the user’s credentials.

-X DELETE

Specifies the DELETE method.

"http://localhost:8080/api/v1/testjobs/{testjobId}/delete"

The endpoint of the request.
  1. Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do it.

    Tip: You can also create the needed request from scratch.
  2. Select the DELETE request to the /api/v1/testjobs/{testjobId}/delete resource:

    Delete a test job: Select a request

    Click the image to enlarge it.

  3. Enter the test job's id in the Value field of the testjobId parameter:

    Delete a test job: Enter a test job id
  4. Open the Auth panel.

  5. Select the Basic (Built-in) authorization type.

    Tip: If you use the same credentials in several requests, use authorization profiles.
  6. Specify the admin credentials and select the Authenticate pre-emptively option:

    Delete a test job: Add authorization

    Click the image to enlarge it.

  7. Send the request:

    Delete a test job older than a certain date: Send the request

    Click the image to enlarge it.

Using Web UI

  1. Go to the Run History page of the TestEngine:

    http://<testengine-host>:<port>/run-history

    For example, if TestEngine is installed on your local machine and you run it on the default port, use the following link:

  2. Click Remove test job next to the needed finished or canceled job:

    Remove a test job in the TestEngine web interface

    Click the image to enlarge it.

Remove several jobs

DELETE  http://<testengine-host>:8080/api/v1/testjobs[?before=YYYY-MM-DDThh:mm:ssZ]

before

The date and time in the YYYY-MM-DDThh:mm:ssZ format. Test jobs that were completed before this time will be deleted.

Z in the notation denotes the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm.

Examples:

2019-06-01T00:01:00Z
2019-08-30T17:30:00+08:00
2019-07-10T12:00:00-05:00

This parameter is optional. If it is omitted, TestEngine will delete test jobs according to the Maximum days to keep and Maximum jobs to keep options (see Configure TestEngine).

Authentication

The request must be authenticated by a TestEngine administrator.

See details on SwaggerHub.

Examples

Use the following command line:

curl -u "user:password" -X DELETE "http://localhost:8080/api/v1/testjobs?before=2019-06-01T17:00:00Z"

In this example:

-u user:password

Authenticates the request with the user’s credentials.

-X DELETE

Specifies the DELETE method.

"http://localhost:8080/api/v1/testjobs"

The endpoint of the request.

before=2019-06-01T17:00:00Z

The date and time.
Make sure to take your timezone into account.
  1. Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do it.

    Tip: You can also create the needed request from scratch.
  2. Select the DELETE request to the /testjobs resource:

    Delete test jobs older than a certain date: Select a request

    Click the image to enlarge it.

  3. Enter the date and time in the Value field of the before parameter:

    Delete test jobs older than a certain date: Input date and time
    Make sure to take your timezone into account.
  4. Open the Auth panel.

  5. Select the Basic (Built-in) authorization type.

    Tip: If you use the same credentials in several requests, use authorization profiles.
  6. Specify the admin credentials and select the Authenticate pre-emptively option:

    Delete test jobs older than a certain date: Add authorization

    Click the image to enlarge it.

  7. Send the request:

    Delete test jobs older than a certain date: Send the request

    Click the image to enlarge it.

  8. The response will include the count of deleted jobs:

    Delete test jobs older than a certain date: View count of deleted jobs

Before you perform this action, you might want to set the the Maximum days to keep and Maximum jobs to keep options. To learn how to do this, see Configure TestEngine.

Use the following command line:

curl -u "user:password" -X DELETE "http://localhost:8080/api/v1/testjobs"

In this example:

-u user:password

Authenticates the request with the user’s credentials.

-X DELETE

Specifies the GET method.

"http://localhost:8080/api/v1/testjobs"

The endpoint of the request.
  1. Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do it.

    Tip: You can also create the needed request from scratch.
  2. Select the DELETE request to the /testjobs resource. Leave the before parameter blank:

    Delete test jobs older than a certain date: Select a request

    Click the image to enlarge it.

  3. Open the Auth panel.

  4. Select the Basic (Built-in) authorization type.

    Tip: If you use the same credentials in several requests, use authorization profiles.
  5. Specify the admin credentials and select the Authenticate pre-emptively option:

    Delete test jobs older than a certain date: Add authorization

    Click the image to enlarge it.

  6. Send the request:

    Delete test jobs older than a certain date: Send the request

    Click the image to enlarge it.

  7. The response will include the count of deleted jobs:

    Delete test jobs older than a certain date: View count of deleted jobs

See Also

Run Tests

Highlight search results