postman

Trade Me API Automation Practice Instructions

Trade Me is New Zealand’s largest online auction and classifieds website.

This practice picks 10 typical Trade Me APIs aiming to demonstrate the API automation testing and CI process.

Preparation Stage

Trade Me sandbox front-end user register
Trade Me sandbox application register
Trade Me sandbox authorization
Postman - API testing tool. How to install Postman?
Newman - Postman API testing reports generating tool. How to install Newman?
Git Bash - Transfers files between local and GitHub. How to install Git Bash?
GitHub - Stores the repository of this practice.
JDK - Jenkins runtime environment. How to install JDK?
Jenkins - CICD tool. How to install Jenkins?
Node.js - back-end JavaScript runtime environment. How to install Node.js?
collections - Postman and Node.js script files

​ - nodemailer.js - email stakeholder the testing reports by this script

​ - Trade MeSandBox.postman_collection.json - Postman positive cases script

​ - Trade MeSandBox-Negative.postman_collection.json - Postman negative cases script

data - Postman environment variables and other temporary data files
node_modules folder

​ - fs module: generates when 1st time installing the Node.js

​ - moment module: gets the current time.

​ - nodemailer module: sends the email to stakeholders

reports - Newman TXT and HTML report files

postman_github folder - A clone of the above local working directory on the GitHub

Trade Me-1-API testing first demo

Scripting Stage

Trade Me-2-typical transactions
Trade Me-3-Retrieve general categories API testing
Trade Me-4-Retrieve your watchlist API testing
Trade Me-5-Remove a listing from your watchlist API testing
Trade Me-6-Retrieve closing soon listings API testing
Trade Me-7-Add a listing to your watchlist API testing
Trade Me-8-Retrieve your won items API testing
Trade Me-9-Remove a purchase from your won items list API testing
Trade Me-10-General search API testing
Trade Me-11-Retrieve the details of a single listing API testing
Trade Me-12-Buy an auction using Buy Now API scripting

Reports and CI Stage

Generating report by Collection Runner or Newman, and the Jenkins CI process

Fast track to start your testing

rem Initialization your local working folders
pushd d:\Software && md postman\collections postman\data postman\reports\hisreports postman\postman_github
rem set your postman home directory, this example is 'D:\Software\postman'
setx "POSTMAN_HOME" "D:\Software\postman" /M
rem clone demo GitHub repository 
pushd %POSTMAN_HOME%\postman_github && git init && git clone https://github.com/ifulltest/postman.git
rem copy GitHub demo collections and data to your local working directory
copy %POSTMAN_HOME%\postman_github\postman\collections\* %POSTMAN_HOME%\collections\ && copy %POSTMAN_HOME%\postman_github\postman\data\* %POSTMAN_HOME%\data\*

Get the authentication info refers to: Trade Me sandbox application register and Trade Me sandbox authorization

Till now, you can start to practice the API automation testing and CI process. Good luck! :)