API Testing
Documentation Home
  • Overview
  • Getting-Started
    • Intro-to-API
    • Table of Contents
  • Project-Setup
    • Certificates
    • Database Configuration
    • Global-&-Environment
    • Integration
    • Pre-requisite-API
    • Project Set Up
  • Functional-Testing
    • API to DB Assertion
    • Advanced Features
    • Build-Test-Script
    • Functional Assertions
    • Functional-Testing
    • 🎀Parameterization
    • Functional Reports
  • API-Process-Testing
    • Advanced Features
    • API Process
    • Getting Started
    • Performance-Testing
      • Performance Testing
  • Advanced-Features
    • Emailing & Downloading Report
    • Execute JavaScript
    • Nova AI Assertions
    • Advanced Reports
    • Xray Integration
  • FAQ
    • FAQs
Powered by GitBook
On this page
  • Build and Execute Test script.
  • Headers and Params:
  • Body
  • Execute Test Script
  1. Functional-Testing

Build-Test-Script

PreviousAdvanced FeaturesNextFunctional Assertions

Last updated 1 year ago

Build and Execute Test script.

Test Script Info

Select the type of API you'll be testing (REST, SOAP, GraphQL).

Field
Description

API type

Select REST, SOAP or GraphQL.

Name

The name of your API script.

Description

A description of your script.

Context Path

The path to your specific API.

Protocol

Defines a set of rules for communication( http/https).

Endpoint

URL where a service or resource can be accessed.

Port Number

It is network address. For example: 8080.

Verbs

The type of API call. GET, POST, PUT, DELETE or PATCH.

Timeout

Timeouts are used to avoid waiting APIs response.

URL in code Enabled

Encoding special characters within the URL.


Authorization:

Authorization in the context of APIs refers to the process of granting or denying access to specific resources, data, or functionalities within an API.

Type 1: Basic Authentication

Step 2: Provide the following credentials:

  • Enter authorized API Username.

  • Enter your Corresponding Password.

Type 2: OAuth 2.0 Authentication

Step 2 : Depending on the token retrieval method, do one of the following:

Option A: Access Token in Headers

Step-1 : Enter the Access Token to be added to headers.

Step-2 : Save the TestScript.

  • After saving the access token, it will be added in headers part along with prefix Bearer.

Option B: Access Token in Query Parameters

Step-1 : Enter the Access Token to be added to queryParams.

Step-2 : Save the TestScript.

  • After saving the access token, it will be added in query params.

Select Certificate


Headers and Params:

Headers

Headers consist of key-value pairs that provide additional information about the request or the client.

  • Key-Value Pair: Headers convey metadata, authentication tokens, content type, and more to the server.

    You can remove headers by clicking on the delete icon.

Path Parameter:

Path parameters are placeholders in the URL path that are replaced with actual values.

  • Provide Parameter Name, Parameter Value, Parameter Type details.

  • As they allow dynamic and resource-specific interactions, such as accessing specific endpoints or records.

  • Using Path Parameter in Test Script:

    Note: The name of the path parameter stated in both the Header and Params section must match the path parameter name utilized in the Info of your Test Script.

  • Path parameters can be removed by clicking on Delete Icon.

Query Parameter:

Query parameters are appended to the URL and are used to modify the request or filter responses.

  • Provide Parameter Name, Parameter Value, Parameter Type details.

  • As they enable filtering, sorting, and customizing requests to retrieve specific data.

  • You can remove Query Parameters by clicking on the delete icon.


Body

  • The payload of data sent in the request's body.

  • Typically used for POST, PUT, DELETE, and PATCH requests to send data to the server.

  • It include information like JSON objects, XML, or form data that the API endpoint expects.


Assertions

  • Within the realm of API testing, assertions encompass statements or conditions that verify if the real results of API requests and responses align with the anticipated outcomes.

  • Various categories of assertions supported within Functional Testing:

Execute Test Script

Step-1 : Click on Play icon to execute test.

Step-2 : Select the Environment name.

Step-3 : Then select desired Environment & click on the Run button.

Step 1: Choose the Basic Auth option.

Step 1 : Select the "OAuth 2.0" option.

Functional Assertions: Within API testing, Functional Assertions encompass a diverse range of validation techniques. These assertions serve the purpose of confirming the alignment between the anticipated and actual API responses. The supported assertions encompass aspects like Headers, JSON Path, XPATH, body content, and schema validation. For more comprehensive understanding

API to DB assertion: Within API testing, Functional Testing provides an array of assertions for API-to-DB validation, ensuring that API responses align as expected with corresponding database resources. For more comprehensive understanding

Step-4 : It will be navigated to .

Click Here
Click Here
Reports Page
image
image
image
image
image
image
image
image
image
image
image
Click here to check out option to upload Certificate