Skip to main content

Using this module you can create a API collection and it also has lots of utilities to validate the response, status code, store a value in collection variable etc.

Project description

CAKE API:
Using this module you can create a API collection and it also has lots of utilities to validate the response, status code, store a value in collection variable etc.

INSTALLATION:

pip install CakeApi

USAGE:
from CakeApi.CakeApiUtilities import CreateApiCollection

demoApiCollection = CreateApiCollection(baseUrl="https://reqres.in/")
demoApiCollection.hitTheGetRequest(url="/api/users?page=2").validateStatusCodeIs200()\
    .validateTheResponseValue(expectedValue="Michael", responseDictPath="['data'][0]['first_name']")\
    .hitThePostRequest(url="/api/users", data=dict(name="morpheus", job="leader")).validateStatusCodeIs201()\
    .validateTheResponseValue(expectedValue="leader", responseDictPath="['job']")

Note: Refer the function comments, to get a better idea on the usage.

CONTACT:
Contact me for collabration.

Email - krishnaForTestAutomation@gmail.com

LinkedIn - https://www.linkedin.com/in/krishna-kumar-859a73134

LICENSE:
© 2020 Krishna Kumar Viswanathan
This repository is licensed under the MIT license See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CakeApi-1.0.5.tar.gz (1.8 MB view hashes)

Uploaded Source

Built Distribution

CakeApi-1.0.5-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page