This project includes comprehensive testing for the fullstack web application, covering integration tests, unit tests, UI automation using Selenium, and performance/load testing.
tests/
├── integration/
│ ├── auth.test.js
│ ├── inMemory.js
│ └── task.test.js
├── selenium-tests/
│ ├── loginAutomation.js
│ └── taskDetailAutomation.js
├── unit/
│ └── utility.test.js
└── performance/
└── loadtest.js
| Tool | Purpose |
|---|---|
jest |
JavaScript test runner used for unit and integration tests |
supertest |
HTTP assertions for API endpoint testing |
mongodb-memory-server |
Creates an ephemeral in-memory MongoDB instance for testing |
selenium-webdriver + chromedriver |
Browser automation for UI testing |
k6 |
Performance and load testing tool |
- Tests user creation and authentication routes using
supertest. - Validates response structure and status codes.
- Connects to an in-memory MongoDB instance using
mongodb-memory-server. - Inserts and retrieves a user document to confirm DB operations work in isolation.
- Verifies
/task/newand/task/updateendpoints. - Ensures task creation and update flows are functional.
- Unit test for
assembleUserStateutility function. - Validates correct session and task data retrieval.
- Uses test fixtures for users, tasks, and comments in MongoDB.
- Automates login form interaction on the frontend using Selenium.
- Verifies if login is successful by checking for presence of dashboard header.
- Simulates a user interacting with a task detail page:
- Updates task name
- Toggles task completion status
- Changes task group
- Adds a comment
- Navigates back to dashboard
- Waits for each step using Selenium's
untilfeature for reliability.
- Uses k6 to simulate concurrent user traffic:
- Gradually ramps up to 100 virtual users
- Measures response time performance
- Checks that homepage loads within 500ms for each request.
npm install
npm testEnsure you have Chrome installed and chromedriver is available in PATH.
node tests/selenium-tests/loginAutomation.js
node tests/selenium-tests/taskDetailAutomation.js
Install k6 from https://k6.io/docs/getting-started/installation/
k6 run tests/performance/loadtest.js
-
✔️ End-to-end testing coverage across API, UI, DB, and performance layers.
-
⚙️ Simulated real-world browser usage via Selenium.
-
🧠 Isolated DB testing with no side effects using in-memory MongoDB.
-
📈 Scalable load simulation via k6 to ensure system stability under load.
-
All tests assume the application is running locally on http://localhost:8080/.
-
For Selenium, ensure forms have accessible input field names (e.g., name="username").
-
Load testing is read-only — no data is posted or mutated.