|
12 | 12 | - **Color-Coded Terminal Output**: Easily identify test statuses with intuitive colors. |
13 | 13 | - **"On-Fail" Logic**: Define custom actions for failed tests to improve debugging. |
14 | 14 | - **Masked Failures**: Optionally ignore specific test failures or skips without halting the suite. |
15 | | -- **Rich Reporting**: Generate markdown summaries for easy sharing and tracking. |
| 15 | +- **JSON Export**: Export comprehensive test results in JSON format for further processing. |
16 | 16 | - **Isolated Environment**: Use temporary directories and files for scratch area. Ensuring nothing is left after test execution, even if the test itself crashes. |
17 | 17 |
|
18 | 18 | --- |
|
24 | 24 | git clone <repository-url> |
25 | 25 | cd 9pm |
26 | 26 | ``` |
27 | | -2. Install dependencies: |
| 27 | +2. Install core dependencies: |
28 | 28 | ```bash |
29 | 29 | pip install pyyaml |
30 | | - gem install --user-install asciidoctor-pdf rouge |
31 | 30 | ``` |
32 | 31 |
|
33 | 32 | > [!NOTE] |
34 | | -> On Debian/Ubuntu systems you can use standard packages for the requirements: |
35 | | -> `sudo apt install python3-yaml ruby-asciidoctor-pdf ruby-rouge` |
| 33 | +> This is all you need to run tests and export JSON results. For report generation, see the [Report Generation](#report-generation) section below. |
36 | 34 |
|
37 | 35 | --- |
38 | 36 |
|
@@ -111,12 +109,51 @@ o Execution |
111 | 109 | `-- o 0002-upload-os.sh |
112 | 110 | ``` |
113 | 111 |
|
114 | | -## Test Results |
| 112 | +## Report Generation |
115 | 113 |
|
116 | | -9pm generates detailed reports: |
| 114 | +9pm exports test results as JSON by default. Additional report formats can be generated using the `report.py` tool. |
117 | 115 |
|
118 | | -1. **Human-Readable Markdown**: `result.md` |
119 | | -2. **GitHub-Compatible Markdown**: `result-gh.md` |
| 116 | +### JSON Export (Always Available) |
| 117 | + |
| 118 | +Every test run generates a comprehensive `result.json` file containing: |
| 119 | +- Test metadata and timestamps |
| 120 | +- Complete hierarchical test structure |
| 121 | +- Embedded test output logs |
| 122 | +- Summary statistics |
| 123 | + |
| 124 | +### Optional Report Formats |
| 125 | + |
| 126 | +Install additional dependencies for report generation: |
| 127 | + |
| 128 | +```bash |
| 129 | +# For PDF reports |
| 130 | +gem install --user-install asciidoctor-pdf rouge |
| 131 | +
|
| 132 | +# On Debian/Ubuntu |
| 133 | +sudo apt install ruby-asciidoctor-pdf ruby-rouge |
| 134 | +``` |
| 135 | + |
| 136 | +Generate reports from JSON: |
| 137 | + |
| 138 | +```bash |
| 139 | +# Generate specific format |
| 140 | +python3 report.py result.json github # -> result-gh.md |
| 141 | +python3 report.py result.json markdown # -> result.md |
| 142 | +python3 report.py result.json asciidoc # -> report.adoc |
| 143 | +
|
| 144 | +# Generate all formats |
| 145 | +python3 report.py result.json all |
| 146 | +
|
| 147 | +# Generate PDF from AsciiDoc |
| 148 | +make report # Generates report.pdf |
| 149 | +``` |
| 150 | + |
| 151 | +### Report Formats |
| 152 | + |
| 153 | +1. **GitHub Markdown** (`result-gh.md`): GitHub-compatible with emoji status indicators |
| 154 | +2. **Plain Markdown** (`result.md`): Simple markdown format |
| 155 | +3. **AsciiDoc** (`report.adoc`): Comprehensive report with embedded test logs |
| 156 | +4. **PDF** (`report.pdf`): Professional report generated from AsciiDoc |
120 | 157 |
|
121 | 158 | ### GitHub Emoji Legend |
122 | 159 |
|
|
0 commit comments