Metadata-Version: 2.4
Name: apmt-reports
Version: 0.1.8
Summary: A premium, feature-rich, and beautiful automated testing HTML reporter for pytest, python, and playwright.
Home-page: https://github.com/anandkumargee/APMT-REPORT
License: MIT
Project-URL: Homepage, https://github.com/anandkumargee/APMT-REPORT
Project-URL: Repository, https://github.com/anandkumargee/APMT-REPORT
Project-URL: Bug Tracker, https://github.com/anandkumargee/APMT-REPORT/issues
Keywords: pytest,playwright,reporter,html-report,beautiful,premium-ui,dark-mode,test-automation,report,allure-alternative,pytest-playwright,e2e-testing
Classifier: Framework :: Pytest
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pytest>=7.0.0
Requires-Dist: jinja2>=3.0.0
Dynamic: home-page

# ⚡ pytest-apmt-reporter

`pytest-apmt-reporter` is a premium, feature-rich, and visually stunning automated testing HTML reporter for **Python**, **Pytest**, and **Playwright**. Designed as a modern, high-fidelity alternative to Allure and Robot Framework, it features responsive layouts, a glowing glassmorphic dark-mode dashboard, interactive charts, nested execution steps, failure tracebacks, and automatically embedded screenshots.

---

## 🎨 Premium Visual Preview
*(A sleek, glassmorphic dark-mode UI with vibrant neon colors, dynamic transitions, and interactive SVG status charts)*

---

## 🚀 Easy & Beautiful Step-by-Step Guide

### Step 1: 🔌 Installation
Install the package directly into your virtual environment:
```bash
pip install pytest-apmt-reporter
```
> [!NOTE]
> By hooking directly into standard Pytest entry points, the reporter is automatically active immediately upon installation. No extra setup or config files are required!

### Step 2: ✍️ Write Your Tests
Organize your test cases using step decorators, custom logs, metadata, and screenshots:
```python
import pytest_apmt_reporter as apmt

@apmt.step("1. Authenticate with credentials")
def login(username, password):
    apmt.attach("Connecting to authorization endpoint...", name="Network Handshake")
    # ... login logic ...

def test_purchase_flow(page):
    """Verify purchase process end-to-end"""
    apmt.set_environment_info("Environment", "Staging-US-East")
    
    with apmt.step("2. Populate Shopping Cart"):
        apmt.attach('{"item_id": 102, "qty": 1}', name="API Request Payload", attachment_type=apmt.AttachmentType.JSON)
        
    login("demo_user", "secure_pass")
    
    with apmt.step("3. Navigate to checkout and confirm"):
        page.goto("https://shop.dev.local/checkout")
        # If any assertion fails below, a screenshot is automatically captured!
        assert page.locator("#confirm-btn").is_visible()
```

### Step 3: 🛠️ Run & Generate
Simply run pytest as you normally would. The reporter will auto-detect and generate a beautiful self-contained HTML dashboard.
```bash
# Run pytest (generates report.html by default)
pytest

# Customize output filename and location
pytest --apmt-html=reports/e2e_dashboard.html

# Set a custom title for the dashboard header
pytest --apmt-title="US Staging E2E Suite"
```

### Step 4: 📊 View the Report
Open the generated HTML file in any browser of your choice.
- **Windows (PowerShell)**: `Start-Process report.html`
- **macOS/Linux**: `open report.html`

---

## ⚖️ Why pytest-apmt-reporter?

| Feature | `pytest-apmt-reporter` | `pytest-html` (Default) | `Allure` |
| :--- | :---: | :---: | :---: |
| **Design Aesthetics** | 🌟 Glowing Premium Dark Mode | 📄 Basic XML-like Table | 📊 Good (Requires Server) |
| **Self-Contained** | Yes (100% Offline-First) | Yes (when configured) | No (Requires Java Server) |
| **Zero Config Setup** | Yes (Plug-and-Play) | Yes | No (Complex CLI install) |
| **Auto Screenshots** | Yes (Auto Playwright hooks) | No | No |
| **Interactive Charts** | Yes (SVG, Vanilla JS) | No | Yes |

> [!TIP]
> Since the report is **100% offline-first**, all styles, execution metrics, and images are compiled into a **single HTML file**. No external CDNs or network connections are used, making it perfectly secure and portable for email sharing or CI/CD build artifacts.

---

## 📝 Advanced Features

### 1. Programmatic Attachments
Attach raw console stdout, logs, JSON objects, or custom screenshots directly to steps:
```python
apmt.attach("Some text log content", name="Log Name")
apmt.attach('{"status": "success"}', name="API Output", attachment_type=apmt.AttachmentType.JSON)
apmt.attach_screenshot(page, name="Post-Login Screen")
```

### 2. Custom Environment Properties
Inject metadata dynamically in the header summary cards:
```python
apmt.set_environment_info("Execution Mode", "Pytest Automation Suite")
apmt.set_environment_info("CI Build Run ID", "90123")
```

---

## 📈 Try the Repository Demo
To quickly see how exceptions, nested steps, and failure banners render, execute:
```bash
pytest demo/test_playwright_demo.py --apmt-html=demo_report.html
```
