Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c5308e1
[examples] Add API key integration example
Alexandroviliav Dec 9, 2025
bea42cc
Change stand_cloud_thirdparty_integration path
Alexandroviliav Dec 9, 2025
85ada86
[examples] Rename doc
Alexandroviliav Dec 9, 2025
6cd8b54
[examples] Rename integration_flow
Alexandroviliav Dec 9, 2025
f14770c
[stand_cloud_integration] Rm excess consts
Alexandroviliav Dec 9, 2025
b4cc2eb
[examples] Update StandCloud third party integration article
Alexandroviliav Dec 9, 2025
fdd54a0
Merge branch 'main' into feature/sc_integration_doc
xorialexandrov Dec 9, 2025
e13c1ed
Merge pull request #240 from everypinio/feature/sc_integration_doc
xorialexandrov Dec 9, 2025
ec08080
Merge remote-tracking branch 'origin/main' into fix/update_from_main
Alexandroviliav Dec 10, 2025
8f5c82f
Add Discord invite link
Alexandroviliav Dec 10, 2025
085c421
Merge pull request #241 from everypinio/fix/update_from_main
xorialexandrov Dec 10, 2025
8251765
Merge remote-tracking branch 'origin/main' into feature/json_support_doc
Alexandroviliav Dec 29, 2025
a3dbe7c
Update package to 0.20.0
Alexandroviliav Dec 29, 2025
5c8791b
Add JSON info
Alexandroviliav Dec 29, 2025
bdd9ae6
[documentation] Add storage type info
Alexandroviliav Dec 29, 2025
64b231f
[hardpy] Add storage_type
Alexandroviliav Dec 29, 2025
f51036b
[test_cli] Add storage_type test
Alexandroviliav Dec 29, 2025
9b40b64
[examples] Add storage_type
Alexandroviliav Dec 29, 2025
95bf5b9
[common] Add storage_type docstring
Alexandroviliav Dec 29, 2025
a4e527f
[test_config] Add storage_type
Alexandroviliav Dec 29, 2025
cfa42ed
Add uuid6 for uuid7 using
Alexandroviliav Dec 29, 2025
d863684
[pytest_hardpy] Fix JSON tempstore usage
Alexandroviliav Dec 29, 2025
d1293cb
[.vscode] Add JSON storage example
Alexandroviliav Dec 29, 2025
527cb28
Add json_storage.md
Alexandroviliav Dec 29, 2025
cb39cee
Add example without a database
Alexandroviliav Dec 29, 2025
6563164
[docs] Fix link
Alexandroviliav Dec 29, 2025
c514ecd
[docs] Add JSON features
Alexandroviliav Dec 29, 2025
49582e9
[json_storage] Mv json storage example
Alexandroviliav Dec 29, 2025
79a6de6
[hardpy] Add JsonLoader
Alexandroviliav Dec 29, 2025
9f6a2a5
[test_plugin] Add JSON tests
Alexandroviliav Dec 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,17 @@
"examples/minute_parity"
]
},
{
"name": "Python: Example JSON storage",
"type": "debugpy",
"request": "launch",
"module": "hardpy.cli.cli",
"console": "integratedTerminal",
"args": [
"run",
"examples/json_storage"
]
},
{
"name": "Python: Example Multiple configs",
"type": "debugpy",
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ HardPy is a python library for creating a test bench for devices.
[![pytest versions](https://img.shields.io/badge/pytest-%3E%3D7.0-blue)](https://docs.pytest.org/en/latest/)
[![Documentation](https://img.shields.io/badge/Documentation%20-Overview%20-%20%23007ec6)](https://everypinio.github.io/hardpy/)
[![Reddit](https://img.shields.io/badge/-Reddit-FF4500?style=flat&logo=reddit&logoColor=white)](https://www.reddit.com/r/HardPy)
[![Discord](https://img.shields.io/discord/1304494076799877172?color=7389D8&label&logo=discord&logoColor=ffffff)]()
[![Discord](https://img.shields.io/discord/1304494076799877172?color=7389D8&label&logo=discord&logoColor=ffffff)](https://discord.gg/98bWadmG8J)
[![Telegram](https://img.shields.io/badge/-Telegram-2CA5E0?style=flat&logo=telegram&logoColor=white)](https://t.me/everypin)

</div>
Expand All @@ -26,7 +26,7 @@ HardPy allows you to:

* Create test benches for devices using [pytest](https://docs.pytest.org/);
* Use a browser to view, start, stop, and interact with tests;
* Store test results in the [CouchDB](https://couchdb.apache.org/) database;
* Store test results in the [CouchDB](https://couchdb.apache.org/) database or to simple JSON files;
* Store test results on the [StandCloud](https://standcloud.io/) analytics platform.

<h1 align="center">
Expand All @@ -41,6 +41,8 @@ pip install hardpy

## Getting Started

### With CouchDB

1. Create your first test bench.
```bash
hardpy init
Expand All @@ -59,6 +61,18 @@ hardpy run

Login and password: **dev**, database - **runstore**.

### Without a database

1. Create your first test bench.
```bash
hardpy init --no-create-database --storage-type json
```
2. Launch HardPy operator panel.
```bash
hardpy run
```
3. View operator panel in browser: http://localhost:8000/

## Examples

For more examples of using **HardPy**, see the [examples](https://github.com/everypinio/hardpy/tree/main/examples) folder and the [documentation](https://everypinio.github.io/hardpy/examples/).
Expand Down
7 changes: 6 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Versions follow [Semantic Versioning](https://semver.org/): `<major>.<minor>.<patch>`.

## 0.20.0

* Add JSON file storage support as alternative to CouchDB.
[[PR-239](https://github.com/everypinio/hardpy/pull/239)]

## 0.19.1

* Add a `stop_time` validator function. If a case or module has a start time,
Expand All @@ -19,7 +24,7 @@ Versions follow [Semantic Versioning](https://semver.org/): `<major>.<minor>.<pa
tests to run via UI checkboxes.
[[PR-224](https://github.com/everypinio/hardpy/pull/224)]
* Add multiple test plan configurations.
[[PR-225]](https://github.com/everypinio/hardpy/pull/225)
[[PR-225](https://github.com/everypinio/hardpy/pull/225)]

## 0.18.3

Expand Down
1 change: 1 addition & 0 deletions docs/documentation/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ More info in [hardpy config](./hardpy_config.md).
| [default: no-sc-autosync] │
| [default: check-stand-cloud] │
│ --sc-api-key TEXT Specify a StandCloud API key. │
│ --storage-type TEXT Specify a storage type. [default: couchdb] |
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
Expand Down
12 changes: 10 additions & 2 deletions docs/documentation/hardpy_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tests_name = "My tests"
current_test_config = ""

[database]
storage_type = "json"
storage_type = "couchdb"
user = "dev"
password = "dev"
host = "localhost"
Expand Down Expand Up @@ -88,13 +88,21 @@ Storage type. The default is `couchdb`.

- `couchdb`: Stores test results and measurements in a CouchDB database. Requires a running CouchDB instance.
- `json`: Stores test results and measurements in local JSON files. No external database required.

Files are stored in the `.hardpy` directory in the root of the project.
The user can change this value with the `hardpy init --storage-type` option.

#### storage_path

Path to the storage directory. The default is `.hardpy` in the root of the project.
The user can change this value with the `hardpy init --storage-path` option. Relative and absolute paths are supported.
The user can change this value in the hardpy.toml file using the `storage_path` option.
Both relative and absolute paths are supported.

```toml
[database]
storage_type = "json"
storage_path = "result"
```

#### user

Expand Down
29 changes: 29 additions & 0 deletions docs/documentation/pytest_hardpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,35 @@ def fill_actions_after_test(post_run_functions: list):
yield
```

#### JsonLoader

Used to write reports to the JSON.

**Arguments:**

- `storage_dir` *(Path | None)*: JSON file directory.

**Functions:**

- `load` *(ResultRunStore, new_report_id)*: Load report to the JSON file.

**Example:**

```python
# conftest
def save_report_to_dir():
report = get_current_report()
if report:
loader = JsonLoader(Path.cwd() / "reports")
loader.load(report)


@pytest.fixture(scope="session", autouse=True)
def fill_actions_after_test(post_run_functions: list):
post_run_functions.append(save_report_to_dir)
yield
```

#### StandCloudLoader

Used to write reports to the **StandCloud**.
Expand Down
Loading