Metadata-Version: 2.4
Name: testla
Version: 0.1.1
Summary: Git-native test case management
Author-email: m1yag1 <8730430+m1yag1@users.noreply.github.com>
License: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: python-frontmatter>=1.1.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: textual>=0.50.0
Requires-Dist: typer>=0.12.0
Description-Content-Type: text/markdown

# Testla

Git-native test case management for modern development workflows.

## What is Testla?

Testla stores test cases as Markdown files in your repository, making them:

- **Version controlled** - Cases branch, merge, and have history like code
- **PR reviewable** - Test case changes appear alongside code changes
- **CI-native** - No external service required to access test definitions

## Quick Start

```bash
# Install
pip install testla

# Initialize in your repo
testla init --name "My Project"

# Create a test case
testla case new auth/login --title "User can login"

# List cases
testla case list
```

## Test Case Format

Cases live in `testla/cases/` as Markdown with YAML frontmatter:

```markdown
---
id: TC001
title: User can login with valid credentials
priority: high
tags: [auth, smoke]
automation:
  status: automated
  test_path: tests/test_auth.py::test_valid_login
---

## Preconditions

- User account exists

## Steps

1. Navigate to login page
2. Enter valid credentials

## Expected Result

User sees dashboard
```

## pytest Integration

Link automated tests to cases using the `@pytest.mark.testla` marker:

```python
import pytest

@pytest.mark.testla("TC001")
def test_user_can_login():
    ...
```

Run tests and see the Testla report:

```bash
pytest -m testla -v
```

## Configuration

Add to your `pyproject.toml`:

```toml
[tool.testla]
project_name = "My Project"
case_id_prefix = "TC"
case_id_digits = 3
```

## Development

```bash
# Clone and install
git clone https://github.com/m1yag1/testla.git
cd testla
uv sync --group dev

# Run tests
uv run pytest tests/ -v

# Format and lint
uv run ruff format .
uv run ruff check .
```

## License

Apache-2.0
