ACCELQ Training API Testing Day 5
ACCELQ Training API Testing Day 5
END POINT
RESPONSE HEADERS
Path of the resource being requested via API.
Note: Endpoint URL in ACCELQ should include the base path as well. Indicates the metadata returned as part of the Response to the
Request. Returned as name/value pairs.
METHOD
Indicates the type of interaction (such as GET, POST, or DELETE) RESPONSE BODY
with the resource. Applicable for REST only.
Information returned by an API after a request is made.
Responses are usually in either JSON or XML format.
REQUEST HEADERS
Parameters that are included in the request header. Specified as
SPECIFICATION FILE
name/value pairs
File that describes the API service. Services available, request
formats, response samples etc.
REQUEST BODY (PAYLOAD)
Parameters that are included in the request body. Usually
submitted as JSON or XML. WSDL for SOAP and Swagger, SAML, RAML etc. for REST
Proprietary & Confidential. Copyright 2023, ACCELQ Inc.. www.accelq.com
Note on Library Context and API-Only Scenarios
Library Context
▪ Library Context is typically useful when
you want to build logic only for API and
back-end automation (without any UI
verifications)
▪ Makes it convenient to use Actions in
Scenarios in any order, as required.
Scenario Builder
▪ When building an API-only Scenario (a
scenario that does not include any UI
steps), you can skip the Scenario Builder
by clicking Create Scenario with Library or API
steps link.
Request Details
• End Point: https://qbankserver.accelq.com/api/login
• Headers: None
Response Verification
Verify following information
• Status: 200
• Header “Server” is “Cowboy”
• User Name
• Password
Parameters for Response
• Expected Name
• Expected Email
Step 1: Create REST API call using the wizard for authentication call.
Step 2: In the Response screen of the wizard, copy the JSON Path for
the required node. $['accessToken']
• JSON Path
API chaining allows making a series of API calls, which are dependent on each other (for data) to achieve a complete business
objective. Response parameters (including header and response body) from one API call forms an input (Request headers or Request
parameters) for subsequent calls.
• You make an API call for authentication, and retrieve authentication token.
• Using this authentication token as part of the Request parameter, you make another API call to retrieve a resource from the
service.
• Payload: N/A
Step 3: Get total balance from REST call (body of response) using the following command
Get ReST Response
Note
When using parameters in the Request headers or Request body, in the wizard, you will be required to furnish sample values to proceed to
next step.
Note
Notice how the authentication token is linked in Step #2 from Step #1
API Wizard allows you to build API test logic when the API is not accessible or even if the service is still under development.
• In the Wizard, API call will fail and display empty Response.
• Load a sample Response from a file and insert verifications as you would normally do.
• Complete end-to-end flow can be developed without the working API implementation.
Returns or verifies the value of a node in REST response body. REST call is
identified with the reference name and the Node is identified with standard
JSON Path string.
XML format
Objective
Use a calculator service to multiply two numbers.
• Method: Multiply
• Headers: None (be sure to delete the auto-created header in the screen)
• Payload: Provide values for first number and second number to multiply
Verification
Verify the result of multiplication
When tests are actually executing, API communication happens directly from the
Note:
Local Agent, which is running inside your firewall. Browser-based communication
option is only relevant when using the wizard in Action logic.