Skip to content

Commit 47d626e

Browse files
feat: add junit XML export to airbyte-cdk connector test command
- Add --junitxml argument to pytest command to export results to <connector_dir>/build/standard-tests-junit.xml - Create build directory if it doesn't exist - Maintains existing functionality while adding test result export capability Co-Authored-By: AJ Steers <[email protected]>
1 parent f03dc9f commit 47d626e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

airbyte_cdk/cli/airbyte_cdk/_connector.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,13 @@ def test(
162162
pytest_args.append("--collect-only")
163163

164164
pytest_args.append(str(test_file_path))
165+
166+
if connector_directory:
167+
build_dir = connector_directory / "build"
168+
build_dir.mkdir(parents=True, exist_ok=True)
169+
junit_xml_path = build_dir / "standard-tests-junit.xml"
170+
pytest_args.extend(["--junitxml", str(junit_xml_path)])
171+
165172
click.echo(f"Running tests from connector directory: {connector_directory}...")
166173
click.echo(f"Test file: {test_file_path}")
167174
click.echo(f"Collect only: {collect_only}")

0 commit comments

Comments
 (0)