Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 4f5204d

Browse files
committed
produce test report
1 parent 8760f54 commit 4f5204d

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/nightly-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878

7979
- name: Run Integration Test
8080
id: test
81-
uses: stackabletech/actions/run-integration-test@5b66858af3597c4ea34f9b33664b8034a1d28427 # v0.3.0
81+
uses: stackabletech/actions/run-integration-test@upload-test-report # todo, update on release of the actions
8282
with:
8383
test-platform: ${{ env.TEST_PLATFORM }}-${{ env.TEST_ARCHITECTURE }}
8484
test-run: ${{ env.TEST_RUN }}

scripts/run-tests

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ Examples:
4747
created if it doesn't exist and will not be deleted when the tests end.
4848
4949
./scripts/run-tests --test-suite smoke-latest --namespace smoke
50+
51+
6. Run the smoke test suite and produce a JUnit test report.
52+
53+
./scripts/run-tests --report xml
5054
"""
5155

5256

@@ -136,6 +140,13 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
136140
required=False,
137141
)
138142

143+
parser.add_argument(
144+
"--report",
145+
help="Produce a JUnit Test Report (xml or json)",
146+
type=str,
147+
required=False,
148+
)
149+
139150
return parser.parse_args(argv)
140151

141152

@@ -339,7 +350,7 @@ def gen_tests(test_suite: str) -> None:
339350
raise TestRunnerException()
340351

341352

342-
def run_tests(test: str, parallel: int, namespace: str, skip_delete: bool) -> None:
353+
def run_tests(test: str, parallel: int, namespace: str, skip_delete: bool, report: str) -> None:
343354
try:
344355
kuttl_cmd = ["kubectl-kuttl", "test"]
345356
if test:
@@ -367,6 +378,8 @@ def run_tests(test: str, parallel: int, namespace: str, skip_delete: bool) -> No
367378
logging.error(stderr)
368379
logging.error("namespace creation failed")
369380
raise TestRunnerException()
381+
if report:
382+
kuttl_cmd.extend(["--report", report])
370383

371384
logging.debug(f"Running : {kuttl_cmd}")
372385

@@ -392,7 +405,7 @@ def main(argv) -> int:
392405
if opts.skip_tests:
393406
logging.info("Skip running tests.")
394407
else:
395-
run_tests(opts.test, opts.parallel, opts.namespace, opts.skip_delete)
408+
run_tests(opts.test, opts.parallel, opts.namespace, opts.skip_delete, opts.report)
396409
except TestRunnerException:
397410
ret = 1
398411
return ret

0 commit comments

Comments
 (0)