Test Reporting, Centralized Logging, Makefile & CI Integration#1
Merged
Test Reporting, Centralized Logging, Makefile & CI Integration#1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces the test-reporting feature and associated infrastructure:
Test Reporting
scripts/allure_helper.pyto clean, generate, and serve Allure HTML reports with parameterized paths and structured logging.Centralized Logging
src/api_testing_framework/logger.pywhich configures the root logger and exposes a sharedloggerinstance.printcalls and per-module logging boilerplateMakefile
Makefilewith these targets:install->poetry install --no-roottest-> runpytestreport-> runpurest --alluredir=allure-results+allure generate ...serve-report-> launch interactive report server viascripts/allure_helper.py --serveclean-> remove caches and old reportsall-> "clean -> install -> test -> report" full pipelineCI Integration
Adds
.github/workflows/ci.ymlto run the full test-and-report pipeline on every push, pull_request, or manual dispatch.Steps include:
actions/setup-java@v3make all(tests + Allure generation)allure-reportfolder as an artifactWhat Changed
1. Test Reporting
scripts/allure_helper.pyargparsefor--results-dir,--report-dir, and--serveflagsserve-reportinvokes the helper scriptreporttarget auto-generates the HTML report2. Centralized Logging
src\api_testing_framework/logger.pyUsage
3. Makefile
4. CI Integration (
.github/workflows/ci.yml)How to Verify Locally
Open
allure-report/index.htmlin your browser.