Jupiter3D Testing
Introduction
This document provides an overview of the testing architecture for Jupiter3D. It encompasses continuous testing concepts such as testing across the software development lifecycle as well as automated execution of tests through automation.
Testing Categories
The below list of test categories are included in our testing setup. Further details are provided below.
- Static Code Analysis
- Unit Tests
- Security Tests
- Build Tests
- Acceptance Tests
- Integration Tests
- Performance Tests
- Usability Tests
Unit Tests
Main Tests
- Location:
./tests/test_main.py
- Purpose: To test our main script's functions and methods.
- Running Tests:
- Manually:
- Navigate to the project root directory in the command line.
- Execute
pytest ./tests/test_main.py
. - View Results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/my_package/main.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Results Location: GitHub Actions Unit Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: PyTest
- Tips:
- Test every non-trivial function or method in your code
- Test conditions including malformed arguments and null conditions
Models
- Location:
./tests/test_model_*.py
- Purpose: To test our 3D model rendering code for integrity and functionality
- Run Tests:
- Manually:
- Navigate to the project root directory in the command line.
- Execute
pytest ./tests/test_model_*.py
. - View Results: Results will appear in the command-line output or can be formatted into a report using the
pytest-html
plugin.
- Automatically:
- Frequency:
- Triggered by code changes and commits to the
src/my_package/test_model_*.py
file on GitHub. - Runs during nightly builds with other unit tests.
- Triggered by code changes and commits to the
- Location: GitHub Actions Unit Test Results
- Frequency:
- Contributing:
- Framework: PyTest
- Tips:
- Test each model for edge cases like anti-meridian lines or poles
- Manually:
Security Tests
Dependabot
- Purpose: Ensure our software dependencies are being scanned for vulnerabilities using Dependabot
- Running Tests:
- Automatically:
- Frequency: Daily
- Results Location: Security tab on repository's GitHub website
- Automatically:
Integration Tests
Web App API
- Location:
[./tests/integration/web]
- Purpose: Ensure Web UI software interacts smoothly with other software.
- Running Tests:
- Manually:
- Install and configure Selenium WebDriver for your target browsers.
- Run
python ./tests/integration/web/test_suite.py
- Review the test execution logs and screenshots captured during the test run.
- Automatically:
- Frequency:
- Nightly builds
- Results Location: GitHub Actions Integration Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: Selenium
- Tips:
- Test the interaction between software components and external APIs
Performance Tests
Chaos Testing
- Location:
./tests/performance/chaos
- Purpose: Ensure the software is robustly designed to scale and handle expected failures.
- Running Tests:
- Manually:
- Navigate to
./tests/performance/chaos
. - Execute the relevant test scripts for stress / chaos testing.
- View results in the output logs or generated reports.
- Navigate to
- Automatically:
- Frequency:
- Triggered by significant changes.
- Quarterly stress tests.
- Results Location: test deployment machine
- Frequency:
- Manually:
- Contributing:
- Framework Used: Chaos Monkey
- Tips:
- Consider testing both typical and peak usage scenarios.
- Ensure that performance tests represent real-world conditions as closely as possible.
- Validate resource utilization thresholds to identify bottlenecks proactively.
User Interface (UI) Tests
UI User Experience
- Location:
./tests/ui
- Purpose: Ensure that the software meets users' needs and expectations through robust UI design.
- Running Tests:
- Manually:
- Navigate to
./tests/ui
. - Execute the relevant UI test scripts.
- View results in the output logs or generated UI testing reports.
- Navigate to
- Automatically:
- Frequency:
- Prior to major updates and releases.
- Quarterly user experience reviews.
- Results Location: GitHub Actions UI Test Results
- Frequency:
- Manually:
- Contributing:
- Framework Used: Selenium
- Tips:
- Ensure your tests validate compliance with Web Content Accessibility Guidelines (WCAG).