Metadata-Version: 2.4
Name: robotframework-reportlens
Version: 0.1.6
Summary: Generate a modern, interactive HTML report from Robot Framework output.xml
Author-email: Deekshith Poojary <deekshithpoojary355@gmail.com>
License-Expression: Apache-2.0
Project-URL: Repository, https://github.com/deekshith-poojary98/robotframework-reportlens
Keywords: robotframework,report,html,testing,cli,log
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Framework :: Robot Framework
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: robotframework>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: build; extra == "dev"
Dynamic: license-file

# Robotframework ReportLens

[![PyPI version](https://badge.fury.io/py/robotframework-reportlens.svg)](https://badge.fury.io/py/robotframework-reportlens)
[![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue.svg)](https://www.python.org/downloads/)
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/robotframework-reportlens?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=BRIGHTGREEN&left_text=downloads)](https://pepy.tech/projects/robotframework-reportlens)
[![CI Tests](https://github.com/deekshith-poojary98/robotframework-reportlens/actions/workflows/code-checks.yml/badge.svg)](https://github.com/deekshith-poojary98/robotframework-reportlens/actions/workflows/code-checks.yml)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/deekshith-poojary98/robotframework-reportlens)

**ReportLens** turns Robot Framework XML output (`output.xml`) into a single, self-contained HTML report with a modern, interactive UI.

## Sample Report

View generated reports here

- [Pass Report](https://deekshith-poojary98.github.io/robotframework-reportlens/pass/pass_report.html "Link to sample report")
- [Fail Report](https://deekshith-poojary98.github.io/robotframework-reportlens/fail/fail_report.html "Link to sample report")

![Sample Report](https://raw.githubusercontent.com/deekshith-poojary98/robotframework-reportlens/main/assets/sample_report1.png)

![Sample Report](https://raw.githubusercontent.com/deekshith-poojary98/robotframework-reportlens/main/assets/sample_report2.png)

## Installation

```bash
pip install robotframework-reportlens
```

Requires **Python 3.10+**. No extra dependencies (stdlib only).

## Usage

After running Robot Framework tests (e.g. `robot test/`), generate a report from `output.xml`:

```bash
reportlens output.xml -o report.html
```

**Arguments:**

- `xml_file` – Path to Robot Framework XML output (e.g. `output.xml`)
- `-o`, `--output` – Output HTML path (default: `report.html`)
- `--external-data` – Store report data in `reportlens-data/` and fetch it lazily (recommended for huge suites)

**Examples:**

```bash
# Default output (report.html in current directory)
reportlens output.xml

# Custom output path
reportlens output.xml -o docs/report.html

# External-data mode (lazy loading + smaller HTML)
reportlens output.xml -o report.html --external-data
```

Open the generated `.html` file in a browser.

> **External-data mode note**
> When using `--external-data`, open the report via a local web server (e.g. `python -m http.server`). Opening the file directly with `file://` will show a banner with a helpful link to the hosted report.

You can also run the module directly:

```bash
python -m robotframework_reportlens output.xml -o report.html
```

## Features

- **Suite/test tree** – Navigate suites and tests with pass/fail/skip counts
- **Search & filters** – Filter by status and tags; search test names
- **External-data mode** – Optional `--external-data` output for lazy loading and smaller HTML files
- **Keyword tree** – Expand SETUP, keywords, and TEARDOWN; select a keyword to see its logs
- **Logs panel** – Log level filter (All, ERROR, WARN, INFO, etc.); copy button on each log message (shown on hover)
- **Failed-tests summary** – Quick access to failed tests from the sidebar
- **Dark/light theme** – Toggle in the report header
- **Batch rendering** – Large suites render tests in batches for smoother UI performance
- **Fixed layout** – Same layout on all screens; zoom and scroll as needed

## How it works

ReportLens reads `output.xml`, parses suites, tests, keywords, and messages, then builds one HTML file from a bundled template. The report is data-driven: all content is embedded as JSON and rendered by JavaScript in the browser. No server required.

## Development / source layout

```
├── robotframework_reportlens/
│   ├── __init__.py
│   ├── cli.py           # reportlens entry point
│   ├── generator.py     # XML → report data → HTML
│   └── template/
│       └── template.html
├── tests/
│   ├── conftest.py      # pytest fixtures
│   ├── test_cli.py      # CLI tests
│   ├── test_generator.py # report generator tests
│   └── fixtures/        # minimal Robot output.xml for tests
├── pyproject.toml
└── README.md
```

### Running tests

Install with dev dependencies and run pytest:

```bash
pip install -e ".[dev]"
pytest tests/ -v
```

## License

Apache License 2.0 - See [LICENSE](LICENSE) file for details.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


