Structured QA automation practice repository for API, Selenium UI, Playwright UI, and exported Newman examples.
This repository is intended for learning and portfolio practice, not as a production-scale test framework.
- API overview
- API Pytest suite
- UI overview
- Selenium Pytest suite
- Playwright Pytest suite
- TodoMVC Playwright project
- SauceDemo Playwright project
api/
pytest/
clients/
config/
data/
tests/
conftest.py
README.md
newman/
collection/
environment/
README.md
ui/
selenium_pytest/
config/
data/
pages/
tests/
conftest.py
README.md
playwright_pytest/
todo_mvc/
sauce_demo/
README.md
reports/
.gitkeep
test-results/
.gitkeep
.github/
workflows/
codeql.yml
newman-ci.yml
test-automation.yml
pytest.ini
requirements.txt
- API automation with Python, Pytest, and Requests under
api/pytest/ - API collection execution with exported Postman files and Newman under
api/newman/ - UI automation with Selenium and Pytest under
ui/selenium_pytest/ - UI automation with Playwright Python and Pytest under
ui/playwright_pytest/
Install Python dependencies:
python -m pip install -r requirements.txtInstall Chromium for the Playwright suite:
python -m playwright install chromiumCreate a local environment file for environment-backed API and UI test data:
Copy-Item .env.example .envThe real .env file is ignored by Git.
Run all Pytest tests from the repository root:
pytestRun API Pytest tests:
pytest api/pytest/testsRun Selenium UI tests:
pytest ui/selenium_pytest/testsRun TodoMVC Playwright tests:
pytest ui/playwright_pytest/todo_mvc/testsRun SauceDemo Playwright tests:
pytest ui/playwright_pytest/sauce_demo/testsRun the full Playwright suite:
pytest ui/playwright_pytestRun Playwright tests headed:
pytest ui/playwright_pytest --headedThe root pytest.ini defines:
smokeregression
Examples:
pytest -m smoke
pytest -m regressionThe Newman assets are under api/newman/.
Run them from the repository root when Newman is installed:
newman run ".\api\newman\collection\collection.json" -e ".\api\newman\environment\environment.json"The repository uses the following workflows:
-
.github/workflows/test-automation.yml- API Pytest tests
- Selenium Pytest UI tests
- Playwright Pytest UI tests
- Python security scans
-
.github/workflows/newman-ci.yml- Exported Postman collection execution with Newman
-
.github/workflows/codeql.yml- GitHub CodeQL analysis for Python
The Playwright CI job installs Python dependencies, installs Chromium with its required Linux dependencies, and runs the TodoMVC and SauceDemo Playwright suites headlessly.
It generates a JUnit XML test result and retains Playwright trace and screenshot evidence only for failed tests.
Detailed Playwright CI and artifact documentation is available in:
ui/playwright_pytest/README.md
Generated output paths include:
reports/api-junit.xml
reports/ui-junit.xml
reports/playwright-ui-junit.xml
reports/newman-report.html
reports/newman-report.xml
reports/api/http-exchanges/
reports/ui/screenshots/
reports/ui/browser-console/
test-results/playwright/
JUnit XML files contain structured test results.
Playwright traces and screenshots contain failure-debugging evidence.
Only the placeholder files under reports/ and test-results/ should be committed. Generated reports and browser artifacts are ignored by Git.
The tests use public demo applications and APIs.
Failures can be caused by external service changes, network issues, browser startup problems, missing environment values, or actual test and application defects.