Schedule regular execution of a test scenario

Sets the scheduling of a test scenario

PUT /manage/scenarios/{scenarioId}/schedule

URI Parameters

Name In Required Type Description

scenarioId

path

True

string

Version 4 UUID of the test scenario

Request Body

Name Type Required Description

scheduled

boolean

True

True if the scenario scheduling is enabled

frequency

string

True

The frequency of the scenario scheduling, possible values are HOURLY, DAILY, WEEKLY and MONTHLY

timeZone

string

True

TZ database name of the timezone of the scenario scheduling

minute

integer

True

Minute of the schedule, 0..59

hour

integer

False

Hour of the schedule, 0..23, required if the frequency is DAILY, WEEKLY or MONTHLY

daysOfWeek

string

False

Comma separated list of days of week, 1 - Monday, 7 - Sunday, length 0-13, regex pattern ^$|^(\d,)*\d$, required for WEEKLY frequency

daysOfMonth

string

False

Comma separated list of days of month, length 0-83, regex pattern ^$|^(\d{1,2},)*\d{1,2}$, required for MONTHLY frequency

Responses

Name Type Description

200 OK

Scenario

The scehduled scenario object

Consumes

  • application/json

Produces

  • application/json

Security

Every request requires a JWT access token for authentication in the Authorisation HTTP header. Please see the API authentication page for details about how to get a JWT token.

Authorization: Bearer {JWT_TOKEN}

Roles

  • Wenenu Owner

  • Wenenu Contributor

Sample request

PUT https://wenenu.com/manage/scenarios/55808630-8329-48d6-9674-108365366dc9/schedule HTTP/1.1
Authorization: Bearer {jwt_token}
Content-type: application/json

Request body:

{
  "scheduled": true,
  "timeZone": "Europe/London",
  "frequency": "WEEKLY",
  "minute": 20,
  "hour": 3,
  "daysOfWeek": "1,2,3,4,5,6,7"
}

Sample Response

Status code: 200 OK
Body:

{
  "id": "55808630-8329-48d6-9674-108365366dc9",
  "tenantId": "108365366dc9-88be-4c42-8329-55808630",
  "name": "My new edited scenario",
  "version": 0,
  "scheduled": true,
  "frequency": "WEEKLY",
  "timeZone": "Europe/London",
  "minute": 20,
  "hour": 3,
  "daysOfWeek": "1,2,3,4,5,6,7",
  "daysOfMonth": null,
  "emailReportEnabled": false,
  "emailReportTimeZone": "Europe/London",
  "nextScheduledRun": "2021-01-10T03:20:00.000+00:00",
  "lastStarted": null,
  "previousRuns": [
  ],
  "emailReportAddresses": []
}

Definitions

Scenario

Name Type Description

id

string

Version 4 UUID of the scenario

tenantId

string

Version 4 UUID of the Wenenu tenant of the scenario

name

string

Arbitrary name of the test scenario up to 256 characters

version

integer

Version number of the configuration of the scenario

scheduled

boolean

True if the scenario is scheduled for execution

frequency

string

Frequency of the schedule of the scenario, possible values are HOURLY, DAILY, WEEKLY and MONTHLY

timeZone

string

TZ database name of the timezone of the scenario scheduling

minute

integer

The minute of the scenario scheduling 0..59

hour

integer

The hour of the scenario scheduling 0..23

daysOfWeek

string

Comma-separated list of days of the week for weekly scenario scheduling, 1 - Monday, 7 - Sunday

daysOfMonth

string

Comma-separated list of days of the month for monthly scenario scheduling

emailReportEnabled

boolean

True if the run reports are sent out via email

emailReportTimeZone

string

TZ database name of the timezone of the run repoorts

nextScheduleRun

string

Date and time of the next scheduled execution in ISO 8601 format

lastStarted

string

Date and time of the last execution in ISO 8601 format

previousRuns

PreviousRun[]

Details of the last ten runs of the scenario

emailReportAddresses

string[]

List of email addresses to which the run reports are emailed, maximum three

PreviousRun

Name Type Description

id

string

Version 4 UUID of the scenario run

scheduledTime

string

The scheduled date and time of the scenario run in ISO 8601 format

startTime

string

Date and time of the actual start of the scenario run in ISO 8601 format

endTime

string

Date and time of the end of the scenario run in ISO 8601 format

state

string

The state of the scenario run, Possible values are NOT STARTED, RUNNING, FAILED and FINISHED

stepCount

integer

The total number of test steps in the scenario run

finished

integer

The number of finished test steps in the scenario run

failed

integer

The number of failed test steps in the scenario run

skipped

integer

The number of skipped test steps in the scenario run