Skip to content

AnaDjokovic/qa-api-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QA API Assignment

Automation test framework for API testing (home assignment). The project uses Mocha, Chai, and Supertest to validate the exercise API (create, read, update, delete main keys and quota behaviour).


What is tested

  • Key store quota limit – Creating keys up to the quota (10), fetching all keys, and cleanup.
  • Update main key – Creating a key, updating its value, attempting update of a non-existing key, and cleanup.

Requirements

  • Node.js v18 LTS or v20 LTS (originally run on v16.14.1)

Installation

  1. Clone the repository and go to the project folder.

  2. Install dependencies:

    npm install
  3. Configure environment:

    • Copy the example file: cp .env.testing.example .env.testing
    • Open .env.testing and set your API base URL, for example:
      BASE_URL=https://l761dniu80.execute-api.us-east-2.amazonaws.com

Running tests

Run all API tests (uses TEST_ENV=production and loads .env.testing):

npm run test:api

Tests are in tests/api/. Default timeout is 60 seconds.


Project structure

├── tests/
│   ├── api/                    # API test specs
│   │   ├── keyStoreQuoteLimit-spec.js
│   │   └── updateMainKey-spec.js
│   ├── utilities/
│   │   ├── http-api-helper.js  # API client (create, get, update, delete)
│   │   └── mainKeyValues-helper.js
│   └── config.js               # Environment config (base URL)
├── .env.testing.example        # Example env – copy to .env.testing
├── package.json
└── README.md

Important note

This code is part of an assessment for the QA hiring process and cannot be copied, reused, or distributed for other purposes.


Author

Ana Marković

About

The purpose of this project is to create an automation test framework for a specific home assignment. The framework is designed to automate testing processes and validate the functionality of the target methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors