Group 7
Group 7
Definition: Unit tests are automated tests written to verify the functionality of a small,
specific part of the code (a "unit").
Purpose:
o Validate the correctness of individual functions or components.
o Catch bugs early in development.
o Facilitate refactoring by ensuring existing functionality is preserved.
A. Jest (JavaScript)
What Is It?
o A JavaScript testing framework commonly used for front-end and back-end
applications.
o Developed by Facebook.
Features:
o Zero-config setup for most projects.
o Built-in mocking capabilities.
o Snapshot testing for UI components.
o Detailed error reporting and performance tracking.
Use Case: Testing React components, Node.js APIs, or any JavaScript-based logic.
B. PyTest (Python)
What Is It?
o A versatile testing framework for Python applications.
Features:
o Simple syntax for writing tests.
o Supports parameterized tests (run a test with multiple inputs).
o Plugins for extended functionality (e.g., pytest-django, pytest-mock).
o Auto-detection of test files and functions.
Use Case: Testing Python scripts, web frameworks like Flask/Django, or data processing
pipelines.
Introduction to Continuous Integration (CI) tools (e.g., GitHub Actions, Travis CI)
3. Popular CI Tools
A. GitHub Actions
B. Travis CI