Skip to content

Commit 42beb38

Browse files
authored
Generate more detailed JUnit reports (#93)
* Generate more detailed JUnit reports * Add permission to e2e, add prefix to junit reports * Separate XML file for measurement and validation * Only run performance tests on main and dev branches
1 parent 0b28c7a commit 42beb38

File tree

3 files changed

+41
-4
lines changed

3 files changed

+41
-4
lines changed

.github/workflows/tests-e2e.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Run e2e tests - neptune-query
22

3+
permissions:
4+
checks: write
5+
36
on:
47
schedule:
58
- cron: '0 8 * * *' # Run at 8:00 daily
@@ -65,10 +68,13 @@ jobs:
6568
uses: mikepenz/action-junit-report@v5
6669
if: always()
6770
with:
71+
check_name: 'E2E tests report'
6872
report_paths: "./test-results/test-e2e*.xml"
69-
update_check: true
70-
annotate_notice: true
71-
job_name: "e2e tests"
73+
detailed_summary: true
74+
verbose_summary: true
75+
include_passed: true
76+
include_time_in_summary: true
77+
resolve_ignore_classname: true
7278

7379
- name: Notify Slack on failure
7480
if: failure() && github.event_name == 'schedule'

.github/workflows/tests-performance.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Performance tests
22

3+
permissions:
4+
checks: write
5+
36
on:
47
schedule:
58
- cron: '0 8 * * *' # Run at 8:00 daily
@@ -17,7 +20,7 @@ on:
1720
# - '.github/workflows/tests-performance.yml'
1821

1922
jobs:
20-
test:
23+
test-performance:
2124
runs-on: gcp-perf-test-dedicated
2225
container:
2326
image: ubuntu:24.04
@@ -45,3 +48,25 @@ jobs:
4548
- name: Run performance tests
4649
run: |
4750
pytest --junitxml="test-results/test-performance.xml" tests/performance
51+
52+
- name: Report measurements
53+
uses: mikepenz/action-junit-report@v5
54+
if: always()
55+
with:
56+
check_name: 'Performance measurements'
57+
report_paths: "./test-results/test-performance.xml"
58+
detailed_summary: true
59+
include_passed: true
60+
include_time_in_summary: true
61+
resolve_ignore_classname: true
62+
63+
- name: Performance validation
64+
uses: mikepenz/action-junit-report@v5
65+
if: always()
66+
with:
67+
check_name: 'Performance validation'
68+
report_paths: "./test-results/test-performance__validation.xml"
69+
detailed_summary: true
70+
include_passed: true
71+
include_time_in_summary: true
72+
resolve_ignore_classname: true

tests/performance/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ def pytest_configure(config):
2222
config.option.benchmark_time_unit = "ms"
2323
config.option.benchmark_sort = "name"
2424
config.option.benchmark_json = BytesIO()
25+
config.option.junitxml = "benchmark_measurement.xml"
26+
else:
27+
if config.option.xmlpath:
28+
# For --junitxml = /path/abc.xml, create /path/abc__validation.xml
29+
path = Path(config.option.xmlpath)
30+
config.option.xmlpath = str(path.with_stem(path.stem + "__validation"))
2531

2632

2733
def pytest_benchmark_update_json(config, benchmarks, output_json):

0 commit comments

Comments
 (0)