WEB and API automation Tests
This repo contains tests written in JavaScript ES6 with Mocha BDD framework
located under : test/api/specs
API tests calls Methods from AWS SDK for NodeJs
using Mocha executor and Chai assertions
Test Scenario:
Step 1 - Request an EC2 Instance and Validate its Up and Running
Step 2 - Request Teardown of the EC2 Instance and Validate its Terminated
A Live GIF recording of the above can be seen here
Pre-Reqs:
To run this you must have a Access Key ID and Secret Access Key
Add those keys/values to the .env
file(explained later). Also your userRole should have AmazonEC2FullAccess
permission
Add ImageId, Region, API Version and Instance Type: Please use Free Tier Assets to avoid surprises in you next Credit-Card bill
What the Test does:EC2_CRUD_Test
Like UI tests, this API tests takes help of helper/action functions to test the above scenario
running
. Validate this status with help of Chai assertionsterminated
. Validate this status with help of Chai assertionsNote: The above test is not set up to run in CI as I have a public CircleCI account and don’t wanna risk exposing my AWS access key-id credential to the www
Java Development Kit 1.8 or higher
[ ] Clone this repo : git clone https://github.com/abhimassive/dr-litmos-test.git
[ ] Install dependencies : npm install
[ ] Create a .env
file in you root directory. Paste contents from .env-sample
to .env
and populate the values for each key
[ ] API - Run EC2 Test : npm run api