The TestEngine license limits the maximum number of concurrently running test jobs. If this limit is exceeded, TestEngine puts the test jobs in a queue. This topic describes how to learn the number of queued and sent test jobs, how much time jobs spent in a queue before starting, and so on.
The following statistics are used to analyze the TestEngine usage:
-
Peak usage — the maximum number of running and queued test jobs for the specified time period.
-
Test jobs — the total number of running and queued test jobs for the specified time period.
-
Current test jobs — the number of running and queued test jobs at the current moment.
-
Wait time — the maximum and average time the test jobs were in a queue during the specified time period.
Get peak usage statistics
Peak usage statistics show how many tests were running simultaneously. TestEngine groups the statistics by hours.
Using API
Use the following operation:
GET http:///api/v1/testjobs/stats/peak[?from=date][&to=date]
from
A date and time in the YYYY-MM-DDThh:mm:ssZ
format. If it is specified, only the TestEngine peak usage statistics after this date and time will be retrieved.
Tip: |
Z indicates the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm . |
to
A date and time in the YYYY-MM-DDThh:mm:ssZ
format. If it is specified, only the TestEngine peak usage statistics before this date and time will be retrieved.
Tip: |
Z indicates the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm .
|
Example
ExampleHide example
Use the following command line:
curl -u "user:Password" -X GET "http://localhost:8080/api/v1/testjobs/stats/peak?from=2019-06-04T00:00:00Z&to=2019-06-06T00:00:00Z"
In this example:
-u user:Password
Authenticates the request with the user’s credentials.
-X GET
Specifies the GET method.
"http://localhost:8080/api/v1/testjobs/stats/peak"
The endpoint of the request.
from=2019-06-04T00:00:00Z
Date and time. The peak statistics after this time will be retrieved.
to=2019-06-06T00:00:00Z
Date and time. The peak statistics before this time will be retrieved.
-
Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do that.
-
Select the GET request to the /api/v1/testjobs/stats/peak resource:
Click the image to enlarge it.
-
Specify the time frame for which you want to get the Audit Log:
-
Open the Auth panel.
-
Select the Basic (Built-in) authorization type.
-
Specify user credentials and select the Authenticate pre-emptively option:
Click the image to enlarge it.
-
Send the request:
Click the image to enlarge it.
-
The response will list the Audit Log entries related to the user for the specified period of time:
Using Web UI
-
Go to the home page of TestEngine:
http://<testengine-host>:<port>/
For example, if TestEngine is installed on your local machine, and you run it on the default port, use the following link:
-
Go to Statistics:
Click the image to enlarge it.
The top graph shows the peak usage statistics for the specified period of time. To select another time period, use the controls in the top-left corner:
Click the image to enlarge it.
Get total usage statistics
The total usage statistics show the total number of running or queued test jobs for the specified period of time.
Using API
Use the following operation:
GET http:///api/v1/testjobs/stats/count[?from=date][&to=date]
from
A date and time in the YYYY-MM-DDThh:mm:ssZ
format. If it is specified, only the TestEngine usage statistics after this date and time will be retrieved.
Tip: |
Z indicates the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm . |
to
A date and time in the YYYY-MM-DDThh:mm:ssZ
format. If it is specified, only the TestEngine usage statistics before this date and time will be retrieved.
Tip: |
Z indicates the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm . |
Example
ExampleHide example
Use the following command line:
curl -u "user:Password" -X GET "http://localhost:8080/api/v1/testjobs/stats/count?from=2019-06-04T00:00:00Z&to=2019-06-06T00:00:00Z"
In this example:
-u user:Password
Authenticates the request with the user’s credentials.
-X GET
Specifies the GET method.
"http://localhost:8080/api/v1/testjobs/stats/count"
The endpoint of the request.
from=2019-06-04T00:00:00Z
Date and time. The total statistics after this time will be retrieved.
to=2019-06-06T00:00:00Z
Date and time. The total statistics before this time will be retrieved.
-
Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do that.
-
Select the GET request to the /api/v1/testjobs/stats/count resource:
Click the image to enlarge it.
-
Specify the time frame for which you want to get the statistics:
-
Open the Auth panel.
-
Select the Basic (Built-in) authorization type.
-
Specify user credentials and select the Authenticate pre-emptively option:
Click the image to enlarge it.
-
Send the request:
Click the image to enlarge it.
-
The response will show statistics for the specified period of time grouped by hours:
Using Web UI
-
Go to the home page of TestEngine:
http://<testengine-host>:<port>/
For example, if TestEngine is installed on your local machine and you run it on the default port, use the following link:
-
Go to Statistics:
Click the image to enlarge it.
The bottom graph shows the total number of the run and queued test jobs for the specified period of time. To select another time period, use the controls in the top-left corner:
Click the image to enlarge it.
Get current usage
To learn how many tests are running or in a queue at the moment, do the following:
GET http:///api/v1/testjobs/stats/current
Example
ExampleHide example
Use the following command line:
curl -u "user:Password" -X GET "http://localhost:8080/api/v1/testjobs/stats/current"
In this example:
-u user:Password
Authenticates the request with the user’s credentials.
-X GET
Specifies the GET method.
"http://localhost:8080/api/v1/testjobs/stats/current"
The endpoint of the request.
-
Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do that.
-
Select the GET request to the /api/v1/testjobs/stats/current resource:
Click the image to enlarge it.
-
Open the Auth panel.
-
Select the Basic (Built-in) authorization type.
-
Specify user credentials and select the Authenticate pre-emptively option:
Click the image to enlarge it.
-
Send the request and analyze the response:
Get waiting time
To get information on how long test jobs were in a queue (in milliseconds), run the following command:
GET http:///api/v1/testjobs/stats/wait[?from=date][&to=date]
from
A date and time in the YYYY-MM-DDThh:mm:ssZ
format. If it is specified, TestEngine returns the waiting time of the test jobs that were sent after this date and time.
Tip: |
Z indicates the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm . |
to
A date and time in the YYYY-MM-DDThh:mm:ssZ
format. If it is specified, TestEngine returns the waiting time of the test jobs that were sent before this date and time.
Tip: |
Z indicates the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm . |
Example
ExampleHide example
Use the following command line:
curl -u "user:Password" -X GET "http://localhost:8080/api/v1/testjobs/stats/wait?from=2019-07-04T00:00:00Z&to=2019-07-06T00:00:00Z"
In this example:
-u user:Password
Authenticates the request with the user’s credentials.
-X GET
Specifies the GET method.
"http://localhost:8080/api/v1/testjobs/stats/wait"
The endpoint of the request.
from=2019-07-04T00:00:00Z
Date and time. The waiting time will be calculated using the test jobs sent after this time.
to=2019-07-06T00:00:00Z
Date and time. The waiting time will be calculated using test jobs sent before this time.
-
Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do that.
-
Select the GET request to the /api/v1/testjobs/stats/wait resource:
Click the image to enlarge it.
-
Specify the time frame for which you want the waiting time to be calculated:
-
Open the Auth panel.
-
Select the Basic (Built-in) authorization type.
-
Specify user credentials and select the Authenticate pre-emptively option:
Click the image to enlarge it.
-
Send the request:
Click the image to enlarge it.
-
The response will show the maximum and average waiting time of test jobs for the specified time frame:
The address and port of your TestEngine installation.
The address and port of your TestEngine installation.
The address and port of your TestEngine installation.
The address and port of your TestEngine installation.
See Also
Applying Floating Licenses