Skip to content

adityadwic/fullstack-API-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

⚑ Full-Stack API Automation Suite

Enterprise-Grade Testing Portfolio

TypeScript β€’ Jest β€’ REST β€’ GraphQL β€’ OWASP Security β€’ K6 Performance

API Tests TypeScript Jest Node.js Docker Tests


πŸš€ 237 automated tests across 12 test suites with 100% pass rate


REST API GraphQL JWT OAuth2 OWASP K6

🎯 About This Project

This repository is a comprehensive API Automation Portfolio demonstrating advanced testing strategies for both REST and GraphQL architectures. Built as a reference implementation for enterprise-grade test automation.

What This Project Demonstrates:

Area Description
πŸ”„ Full Lifecycle Testing From CRUD operations to complex multi-step business workflows
πŸ” Security First OWASP Top 10 vulnerability scanning with SQL Injection & XSS tests
⚑ Performance Testing Scalable load & stress testing with K6
πŸ—οΈ Clean Architecture Modular design with reusable clients, helpers & utilities
🐳 DevOps Ready Dockerized environment with GitHub Actions CI/CD

πŸ‘€ Built by: Aditya Dwi Cahyono β€” Senior QA Automation Engineer


πŸ† Test Results Summary

╔════════════════════════════════════════════╗
β•‘     TEST EXECUTION SUMMARY                 β•‘
╠════════════════════════════════════════════╣
β•‘  Test Suites:  12 passed   β”‚  12 total     β•‘
β•‘  Tests:        237 passed  β”‚  237 total    β•‘
β•‘  Pass Rate:    100% βœ…                      β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
Category Test Suite Tests Status
CRUD Users API 14 βœ…
CRUD Posts API 15 βœ…
CRUD Comments API 11 βœ…
Auth JWT Authentication 16 βœ…
Auth OAuth 2.0 + PKCE 25 βœ…
Validation JSON Schema 25 βœ…
Workflow API Chaining 15 βœ…
Edge Cases Negative Testing 35 βœ…
GraphQL Queries 24 βœ…
GraphQL Mutations 18 βœ…
Security OWASP Top 10 20 βœ…
Contract Consumer-Driven 19 βœ…

πŸ’‘ Tech Stack & Skills

Languages Testing API DevOps
TypeScript 5.3
JavaScript ES6+
Jest 29.7
Supertest
K6
REST (Axios)
GraphQL
Postman/Newman
Docker
GitHub Actions
Allure Reports
Category Technologies
Authentication JWT, OAuth 2.0, PKCE Flow
Security Testing OWASP Top 10, SQL Injection, XSS, SSRF
Validation JSON Schema (AJV), Contract Testing
Code Quality ESLint, Prettier, TypeScript Strict Mode

πŸš€ Quick Start

# 1. Clone the repository
git clone https://github.com/adityadwic/fullstack-API-automation.git

# 2. Navigate to project
cd fullstack-API-automation

# 3. Install dependencies
npm install

# 4. Run all tests
npm test

πŸ§ͺ Available Test Commands

# ══════════════════════════════════════════
# πŸ§ͺ TEST EXECUTION
# ══════════════════════════════════════════

npm test                    # Run all 237 tests
npm run test:watch          # Watch mode for development

# ══════════════════════════════════════════
# πŸ“¦ SPECIFIC TEST SUITES
# ══════════════════════════════════════════

npm run test:crud           # CRUD operations (40 tests)
npm run test:auth           # JWT & OAuth2 (41 tests)
npm run test:graphql        # GraphQL queries & mutations
npm run test:security       # OWASP security tests
npm run test:contract       # Contract validation

# ══════════════════════════════════════════
# ⚑ PERFORMANCE & DOCKER
# ══════════════════════════════════════════

npm run test:perf           # K6 quick performance test
npm run test:perf:full      # K6 full load test
npm run docker:build        # Build Docker image
npm run docker:test         # Run tests in container

# ══════════════════════════════════════════
# πŸ” CODE QUALITY
# ══════════════════════════════════════════

