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.
-
-
-
Testing technical structure for this practice


Preparation Stage
-
Local environment preparations
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.
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

-
Start your first API testing
Scripting Stage
-
Trade Me typical transactions front-end UI and back-end API relationships
-
Trade Me API side scripts development and enhancement
Reports and CI Stage
Generating report by Collection Runner or Newman, and the Jenkins CI process
Fast track to start your testing
-
Initialization your local working folders
rem Initialization your local working folders
pushd d:\Software && md postman\collections postman\data postman\reports\hisreports postman\postman_github
-
Set your postman home directory
rem set your postman home directory, this example is 'D:\Software\postman'
setx "POSTMAN_HOME" "D:\Software\postman" /M
-
Clone demo GitHub repository
rem clone demo GitHub repository
pushd %POSTMAN_HOME%\postman_github && git init && git clone https://github.com/ifulltest/postman.git
-
Copy GitHub demo collections and data to your local working directory
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\*
-
Import collections into your Postman


-
Import Postman environment variables to your Postman


-
Replace with your authentication info on ‘Authorization - OAuth 1.0’ of your Postman.

-
Replace with your email-related info in the ‘%POSTMAN_HOME%\data\nodemailer.js’ file

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