- Manual testing using TestRail
- Unit testing with Jest
- Integration testing
- End-to-End (E2E) testing
- Test-Driven Development (TDD)
- API testing
- Frontend testing
```bash
qa-testing-project/
├── src/
│ └── api/
│ └── productAPI.js # Product management logic
├── tests/
│ ├── unit/
│ │ └── productAPI.test.js # Unit tests
│ └── integration/
│ └── productWorkflow.test.js # Integration tests
├── public/
│ └── index.html # Frontend interface
├── server.js # Express server
├── package.json
└── README.md
- Node.js (v14 or higher)
- npm (comes with Node.js)
-
Clone the repository:
git clone https://github.com/Dave-Vermeulen/QA-Testing.git cd qa-testing-project
-
Install dependencies:
npm init -y npm install express jest @babel/core @babel/preset-env
-
Add test script to package.json:
{"scripts": { "test": "jest", "test:watch": "jest --watch", "start": "node server.js" } }
-
Create Jest config file (jest.config.js):
module.exports = { testEnvironment: 'node', verbose: true };
- Start the server:
npm start
- Visit http://localhost:3000 in your browser.
- Run all tests:
npm test npm run test:watch
- Manual Testing with TestRail
- Use TestRail Free Acc.
- Test cases cover:
- Product creation
- Input validation
- Error handling
- UI responsiveness
- Unit Tests
Located in ./tests/unit/productAPI.test.js:
- Integration Tests
Located in tests/integration/productWorkflow.test.js:
```bash
describe('Group description', () => {
test('test description', () => {
// Arrange
const input = {};
// Act
const result = someFunction(input);
// Assert
expect(result).toBe(expected);
});
});
```bash
expect(value).toBe(other) // Strict equality
expect(value).toEqual(other) // Deep equality
expect(value).toHaveProperty('key') // Object has property
expect(fn).toThrow() // Function throws
expect(value).toBeTruthy() // Value is truthy expect(array).toContain(item) // Array contains item
```bash
beforeAll(() => {}) // Runs once before all tests
afterAll(() => {}) // Runs once after all tests
beforeEach(() => {}) // Runs before each test
afterEach(() => {}) // Runs after each test
- Review the UI at http://localhost:3000
- Create test cases in TestRail
- Practice exploratory testing
- Study
productAPI.test.js
- Add new test cases
- Learn Jest assertions
- Study
productWorkflow.test.js
- Test multiple operations together
- Handle async operations
- Add E2E tests with Cypress/Selenium
- Implement test coverage reporting
- Practice TDD
Feel free to submit issues and enhancement requests!
- Add E2E tests
- Implement test coverage reporting
- Add more complex product validation
- Create API documentation
- Add authentication system