An open API service indexing awesome lists of open source software.

https://github.com/daleonpz/raiz

Simply CLI Requirements management tool
https://github.com/daleonpz/raiz

embedded embedded-systems python requirements-management software software-engineering systems-engineering

Last synced: 11 months ago
JSON representation

Simply CLI Requirements management tool

Awesome Lists containing this project

README

          

# ๐Ÿงฐ Raiz - Simple CLI Requirements Management Tool

A CLI tool to manage, track, and trace software requirements with automated test case linking, traceability reporting, and seamless integration with Robot Framework.

> Built for developers and teams working with embedded systems, Zephyr RTOS, or other projects where traceability and coverage are crucial.

You can try Raiz using the provided [example](example/).

## ๐Ÿ“š Table of Contents

* [๐Ÿš€ Features](#features)
* [๐Ÿ“ฆ Installation](#installation)
* [โœ๏ธ Requirements Format (YAML)](#requirements-format-yaml)
* [๐Ÿงช Robot Framework Integration](#robot-framework-integration)
* [๐Ÿงพ CLI Usage](#cli-usage)
* [Add a Requirement](#add-a-requirement)
* [Remove a Requirement](#remove-a-requirement)
* [Trace Requirements Coverage](#trace-requirements-coverage)
* [List Requirements](#list-requirements)
* [Update Requirement](#update-requirement)
* [Sync Requirements](#sync-requirements)
* [๐Ÿ“ Reports and Temp Files](#reports-and-temp-files)
* [๐Ÿงช Testing](#testing)
* [๐Ÿ—๏ธ Roadmap](#roadmap)
* [๐Ÿ“„ License](#license)
* [๐Ÿค Contributing](#contributing)

## ๐Ÿš€ Features

* ๐Ÿ“„ **Define and manage software requirements** (Functional, Non-functional, Constraints)
* ๐Ÿ”— **Link test cases** (from Robot Framework) to specific requirements using tags (e.g., `REQ-001`)
* โœ… **Trace test coverage** โ€” which requirements are tested, which are missing
* ๐Ÿ—ƒ๏ธ **SQLite-backed DB** for performance and reliability
* ๐Ÿงช **Robot Framework integration** using `output.xml`
* ๐Ÿ“ฆ Installable via `pip`
* ๐Ÿ“Š **Traceability reporting**: Console, JSON
* ๐Ÿงน Automatic renumbering of requirements
* ๐Ÿงฐ Modular and extensible codebase

## ๐Ÿ“ฆ Installation

```bash
pip install raiz
```

## โœ๏ธ Requirements Format (YAML)

All requirements are stored in a single `requirements.yaml` file and look like:

```yaml
- id: REQ-001
description: "The system shall support BLE communication."
type: functional
domain: ble
linked_tests: []
```

IDs are renumbered automatically.

## ๐Ÿงช Robot Framework Integration

Tests should be tagged with requirement IDs:

```robot
*** Test Cases ***
Test BLE Connection
[Tags] REQ-001
Do Something
```

After executing tests (which generates `output.xml`), you can trace coverage.

## ๐Ÿงพ CLI Usage

Run **raiz** from your repository

```bash
cd my_repo/
raiz [options]
```

### Add a Requirement

```bash
raiz add
```

Prompts for description, type, domain.

### Remove a Requirement

```bash
raiz rm
raiz rm 3
```

Deletes requirement `REQ-003` and renumbers all remaining ones.

### Trace Requirements Coverage

```bash
raiz trace --fmt json --output trace_report
```

* `--format`: `console`, `json`
* `--robot-output`: location of the Robot Framework output file
* `--output`: output of the report file. The extension is added automatically
* `--detail`: generates a more detailed trace report

```json
{
"timestamp": "2025-08-08T19:16:46.837013",
"coverage": {
"total_requirements": 2,
"tested_requirements": 2,
"pass_rate": 75.0,
"coverage_rate": 100.0
},
"report": {
"REQ-001": {
"uuid": "c567c0d4-fe18-4d9b-8a1a-2e6b128ed89f",
"description": "Library should have add function",
"type": "functional",
"domain": "math",
"linked_tests": [
"Add Integers",
"Fail Add Integers"
],
"test_results": [
[
"test_math.robot",
"Add Integers",
"PASS"
],
[
"test_math.robot",
"Fail Add Integers",
"FAIL"
]
]
},
"REQ-XXX": {
...
}
},
"detailed_report": {
"domains": {
"math": {
"total_requirements": 2,
"tested_requirements": 2,
"pass_rate": 75.0,
"coverage_rate": 100.0
}
},
"types": {
"functional": {
"total_requirements": 2,
"tested_requirements": 2,
"pass_rate": 75.0,
"coverage_rate": 100.0
}
}
}
}
```

Options valid only for `--fmt console`

* `--domain`: Filter report by specific domain
* `--type`: Filter report by specific requirement type

```bash
raiz trace --fmt console --domain ble
raiz trace --fmt console --type functional
```

image

### Show Requirements

```bash
raiz show all # Show all saved requirements
raiz show domains # Show all unique domains found across the saved requirements
raiz show types # Show all unique requirement types found across the saved requirements
```

image

### Update Requirement

```bash
raiz update
raiz update 3
```

Prompts to update description/type/domain

Or directly update the `type` for requirement REQ-003

```bash
raiz update 3 --field type -value performance
```

### Sync Requirements

Requirements are stored in a temporary SQLite database. To generate a YAML file with all requirements and commit your changes, use:

```bash
raiz sync to-yaml
git add requirements.yaml
```

If you have a `requirements.yaml` file and want to load it into the SQLite database, use:

```bash
raiz sync from-yaml
```

## Reports and Temp Files

* `.req_cache/` contains temporal files required to manage requirements
* `traceability.json` default output

## ๐Ÿงช Testing

```bash
robot tests/system
```

## ๐Ÿ—๏ธ Roadmap

* [x] Report in YAML format
* [x] Multiple output formats (Console/JSON)
* [ ] Support to [Requirements Interchange Format - ReqIF](https://de.wikipedia.org/wiki/Requirements_Interchange_Format)
* [ ] Support for the Zephyr RTOS testing framework.
* [ ] Improve documentation and create wiki.

## ๐Ÿ“„ License

Apache License 2.0

## ๐Ÿค Contributing

Pull requests welcome! Please run the linter (ruff) and tests before submitting.