Enable is committed to supporting your development and testing, ensuring integration is simple and robust. As with any software development, Enable encourages you to test your application with both positive and negative scenarios.
A list of example test cases has been provided for your convenience; however, this list is not intended to be comprehensive, and some test cases may not apply to your use of the API.
These test cases are intended for application within the Sandbox environment – please ensure mock tickets are created there.
Test Cases
The table below provides details of suggested test cases.
| 1 | Create Ticket | Create ticket following expected schema |
A JSON response is returned – containing the automatically created UID for the trouble ticket. The HTTP status code will be 200 (OK |
| 2 | Create Ticket | User does not have permission to create ticket |
An error is returned, the cause is: ‘User does not have the correct permissions to create a trouble ticket.’ The HTTP status code will be 403 (Forbidden) |
| 3 | Create Ticket | Try to create ticket without mandatory values in request e.g. exclude end user information |
An error is returned, the cause is: ‘[object has missing required properties (["missed_field"])]’ The HTTP status code will be 400 (Bad Request) |
| 4 | Create Comment | Create a comment against a ticket |
No content will be returned – status code will show the outcome. When ticket is retrieved via Fetch or Search API the comment will display within an array for comments. When ticket is viewed on Zendesk UI the comment will display. The HTTP status code will be 201 (Created) |
| 5 | Create Comment | Create a comment with an attachment token |
No content will be returned – status code will show the outcome. When ticket is retrieved via Fetch or Search API the comment – with associated attachment – will display within an array for comments. When comment is viewed on Zendesk UI – the attachment will display against it. The HTTP status code will be 201 (Created) |
| 6 | Create Comment | Create a comment against a ticket that does not exist |
An error will be returned. Cause will be ‘{"error":"RecordNotFound","description": “Not found"}’ The HTTP status code will be 400 (Bad Request) |
| 7 | Create Attachment | Create an attachment with a file that is under 10MB |
A JSON response is returned – containing the automatically created UID and attachment token for the attachment. The HTTP status code will be a 200 (OK) |
| 8 | Create Attachment | Create an attachment with a file that has the wrong extension |
An error will be returned. The cause will be: ‘Unable to process your request as the attached file media type is unsupported.’ The HTTP status code will be 400 (Bad Request) |
| 9 | Create Attachment | Create an attachment that is too large over 10 MB |
An error will be returned, cause will be: ‘HTTP content length exceeded 10485760 bytes.’ The HTTP status code will be 413 (Request too Large) |
| 10 | Fetch Ticket by ID | Ticket is retrieved using it's ID |
Ticket will be retrieved – a JSON response will be returned displaying various ticket details. The HTTP status code will be 200 (OK) |
| 11 | Fetch Ticket by ID | User does not have access to Trouble Ticket |
An error will be returned – cause is ‘Unable to find the requested resource’. The HTTP status code will be 404 (Not Found) |
| 12 | Search for Ticket | Tickets are returned for an end user email and pagination is not specified |
Using auto-complete logic, if the page_size query parameter is not specified then the results JSON array, of up to 100 matches, will be returned otherwise will be limited up to the specified valid page_size value. The HTTP status code will be 200 (OK) |
| 13 | Search for Ticket | Tickets are returned for an end user email and pagination (page_size and page) is specified |
The pagination links will be provided (HATEOAS format). The HTTP status code will be 200 (OK) |
| 14 | Search for Ticket | User does not have access to Trouble Tickets searched for |
An empty array of results and an empty array of links will be returned. The HTTP status code will be 200 (OK) |
| 15 | Search for Ticket | Apply incorrect pagination values when trying to search, e.g. page_size = 300 (maximum is 100) |
An error will be returned. The cause is ‘Invalid search: Requested response size was greater than Search Response Limits’ The HTTP status code will be 422 (Insufficient Resources) |
Test Data
Specific test data is not required. You can create tickets with nearly any input – if they meet the API specification for the endpoint.
Authentication will determine what RSP email you can use to create tickets and what tickets you can retrieve via searching.