Skip to main content

QATLibrary

QAT (Quick API Tests) Library is a Data/Configuration Driven REST API Test Automation Library. Can be used as a Robot Framework Library or as standalone tool (CLI). This tool does not solve complex REST API automation scenarios, rather, provides a simple, lightweight and data-driven approach to create
automated REST API tests quickly. For complex flows, it is recommended to use the library with Robot Framework.

Features

  • No coding required. Quick and easy implementation for REST API Tests.
  • Run from CLI (CI/CD friendly).
  • Store Test Data, Documentation and Assertions in CSV File.
  • Authorization: Basic, Digest, OAuth1
  • Run as a Robot Framework Library with Dynamic Test Generation Support.
  • Supports all HTTP Methods, SSL Certificates, Proxy Server, Stream, Redirection, Request Timeout etc.
  • Robot Framework based execution, reports and logs (CLI or Library).

Assertions

  • Status Code
  • JSON Schema
  • Response Body
  • Response Headers
  • Response Time/SLA
  • Server Certificate

Install QATLibrary

Using Pip:

pip install qatlibrary

From Source:

python setup.py install

Execution

Using CLI (standalone):

qat -c sample/config.yaml -f sample/Tests.csv 

CLI Help:

qat --help

Use as Robot Framework Library

Example:

*** Settings ***
Library          QATLibrary
Suite Setup      QAT Dynamic Tests Setup        csvFile=${csvData}
Variables        config.yaml        # Or can be a robot framework variable (Test/Suite/Variablefile etc.)

*** Variables ***
${host}          httpbin.org
${csvData}       Tests.csv

*** Test Cases ***
Place Holder Test
    [Documentation]  Placeholder Test Required by Robot Framework Suite Runner.  
    No Operaiton 

Configurations and Test Data

QATLibrary requires a CSV file with required data to drive the tests. Config yaml or .py files can inject your desired configurations during runtime.

host: httpbin.org           # Required

#optional args
timeout: 5                  # Default 5 seconds
allow_redirects:            # Allow Redirects. Default True. 
stream:                     # True/False. 
http_proxy:                 # HTTP Proxy. Default None. 
https_proxy:                # HTTPS Proxy. Default None.

verify_server_cert: True    # True/False or path to CA Bundle. Default False. 
certificate:                # .pem format certificate. Default None
private_key:                # .pem format private key (unencrypted). Default None

# Required if using Basic/Digest Auth (Default None)
authUser:             
authPass:

# Required if using OAuth1 auth (Default None)
oauth1_app_key:
oauth1_app_secret:
oauth1_user_token:
oauth1_user_token_secret:
  • CSV Test Data: Test cases/data file. Test cases gets generated based on this file's data using Robot Framework.

Contributing

This is Sharif. I started this project basically to make my life a bit easier around simple REST API tests. This project is ideal for you if want to get some automated tests done quickly for your projects without coding and powerful assertion methods out of the box.

QATLibrary is on GitHub. Get in touch, via GitHub or otherwise, if you've got something to contribute, it'd be most welcome! Please follow the CONTRIBUTING.md for detailed guidelines.

License

QATLibrary is open source software provided under the MIT License. Please follow LICENSE.md for more details.

Metadata

Release files for QATLibrary 21.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for QATLibrary 21.1.10
File Size Uploaded
QATLibrary-21.1.10.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for QATLibrary 21.1.10
File Interpreter ABI Platform
QATLibrary-21.1.10-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 21.1 kB

Release files / QATLibrary-21.1.10.tar.gz

Download URL QATLibrary-21.1.10.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f6e2ec73a0328211c135793c4e9c8c0324e18920f7e94a8b3ef750827bfee535
BLAKE2b-256 checksum
How to use checksums
e6f4862aaa12d83d039c82e6562e5cd6d481d3ad73ce202e6a8cadb1942c8e08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

Release files / QATLibrary-21.1.10-py2.py3-none-any.whl

Download URL QATLibrary-21.1.10-py2.py3-none-any.whl
Size 9.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
21c50ad4254f45d9aacdb2c6a01ca472c0cbc43aa600dd0f429b560d9cb0aeaa
BLAKE2b-256 checksum
How to use checksums
5a21d1d062181e0adb23b0f8b3b894df3cba432edc6659d259821787caed5cb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

Release history Release notifications | RSS feed

23.5.3

2 release files

23.5.2

2 release files

23.4.1

2 release files

21.5.1

2 release files

This release

21.1.10 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page