This project includes API Test Automation (BookStore API) using Postman + Newman and UI Test Automation using Cypress.
It also integrates CI/CD with GitHub Actions and generates HTML reports automatically.
- API Testing:
POST /loginGET /booksPOST /booksPUT /books/{id}DELETE /books/{id}- Includes positive & negative cases
- UI Testing:
- Login with valid/invalid credentials
- Create, Edit, and Delete a user
- Reports:
- HTML Reports for API & UI
- GitHub Actions artifacts upload
- CI/CD:
- Runs tests on every push to
main
- Runs tests on every push to
git clone https://github.com/LauraYineth1239/BookStoreAPI-Tests.git
cd BookStoreAPI-Test# Install Node.js dependencies for Cypress
npm install
# Install Newman globally
npm install -g newman newman-reporter-htmlextranewman run collections/DemoQA_API_Automation.postman_collection.json -e collections/DemoQA_Env.postman_environment.json --reporters cli,htmlextra --reporter-htmlextra-export newman-report.htmlnpx cypress run --spec "cypress/e2e/ui-tests.cy.js" --reporter mochawesome- ✅ API Tests Report →
newman-report.html - ✅ UI Tests Report →
mochawesome-report/
GitHub Actions Reports:
➡ View Artifacts Here
- Postman & Newman – API Testing
- Cypress – UI Testing
- GitHub Actions – CI/CD
- Mochawesome / HTML Extra – Reporting
This project runs tests automatically on every push to main.
name: API & UI Tests CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: |
npm install
npm install -g newman newman-reporter-htmlextra
- name: Run API Tests
run: |
newman run collections/DemoQA_API_Automation.postman_collection.json -e collections/DemoQA_Env.postman_environment.json --reporters cli,htmlextra --reporter-htmlextra-export newman-report.html --suppress-exit-code
- name: Run UI Tests
run: npx cypress run --reporter mochawesome
- name: Upload Reports
uses: actions/upload-artifact@v4
with:
name: test-reports
path: |
newman-report.html
mochawesome-report/Laura Yineth Delgado Roldan
LinkedIn | GitHub
- Add code coverage (NYC for API or Cypress Coverage plugin)
- Add visual regression testing for UI
