{"id":45309349,"url":"https://github.com/dariero/lumairej-tests","last_synced_at":"2026-04-15T18:01:55.898Z","repository":{"id":305444871,"uuid":"1022896864","full_name":"dariero/LumaireJ-tests","owner":"dariero","description":"API \u0026 E2E tests for LumaireJ, written in Python with care 🖤","archived":false,"fork":false,"pushed_at":"2026-03-06T06:52:34.000Z","size":133,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-06T09:50:48.515Z","etag":null,"topics":["allure","api-testing","e2e-tests","integration-testing","playwright","pytest","python","test-automation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dariero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-20T04:45:55.000Z","updated_at":"2026-03-06T06:13:18.000Z","dependencies_parsed_at":"2025-12-06T15:02:15.608Z","dependency_job_id":null,"html_url":"https://github.com/dariero/LumaireJ-tests","commit_stats":null,"previous_names":["darliaro/lumairej-tests","dariero/lumairej-tests"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dariero/LumaireJ-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariero%2FLumaireJ-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariero%2FLumaireJ-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariero%2FLumaireJ-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariero%2FLumaireJ-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dariero","download_url":"https://codeload.github.com/dariero/LumaireJ-tests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariero%2FLumaireJ-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31853279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allure","api-testing","e2e-tests","integration-testing","playwright","pytest","python","test-automation"],"created_at":"2026-02-21T06:44:53.229Z","updated_at":"2026-04-15T18:01:55.893Z","avatar_url":"https://github.com/dariero.png","language":"Python","readme":"[![Python 3.14+](https://img.shields.io/badge/Python-3.14+-black.svg)](https://www.python.org/)\n[![PyTest](https://img.shields.io/badge/PyTest-blue?logo=pytest)](https://pytest.org/)\n[![Playwright](https://img.shields.io/badge/Playwright-lightblue?logo=playwright)](https://playwright.dev/)\n[![Allure TestOps](https://img.shields.io/badge/Allure-blueviolet?logo=allure)](https://docs.qameta.io/allure-testops/)\n\n# LumaireJ Test Automation Framework\n\nDedicated test automation repository for [LumaireJ](https://github.com/darie/LumaireJ) - a journaling and mood tracking application.\n\n---\n\n## Testing Strategy\n\n### Test Pyramid\n\n```\n        /\\\n       /  \\       E2E Tests (Playwright)\n      /----\\      UI validation, user journeys\n     /      \\\n    /--------\\    API Tests (Requests + Pydantic)\n   /          \\   Contract testing, business logic\n  /------------\\\n /              \\ Unit Tests (pytest)\n/________________\\ Isolated component testing\n```\n\n| Layer | Framework | Purpose | Current Coverage |\n|-------|-----------|---------|------------------|\n| **E2E** | Playwright | User journey validation | 3 tests |\n| **API** | Requests + Pydantic | Contract \u0026 integration testing | 3 tests |\n| **Unit** | pytest | Isolated component testing | TBD |\n\n### Test Categories (Markers)\n\n| Marker | Description | Usage |\n|--------|-------------|-------|\n| `@pytest.mark.smoke` | Critical path tests | Fast feedback, PR gates |\n| `@pytest.mark.regression` | Full regression suite | Nightly/release validation |\n| `@pytest.mark.api` | API integration tests | Backend contract testing |\n| `@pytest.mark.e2e` | End-to-end UI tests | User journey validation |\n| `@pytest.mark.journal` | Journal feature tests | Feature-specific grouping |\n\n### Design Patterns\n\n- **Page Object Model (POM)**: E2E tests use encapsulated page objects (`tests/e2e/pages/`)\n- **Schema Validation**: API responses validated via Pydantic models (`tests/api/schemas/`)\n- **Fixture-Based DI**: Test data and clients injected via pytest fixtures\n- **Factory Pattern**: Test data generated using Faker with dataclass factories\n\n---\n\n## Project Structure\n\n```\nlumairej-tests/\n├── .github/\n│   └── workflows/\n│       └── ci.yml              # CI/CD pipeline\n├── tests/\n│   ├── api/\n│   │   ├── clients/\n│   │   │   └── api_client.py   # HTTP client wrapper\n│   │   ├── schemas/\n│   │   │   └── journal_schema.py # Pydantic response models\n│   │   └── tests/\n│   │       └── test_journal_api.py\n│   ├── e2e/\n│   │   ├── conftest.py         # Playwright fixtures\n│   │   ├── pages/\n│   │   │   └── journal_page.py # Page Object Model\n│   │   └── tests/\n│   │       └── test_journaling_ui.py\n│   └── shared/\n│       ├── constants.py        # Timeout configuration\n│       ├── fixtures.py         # Shared pytest fixtures\n│       └── test_data.py        # Faker-based data factories\n├── conftest.py                 # Root fixture configuration\n├── pyproject.toml              # Project config \u0026 pytest settings\n└── .env.template               # Environment variable template\n```\n\n---\n\n## Running Tests\n\n### Prerequisites\n\n1. Install [Python 3.14+](https://www.python.org/downloads/)\n2. Install [PDM](https://pdm-project.org/latest/#recommended-installation-method)\n3. Install [Allure CLI](https://docs.qameta.io/allure/#_installing_a_commandline) (for reports)\n\n### Initial Setup\n\n```bash\n# Install dependencies\npdm install -G dev\n\n# Install Playwright browsers\npdm run playwright install chromium\n\n# Install pre-commit hooks\npdm run pre-commit install\n\n# Configure environment\ncp .env.template .env\n# Edit .env with your BASE_URL\n```\n\n### API Tests\n\n```bash\n# Run all API tests\npdm run pytest -m api\n\n# Run smoke tests only\npdm run pytest -m \"api and smoke\"\n\n# Run with verbose output\npdm run pytest -m api -v\n```\n\n### E2E Tests\n\n```bash\n# Run all E2E tests\npdm run pytest -m e2e\n\n# Run specific feature tests\npdm run pytest -m \"e2e and journal\"\n\n# Run headed (visible browser)\nCI=false pdm run pytest -m e2e\n```\n\n### Full Test Suite\n\n```bash\n# Run everything\npdm run test\n\n# Run with Allure results collection\npdm run test-allure\n```\n\n---\n\n## Quality Gates\n\n### CI/CD Pipeline\n\nThe GitHub Actions workflow enforces the following quality gates:\n\n| Gate | Trigger | Action |\n|------|---------|--------|\n| **API Tests** | PR to main, dispatch | Must pass for E2E to run |\n| **E2E Tests** | After API tests pass | Browser automation validation |\n| **Status Report** | On dispatch events | Reports back to main repo |\n\n### Execution Flow\n\n```\n┌─────────────────┐\n│  Setup Job      │  Checkout, install deps, cache Playwright\n└────────┬────────┘\n         │\n         ▼\n┌─────────────────┐\n│  API Tests      │  Start SUT → Run API tests → Upload results\n└────────┬────────┘\n         │\n         ▼\n┌─────────────────┐\n│  E2E Tests      │  Start SUT → Run E2E tests → Upload results\n└────────┬────────┘\n         │\n         ▼\n┌─────────────────┐\n│  Report Status  │  Post commit status back to LumaireJ repo\n└─────────────────┘\n```\n\n### Local Quality Checks\n\n```bash\n# Lint code\npdm run lint\n\n# Auto-fix lint issues\npdm run fix\n\n# Format code\npdm run format\n```\n\n---\n\n## Test Reporting\n\n### Allure Reports\n\n```bash\n# Generate report from results\npdm run report\n\n# Open report in browser\npdm run open_report\n```\n\n### CI Artifacts\n\nEach CI run uploads:\n- `allure-report-api/` - API test results\n- `allure-report-e2e/` - E2E test results\n- `app-logs-*` - SUT (System Under Test) logs\n\n---\n\n## Environment Variables\n\n| Variable | Description | Required | Default |\n|----------|-------------|----------|---------|\n| `BASE_URL` | Application base URL | Yes | - |\n| `CI` | CI environment flag | No | `false` |\n| `DATABASE_URL` | Database connection (CI only) | CI only | - |\n\n### Local Development\n\n```bash\n# .env file\nBASE_URL=http://localhost:8000\nCI=false\n```\n\n### GitHub Actions\n\nConfigure as repository secrets:\n- `BASE_URL` - SUT endpoint URL\n- `DATABASE_URL` - Test database connection\n- `PAT_FOR_MAIN_REPO` - Token for cross-repo status reporting\n\n---\n\n## Contributing\n\n### Adding New Tests\n\n1. **API Tests**: Add to `tests/api/tests/`, use `@pytest.mark.api`\n2. **E2E Tests**: Add to `tests/e2e/tests/`, create Page Objects in `pages/`\n3. **Shared Data**: Add fixtures to `tests/shared/test_data.py`\n\n### Test Naming Convention\n\n```python\ndef test_\u003caction\u003e_\u003cexpected_outcome\u003e():\n    \"\"\"Test that \u003caction\u003e results in \u003cexpected_outcome\u003e.\"\"\"\n```\n\n### Commit Standards\n\nFollow [Conventional Commits](https://www.conventionalcommits.org/):\n- `test:` New test cases or test coverage\n- `fix(tests):` Bug fixes in test code\n- `refactor(tests):` Test code restructuring\n- `ci:` CI/CD pipeline changes\n- `chore:` Dependency updates, config changes\n\n---\n\n## Author\n\n**Darie Ro** - [glicerinn@gmail.com](mailto:glicerinn@gmail.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariero%2Flumairej-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdariero%2Flumairej-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariero%2Flumairej-tests/lists"}