Testing Types in Bodhitree
This document outlines the key types of tests used in software development, as they apply in BodhiTree: React (frontend) and Django (backend).
1. ✅ Unit Testing
🔍 What:
Tests small, isolated pieces of logic, such as functions, classes, components, models, and serializers.
🔧 React:
Test components, utility functions, custom hooks.
Tools:
Jest,React Testing Library
🔧 Django:
Test models, serializers, validators, helper functions.
Tools:
unittest,pytest,pytest-django
2. ✅ Integration Testing
🔍 What:
Tests how multiple units work together, like React form + API, or Django view + serializer + model.
🔧 React:
Simulate real user behavior and API response.
Tools:
Jest,MSW,React Testing Library
🔧 Django:
Simulate HTTP requests using test client.
Tools:
Django TestCase,APIClient
3. ✅ Functional Testing
🔍 What:
Tests a specific feature’s behavior, usually via integration-level or end-to-end testing.
🔧 React:
Validate form validations, navigation flow, modal behaviors.
🔧 Django:
Test API endpoints, business logic rules, custom permissions.
4. ✅ End-to-End (E2E) Testing
🔍 What:
Tests real user flows from start to finish: frontend + backend + database.
🔧 Tools:
Playwright(works for both React & Django)Use for testing login, checkout, forms, etc.
5. ✅ Manual Testing
🔍 What:
Testing performed by a human using the actual application in a browser or via tools like Postman.
🔧 Tools:
Frontend: Browser DevTools
Backend: Postman
6. ✅ Smoke Testing
🔍 What:
Quick sanity checks to make sure core features (like login, main pages, and APIs) work after a build or deployment.
🔧 Usage:
Run as part of CI/CD pipeline
Minimal test suite or simple status check
7. ✅ Regression Testing
🔍 What:
Ensure that previously working features still function after changes or bug fixes.
🔧 Tools:
Run full suite (unit, integration, E2E) on each code push via CI.
8. ✅ Performance Testing
🔍 What:
Tests app speed, response time, and behavior under load.
🔧 React:
Tools: Google Lighthouse
🔧 Django:
Tools:
Locust,JMeter
9. ✅ Security Testing
🔍 What:
Ensures the app is safe from vulnerabilities like SQL Injection, CSRF, XSS, etc.
🔧 React:
No content yet
🔧 Django:
No content yet
🧩 Summary Table
Test Type |
Purpose |
React Tool |
Django Tool |
|---|---|---|---|
Unit Testing |
Test isolated logic |
Jest, RTL |
unittest, pytest |
Integration Test |
Multiple parts together |
MSW, RTL |
Django TestClient |
Functional Testing |
Business feature correctness |
Jest, RTL |
APIClient |
E2E Testing |
Full user flows |
Playwright |
Cypress, Postman |
Manual Testing |
UI/UX and exploratory testing |
Browser |
Postman |
Smoke Testing |
Basic health check |
Cypress, Jest |
Health API checks |
Regression Testing |
Ensure nothing breaks |
CI suites |
CI suites |
Performance Testing |
Measure load, speed |
Lighthouse |
Locust, JMeter |
Security Testing |
Check for vulnerabilities |
Helmet, validation |
CSRF, auth, escaping |
💡 Tip: Start with unit + integration tests during development. Add E2E, smoke, and performance tests once the app grows.