Convert `dbt` run results into a JUnit report format
Project description
DBT JUnit Report
This repository contains a Python script to convert dbt run results into a JUnit report format. This can be useful for integrating dbt results with CI/CD pipelines that support JUnit reports.
Installation
pip install dbt-junit-report
Usage
To convert a dbt run results JSON file to a JUnit report, run the following command:
dbt_junit_report <path-to-run_results.json> <path-to-output-junit-report.xml>
For example:
dbt_junit_report run_results.json junit_report.xml
Testing
To run the tests, use the following command:
uv run pytest
Code Overview
dbt_junit_report.py
This script contains the main functionality to convert dbt run results to a JUnit report.
convert_run_result_to_junit(result_file_path: Path, junit_file_path: Path): This function reads thedbtrun results from the specified JSON file, converts them to JUnit format, and writes the output to the specified XML file.
tests/test_dbt_junit_report.py
This file contains unit tests for the convert_run_result_to_junit function using the pytest framework.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_junit_report-1.0.12.tar.gz.
File metadata
- Download URL: dbt_junit_report-1.0.12.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f736b257e0e6c582e26a4e993ac4b6dd8402259d8a234d08f69e058eac48ed3
|
|
| MD5 |
e4c8e741bb29acefa87972cfbb8846c6
|
|
| BLAKE2b-256 |
3fcc15b7aea08037571ea67bd9681d0ee3cb2a778bcfe950d0983a1bd438e63f
|
File details
Details for the file dbt_junit_report-1.0.12-py3-none-any.whl.
File metadata
- Download URL: dbt_junit_report-1.0.12-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4686db64f5f1171b4b22ce918e287f7275db29fd35d7d16186771a29b79f460
|
|
| MD5 |
6d2a80cb8485ede7fd836e1e025f4351
|
|
| BLAKE2b-256 |
538298426f046d986bca8c5a75a9694e9cb307073ab4a4bc5129fb32a13c1588
|