TypeScript β’ Jest β’ REST β’ GraphQL β’ OWASP Security β’ K6 Performance
π 237 automated tests across 12 test suites with 100% pass rate
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.
| 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 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 | β |
| 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 |
# 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# ββββββββββββββββββββββββββββββββββββββββββ
# π§ͺ 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 validationfullstack-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
|
|
|
|
| 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 |