Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samska/newman-serverest-demo
API Tests with Postman and Newman + GitHub Actions/Pages for CI
https://github.com/samska/newman-serverest-demo
newman postman test-automation
Last synced: 29 days ago
JSON representation
API Tests with Postman and Newman + GitHub Actions/Pages for CI
- Host: GitHub
- URL: https://github.com/samska/newman-serverest-demo
- Owner: Samska
- Created: 2022-06-07T22:02:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T18:22:22.000Z (9 months ago)
- Last Synced: 2024-12-08T05:43:36.259Z (29 days ago)
- Topics: newman, postman, test-automation
- Homepage: https://samska.github.io/newman-serverest-demo/report.html
- Size: 875 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
[![Run API Tests with Postman and Newman](https://github.com/Samska/serverest-tech-sharing/actions/workflows/postman.yml/badge.svg)](https://github.com/Samska/serverest-tech-sharing/actions/workflows/postman.yml)
[![Badge ServeRest](https://img.shields.io/badge/API-ServeRest-green)](https://github.com/ServeRest/ServeRest/)# Content created for Daruk team Tech Sharing
## API Testing using Postman + Newman Reporter HTMLextra
To demonstrate to the team how to use Postman for API testing, I used Paulo Gonçalves [ServeRest](https://serverest.dev/) REST API.
Concepts used in the tests:
- Dynamic variables
- Pre-request scripts
- Test scripts
- JSON schema validation## Setup
To view the tests and scripts used, simply import the collection and environment files that were used here directly into Postman. To execute the tests via Newman, follow these steps:
- Download and install the latest version of [Node.js](https://nodejs.org/en/)
Install Newman:
```sh
npm install -g newman
```Install the Newman report:
```sh
npm install -g newman-reporter-htmlextra
```Run the tests through the project root directory:
```sh
newman run serverest-tech-sharing.postman_collection.json -e serverest-tech-sharing.postman_environment.json -r htmlextra
```To view the test results, simply open the report that was created in newman folder in the project root.
You can also consult the test results on this [page](https://samska.github.io/newman-serverest-demo/report.html) as it is published with each new pipeline run.