How ashrika786/api-testing-python works
PyRestAPITest is a Python-based REST API test application. Its documented workflow is to run automated tests with pytest, make API requests, check results, and review execution logs or an HTML report. The sampled code confirms the request, assertion, and logging responsibilities, but does not show how the test files orchestrate them; that connection is therefore left unverified. The README also documents pytest-HTML reporting, whose generation is not implemented in the sampled source.
Main entry points: session.py HTTP session · logger.py Logger · test_stations.py Station tests · asserter.py Assertions
Components 10
Test execution
- Station tests
tests/test_stations.py - Test utilities
test_utils.py
API test runtime
- HTTP session
session.py - Stations endpoint
session.py - Assertions
asserter.py - Logger
logger.py
Test results
- Execution log
logger.py - HTML report
StationReport.html
Other components
- Test author
- Virta API
Connections 8
- Test author → Station tests: runs tests
README.md - Station tests → HTTP session: may invoke
- HTTP session → Virta API: sends request
session.py - HTTP session → Stations endpoint: defines endpoint
session.py - HTTP session → Logger: logs requests
session.py - Assertions → Logger: logs assertions
asserter.py - Logger → Execution log: writes log
logger.py - Test author → HTML report: reviews report
README.md