Unit Test API
Import test session from JUnit XML file(s) using suite token authentication
Import a test session by uploading one or more JUnit XML files. This endpoint accepts multipart/form-data with test report files and optional metadata fields.
Authentication: Include the suite token in the header: Authorization: Bearer <suite_token>
The endpoint automatically parses JUnit XML format, extracts test groups (test suites) and test cases, and creates a complete test session with all results.
Example using curl:
curl -X POST https://api.buddy.works/unit-tests/import \
-H "Authorization: Bearer bud_ut_us_..." \
-F "files=@test-results-1.xml" \
-F "files=@test-results-2.xml" \
-F "ci_provider=GITHUB_ACTION" \
-F "ci_run_url=https://github.com/user/repo/actions/runs/123456" \
-F "revision=b2c3d4e5..." \
-F "ref_type=BRANCH" \
-F "ref_name=main"
post/unit-tests/import
Response
Test session created successfully