-
Couldn't load subscription status.
- Fork 0
feat: refactoring test suite #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6899310
feat: add makefile and .toml
michele-fucito 0f626db
chore: move legacy requirements and setup.py to legacy/
michele-fucito f475bc3
feat: add dependecies installation script
michele-fucito 007989f
feat: remove legacy files
michele-fucito 8fd911e
feat: add end-to-end tests and update pytest configuration
michele-fucito 74b3f2f
feat: add end2end test to run test pipeline
michele-fucito bf302e3
feat: add end2end tests to results
michele-fucito b6fbd42
chore: add read permission to end to end tests
michele-fucito 15f23a3
fix: typo
michele-fucito 7ce35b0
chore: code clear
michele-fucito 061a8a9
chore: change to cron job
michele-fucito 9846c75
fix: typo
michele-fucito 1b0f08d
feat: update readme
michele-fucito 1936581
feat: set end to end test default to true
michele-fucito b79fd88
fix: typo
michele-fucito cb57e26
fix: duplicate
michele-fucito 90be6f0
fix: revert if codition in run end to end tests
michele-fucito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| .PHONY: help install install-dev install-functional install-bdd install-ux install-performance install-contract \ | ||
| test-functional test-bdd test-ux test-contract precommit | ||
|
|
||
| help: | ||
| @echo "Targets:" | ||
| @echo " install Install core" | ||
| @echo " install-dev Install dev tools" | ||
| @echo " install-functional Install functional test deps" | ||
| @echo " install-bdd Install BDD test deps" | ||
| @echo " install-ux Install UX test deps" | ||
| @echo " install-performance Install performance test deps" | ||
| @echo " install-contract Install contract test deps" | ||
| @echo " test-functional Run functional tests" | ||
| @echo " test-bdd Run BDD tests (behave)" | ||
| @echo " test-ux Run UX tests (pytest + Playwright)" | ||
| @echo " test-contract Run contract tests" | ||
| @echo " precommit Run pre-commit on all files" | ||
|
|
||
| install: | ||
| python -m pip install -U pip | ||
| pip install -e . | ||
|
|
||
| install-dev: | ||
| pip install -e .[dev] | ||
|
|
||
| install-functional: | ||
| pip install -e .[functional-tests] | ||
|
|
||
| install-bdd: | ||
| pip install -e .[bdd-tests] | ||
|
|
||
| install-ux: | ||
| pip install -e .[ux-tests] | ||
| python -m playwright install | ||
|
|
||
| install-performance: | ||
| pip install -e .[performance-tests] | ||
|
|
||
| install-contract: | ||
| pip install -e .[contract-tests] | ||
|
|
||
| install-end-to-end: | ||
| @echo "Installing end-to-end test extras..." | ||
| pip install -e .[end-to-end-tests] || true | ||
|
|
||
| test-functional: | ||
| pytest functional-tests/tests/ -q | ||
|
|
||
| test-bdd: | ||
| behave bdd-tests/features/ | ||
|
|
||
| test-ux: | ||
| pytest ux-tests/tests/ -q | ||
|
|
||
| test-contract: | ||
| pytest contract-tests/ -q | ||
|
|
||
| test-end-to-end: | ||
| @# ensure .env present if required | ||
| @make check-env || true | ||
| pytest end-to-end-test/tests/ -q --maxfail=1 | ||
|
|
||
| precommit: | ||
| pre-commit run --all-files | ||
|
|
||
| check-env: | ||
| @test -f .env || (echo ".env not found. Copy .env.example to .env and fill values." && exit 1) |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| cd "$repo_root" | ||
|
|
||
| if [ -z "${VIRTUAL_ENV:-}" ]; then | ||
| if [ -d ".venv" ]; then | ||
| source .venv/bin/activate | ||
| else | ||
| python3 -m venv .venv | ||
| source .venv/bin/activate | ||
| python -m pip install --upgrade pip | ||
| fi | ||
| fi | ||
|
|
||
| echo "Running installations via Makefile..." | ||
|
|
||
| make install | ||
|
|
||
| make install-dev || true | ||
|
|
||
| make install-functional || true | ||
| make install-bdd || true | ||
| make install-ux || true | ||
| make install-performance || true | ||
| make install-contract || true | ||
|
|
||
| echo "Installations completed." |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| [build-system] | ||
| requires = ["hatchling>=1.25"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [project] | ||
| name = "rtp-platform-qa" | ||
| version = "0.1.0" | ||
| description = "RTP Platform Quality Assurance Repository" | ||
| readme = "README.md" | ||
| requires-python = ">=3.11" | ||
| authors = [{ name = "PagoPA" }] | ||
| dependencies = [ | ||
| "requests>=2.31", | ||
| "dynaconf>=3.2", | ||
| "python-dotenv>=1.0", | ||
| "faker==22.5.1", | ||
| "certifi==2025.7.14", | ||
| "pyperclip==1.9.0", | ||
| "schwifty==2025.1.0", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| functional-tests = [ | ||
| "pytest==8.4.1", | ||
| "pytest-timeout>=2.2", | ||
| "allure-pytest>=2.13", | ||
| "allure-python-commons==2.13.5", | ||
| "cryptography==44.0.2", | ||
| "urllib3==2.5.0", | ||
| ] | ||
| bdd-tests = [ | ||
| "behave>=1.2.6", | ||
| "allure-behave==2.13.5", | ||
| ] | ||
| ux-tests = [ | ||
| "pytest==8.4.1", | ||
| "pytest-playwright>=0.5.0", | ||
| "playwright>=1.47.0", | ||
| ] | ||
| performance-tests = [ | ||
| "aiokafka==0.12.0", | ||
| "locust==2.31.8", | ||
| ] | ||
| contract-tests = [ | ||
| "schemathesis>=3.23", | ||
| ] | ||
| dev = [ | ||
| "pre-commit>=3.7", | ||
| "azure-core==1.35.0", | ||
| "azure-identity==1.16.1", | ||
| "azure-keyvault-secrets==4.10.0", | ||
| "fastapi==0.116.1", | ||
| "pydantic==2.11.7", | ||
| "python-multipart==0.0.20", | ||
| "uvicorn[standard]", | ||
| ] | ||
|
|
||
| end-to-end-tests = [ | ||
| "pytest==8.4.1", | ||
| "pytest-timeout>=2.2", | ||
| "requests>=2.31", | ||
| "faker==22.5.1", | ||
| "allure-pytest>=2.13", | ||
| ] | ||
|
|
||
| [tool.pytest.ini_options] | ||
| addopts = "-ra" | ||
| testpaths = [ | ||
| "functional-tests/tests", | ||
| "contract-tests", | ||
| "ux-tests/tests", | ||
| "end-to-end-test/tests", | ||
| ] | ||
| pythonpath = [ | ||
| ".", | ||
| ] | ||
| markers = [ | ||
| "use_case: ID of the use case", | ||
| "happy_path: Tests when things goes right", | ||
| "unhappy_path: Tests when things goes wrong", | ||
| "need_fix: tests that fails and need a fix", | ||
| "landing_page: tests on dummy landing page", | ||
| "auth: tests on authentication service", | ||
| "activation: tests on activation service", | ||
| "send: Tests for RTP send", | ||
| "cbi: CBI specific tests", | ||
| "poste: Poste specific tests", | ||
| "get: mark tests that exercise GET endpoints", | ||
| "callback: mark tests that exercise callback endpoints", | ||
| "real_integration: mark tests that are real integration tests", | ||
| "iccrea: tests on ICCREA service", | ||
| "cancel: mark tests that exercise cancel endpoints", | ||
| "deactivation: mark tests that exercise deactivation endpoints", | ||
| "mock: mark tests that use mock services", | ||
| "debt_positions: mark tests that exercise debt positions endpoints", | ||
| "producer_gpd_message: mark tests that exercise GPD message producer endpoints", | ||
| "timeout: Tests with timeouts", | ||
| "use_case: ID of the use case", | ||
| "need_fix: tests that fails and need a fix", | ||
| "landing_page: tests on dummy landing page", | ||
michele-fucito marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ] | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| packages = ["api", "config", "utils"] | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.