Skip to content

A template project for Postman API testing utilizing Newman and Docker Compose

License

Notifications You must be signed in to change notification settings

Ordinal43/api-testing-newman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Newman Automation Test

This project is a simple automation test for Postman APIs made using Newman and Docker Compose.

This project uses the vad1mo/hello-world-rest Docker image for the REST API.

Prerequisites

Project structure

Newman Automation
    ├── README.md                       # README file
    ├── LICENSE                         # License file
    ├── compose.yml                     # Docker compose file
    └── src
        ├── postman_collection.json     # List of APIs to be tested with Newman
        ├── postman_environment.json    # Predefined environment variables from Postman
        └── run-test.sh                 # Script to run the test

Setting up and running the test

  1. Clone the Repository:
    git clone https://gitlab.com/ordinal43/newman-automation-test
    cd newman-automation-test
  2. Start Docker Engine
  3. Inside your repo just run this:
    docker compose up
  4. Let the test run, then extract the results from inside the container to anywhere you want:
    docker cp postman-tests-newman:/app/report.html </your/target/directory>/report.html
  5. IMPORTANT: Don't forget to shut down the docker compose by running:
    docker compose down
    If you don't do this the container will remain active and store the previous state.

About

A template project for Postman API testing utilizing Newman and Docker Compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages