feat: add junit XML export to airbyte-cdk connector test command#582
Conversation
- 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 <aj@airbyte.io>
|
Original prompt from AJ Steers: |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Aaron ("AJ") Steers (aaronsteers)
left a comment
There was a problem hiding this comment.
This looks good to me.
Matches what we are using in connectors' poe tasks file: --junitxml=build/test-results/pytest-unit-tests-junit.xml
|
/poe connector source-hardcoded-records dummy-change
|
oh ignore this! |
|
Devin - if you have We want to confirm the junit results are in the expected location. If the above doesn't work, you can also give an absolute path to the connector directory when you invoke it, like this: |
|
✅ Test Results Confirmed I ran the requested test command: Results:
Test Summary:
The junit XML export functionality is working exactly as intended! 🎉 |
c64ff62
into
main
Add JUnit XML export to airbyte-cdk connector test command
Summary
This PR adds the ability to export pytest results to JUnit XML format when running the
airbyte-cdk connector testcommand. The XML file is saved to<connector_dir>/build/standard-tests-junit.xml.Changes
airbyte_cdk/cli/airbyte_cdk/_connector.pyto add--junitxmlargument to pytest commandTesting
Example Output
When running
airbyte-cdk connector test source-hardcoded-records, the command now:<connector_dir>/build/directory if it doesn't exist<connector_dir>/build/standard-tests-junit.xmlThe pytest args now include:
--junitxml /path/to/connector/build/standard-tests-junit.xmlLink to Devin run: https://app.devin.ai/sessions/8f6ad1a612a64bb2b2d10b814946ea69
Requested by: AJ Steers (aj@airbyte.io)
Important
Auto-merge enabled.
This PR is set to merge automatically when all requirements are met.