Showing posts with label Automation Testing. Show all posts
Showing posts with label Automation Testing. Show all posts

Free Public Rest API's for API Testing & Learning API Automation

Here are a Couple of Free sample Rest API URL that anyone can use for Testing, learning API Automation and Prototyping.
No Registration or Authentication is required for these API's. Go Ahead and try out the API's using any API client like SoapUI or Postman.
In the video below, I have used soapUI to explore the API's and how to do different types of API requests.
Happy Learning!!


Read More »

How To Set RestAPI Headers in SoapUI - Manually and Dynamically


Headers are an important part of RestAPI Request and Response. In this video let us learn how to set the headers in 3 different ways.
 - Set Custom Headers manually.
 - Set Headers from custom Properties in Project or Testsuite or Testcase level.
 - Set Headers dynamically from API response using Property Transfer Step.

In the following video, you will see How to Add Headers in SoapUI Opensource, both static and dynamically reading from Response.



The API used is freely available at https://gorest.co.in/, you need to register to get the API token.
Read More »

How To Do Contains Assertion in SoapUI


SoapUI Assertions are used to validate the API response received by a TestStep API during Testcase execution. "Contains Assertion" searches for a string in the API response and based on the availability of the string marks pass/fail for the Testcase. We have options of "Ignore Case" and "Regular Expression" on the search string.
In the following video, you will see about "Contains Assertion" in SoapUI Opensource. Also "Not Contains Assertion" is similar and can be used within a Testcase.


Read More »

Free Sample Rest API Server for Testing and Prototyping

Python-Flask-JWT based Rest API server, can be used to API Automation learning, prototyping.

Recently I was looking to try out an API automation tool for demo, and as I wanted to show test-case validation as well which required connecting to the backend DB, I wasn't able to find a proper public one with all my criteria's.
Finally wrote a small Rest API server and pushed it to github, so anyone can use it and learn. It is very easy to setup and use with little skills in python and virtual env.

You can clone or download it from github:
https://github.com/saratkr/Py-Flask-API-Server

Please refer the readme.md for setting up the server in your windows machine. It has not been tested in Linux server, but can be made working with minimal changes.

Start the server from cmd line in windows:











Login: Once its running in your PC, you can get a JWT token with the login API endpoint:
http://127.0.0.1:5000/api/v1/users/login.
The default username/password is admin/admin.
See screenshot from Postman:



The Login response will give a Authorization token which will be used in the header of all other API requests.
Sample Request: Please see a sample getusers request:




Following API endpoints are supported:
  • Create new User: POST /api/v1/users/create
  • Get all users: GET /api/v1/users/getusers
  • Get one user with ID: GET /api/v1/users/1
  • Delete one user with ID: DELETE /api/v1/users/delete/2
  • Delete one user with email: DELETE /api/v1/users/delete
  • Update one user: UPDATE /api/v1/users/update
So please go ahead prototype your application, or try/learn Rest API Testing or even learn how to write API automation scripts using soapUI or Postman.

Learn complete SoapUI Testing with No Coding at Udemy using the link here.
Read More »