npm run lint                # ESLint check
npm run lint:fix            # Auto-fix lint issues
npm run typecheck           # TypeScript validation

πŸ“ Project Architecture

fullstack-API-automation/
β”‚
β”œβ”€β”€ πŸ“‚ src/                          # Source code
β”‚   β”œβ”€β”€ πŸ“‚ clients/                  # API Clients
β”‚   β”‚   β”œβ”€β”€ rest-client.ts           # REST client with retry & interceptors
β”‚   β”‚   └── graphql-client.ts        # GraphQL client with error handling
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ auth/                     # Authentication
β”‚   β”‚   β”œβ”€β”€ jwt-helper.ts            # JWT token generation & validation
β”‚   β”‚   └── oauth2-helper.ts         # OAuth 2.0 with PKCE support
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ utils/                    # Utilities
β”‚   β”‚   β”œβ”€β”€ schema-validator.ts      # JSON Schema validation (AJV)
β”‚   β”‚   β”œβ”€β”€ test-data-factory.ts     # Faker.js test data generation
β”‚   β”‚   └── api-chain.ts             # Fluent API chaining
β”‚   β”‚
β”‚   └── πŸ“‚ schemas/                  # JSON Schemas for validation
β”‚
β”œβ”€β”€ πŸ“‚ tests/                        # Test suites
β”‚   β”œβ”€β”€ πŸ“‚ rest/                     # REST API tests
β”‚   β”‚   β”œβ”€β”€ crud/                    # CRUD operations
β”‚   β”‚   β”œβ”€β”€ auth/                    # Authentication tests
β”‚   β”‚   β”œβ”€β”€ schema/                  # Schema validation
β”‚   β”‚   β”œβ”€β”€ chaining/                # API workflow tests
β”‚   β”‚   └── negative/                # Edge cases & error handling
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ graphql/                  # GraphQL tests
β”‚   β”œβ”€β”€ πŸ“‚ security/                 # OWASP security tests
β”‚   └── πŸ“‚ contract/                 # Contract tests
β”‚
β”œβ”€β”€ πŸ“‚ performance/                  # K6 load tests
β”œβ”€β”€ πŸ“‚ postman/                      # Postman collection
β”œβ”€β”€ πŸ“‚ docs/                         # Documentation
└── πŸ“‚ .github/workflows/            # CI/CD pipeline

✨ Key Features

πŸ”„ API Testing

  • REST API - Full CRUD with Axios
  • GraphQL - Queries & Mutations
  • Schema Validation - AJV JSON Schema
  • API Chaining - Multi-step workflows

πŸ” Security & Auth

  • JWT Testing - Token lifecycle
  • OAuth 2.0 - PKCE flow support
  • OWASP Top 10 - Security scanning
  • Injection Tests - SQL, XSS, SSRF

⚑ Performance

  • K6 Load Testing - Virtual users
  • Stress Testing - Breaking point analysis
  • Spike Testing - Traffic surge handling

πŸ—οΈ Infrastructure

  • Docker - Containerized execution
  • CI/CD - GitHub Actions
  • Allure Reports - Rich test reports
  • Postman - Collection export

πŸ“š Documentation

Document Description
πŸ“ ARCHITECTURE.md System architecture & diagrams
🐳 DOCKER.md Docker setup & commands
⚑ PERFORMANCE.md K6 performance testing guide
πŸ”’ SECURITY.md OWASP security testing
πŸ“ CONTRACT.md Contract testing patterns

πŸ‘€ Author

Aditya Dwi Cahyono

Senior QA Automation Engineer

GitHub LinkedIn


πŸ“Š 237 Tests β€’ πŸ”’ 20 Security Tests β€’ πŸ“ 19 Contract Tests β€’ 🐳 Docker Ready β€’ ⚑ K6 Performance


⭐ If you find this project helpful, please give it a star! ⭐


Built with ❀️ for the QA community

About

API automation framework with regression, negative tests, env config, and CI reporting.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors