Welcome to the QA Automation Engineer Challenge! This repository contains a simple Inventory Management System that you'll use to demonstrate your test automation skills using Playwright and TypeScript.
Your task is to demonstrate your QA automation skills by creating a comprehensive Playwright test suite for this Inventory Management System. The focus is on writing robust, maintainable automated tests using Playwright and TypeScript - not on modifying the application code itself.
Note: While you may modify the application code if you identify bugs or improvements, the primary goal is to showcase your test automation expertise through well-structured Playwright tests.
- Node.js (v18 or higher)
- npm or yarn
- Git
- Basic knowledge of TypeScript and Playwright
- Clone this repository:
git clone [repository-url]
cd qa-automation-challenge
-
Create your own public repository on GitHub for your solution
-
Push to your new repository:
git remote set-url origin https://github.com/YOUR_USERNAME/your-solution-repo.git
git push -u origin main
- Install dependencies:
npm install
- Install Playwright browsers:
npx playwright install
- Start the application:
npm run dev
- Run the example test:
npm test
- Login page with email/password validation
- Session management
- Protected routes
- Test accounts provided (see below)
- View all products
- Add new products
- Edit existing products
- Delete products
- Search and filter products
- Sort by name, price, or stock
- View current stock levels
- Adjust stock quantities (increase/decrease)
- Low stock alerts
- Stock status indicators
- Admin User:
admin@test.com
/Admin123!
- Regular User:
user@test.com
/User123!
Your primary objective is to create automated tests using Playwright. Focus on demonstrating your test automation skills rather than modifying the application code.
-
Complete the LoginPage Page Object Model
- Implement the missing methods in
pages/login.page.ts
- Add proper waits and error handling
- Implement the missing methods in
-
Create authentication tests using Playwright
- Valid login scenarios
- Invalid login scenarios (wrong email, wrong password, empty fields)
- Password visibility toggle
- Logout functionality
-
Create product management tests using Playwright
- Add a new product with valid data
- Validate form field requirements
- Test validation errors (negative price, empty required fields)
- Search for products
- Delete a product with confirmation
-
Implement additional Page Object Models
- Create
ProductsPage
class - Create
InventoryPage
class - Create
DashboardPage
class
- Create
-
Create inventory tests using Playwright
- Adjust stock levels (increase/decrease)
- Validate stock cannot go below zero
- Verify low stock alerts appear correctly
- Test bulk operations
-
Implement data-driven testing
- Use the test data from
data/test-products.json
- Create parameterized tests for multiple scenarios
- Implement test data factories
- Use the test data from
-
Add custom fixtures
- Create authentication fixture for logged-in state
- Create product setup/teardown fixtures
-
Create end-to-end user journeys
- Complete product lifecycle (create → edit → adjust stock → delete)
- Multi-user scenarios
- Complex filtering and sorting combinations
-
Implement advanced testing patterns
- API integration for test data setup
- Custom test reporters
- Visual regression testing
- Performance metrics collection
-
CI/CD Integration
- Create GitHub Actions workflow
- Implement parallel test execution
- Add test reporting artifacts
qa-automation-challenge/
├── app/ # Next.js application
│ ├── login/ # Login page
│ ├── dashboard/ # Dashboard page
│ ├── products/ # Product management
│ ├── inventory/ # Inventory management
│ └── lib/ # Utility functions
├── pages/ # Page Object Models
│ └── login.page.ts # Partially implemented - complete this
├── tests/ # Test specifications
│ ├── example.spec.ts # Example test (working)
│ └── challenges/ # Your tests go here
├── fixtures/ # Test fixtures (create your own)
├── data/ # Test data
│ └── test-products.json
└── playwright.config.ts # Playwright configuration
Your submission will be evaluated based on:
- Clean, readable code
- Proper TypeScript usage
- Following naming conventions
- DRY principles
- Comprehensive test scenarios
- Edge cases and negative testing
- Appropriate assertions
- Well-structured Page Object Models
- Reusable components and helpers
- Proper use of fixtures
- Efficient selectors
- Proper waits and synchronization
- Error handling
- Test independence
- Documentation and comments
- Innovation and creativity
- Performance optimizations
- Additional testing types (visual, performance, accessibility)
- CI/CD implementation
- Complete the challenge tasks in your public repository
- Commit your changes with clear, descriptive messages
- Create a
SOLUTION.md
file in the root directory describing:- Your testing approach and framework decisions
- Any assumptions made about the application behavior
- Instructions to run your test suite
- Test coverage strategy and prioritization
- Challenges faced and solutions implemented
- Suggestions for future test improvements
- Ensure all tests are passing and can be run with
npm test
- Share the public repository link with us
- Start with the example test to understand the application behavior
- Focus on writing robust, maintainable Playwright tests
- Write clear test descriptions that explain what is being tested
- Handle both happy path and error scenarios
- Make tests independent and repeatable
- Use data-testid attributes provided in the application for stable selectors
- Comment complex test logic and assertions
- Consider test execution time and parallelization
- Remember: The goal is to showcase your Playwright test automation skills, not to fix application bugs (unless critical for testing)
- Hardcoding values instead of using test data
- Not handling loading states
- Ignoring test flakiness
- Overly complex selectors
- Missing error scenarios
- Tests that depend on other tests
If you have any questions about the challenge or encounter technical issues with the application, please create an issue in the original repository.
Good luck! We're excited to see your solution! 🚀