Skip to content

docs: add JUnit XML Reports page#804

Open
PrathamSikka24 wants to merge 2 commits intomainfrom
docs/junit-xml-reports
Open

docs: add JUnit XML Reports page#804
PrathamSikka24 wants to merge 2 commits intomainfrom
docs/junit-xml-reports

Conversation

@PrathamSikka24
Copy link
Contributor

What has changed?

Adds a new docs page — JUnit XML Reports — under Integration Testing in the sidebar (after Time Freezing).

The page covers:

  • --format junit flag usage on keploy report
  • JUnit XML output structure (test-sets → <testsuite>, failures → <failure>, obsolete → <skipped>)
  • CI configuration examples for GitHub Actions, GitLab CI, Jenkins, and CircleCI

This documents the feature introduced in keploy/keploy#3955.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

How Has This Been Tested?

  • Ran npm run build locally — no errors
  • Verified page renders correctly at localhost:3000/docs/keploy-cloud/junit-xml-reports
  • Confirmed sidebar entry appears after Time Freezing

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

Copilot AI review requested due to automatic review settings March 22, 2026 07:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for exporting Keploy test results as JUnit XML and wires the new page into the v4.0.0 docs sidebar under Integration Testing.

Changes:

  • Adds a new docs page: JUnit XML Reports (usage, XML structure, CI examples).
  • Registers the page in version-4.0.0-sidebars.json after Time Freezing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
versioned_sidebars/version-4.0.0-sidebars.json Adds the new keploy-cloud/junit-xml-reports entry to the Integration Testing sidebar section.
versioned_docs/version-4.0.0/keploy-cloud/junit-xml-reports.md New page describing keploy report --format junit, output structure, and CI configuration snippets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +27
Keploy supports exporting test results as standard JUnit XML. Use `--format junit` flag on the `keploy report` command — CI systems parse the output natively, no plugins or custom parsers needed.
Supported CI systems: GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure DevOps.
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intro claims CI systems parse the JUnit output “natively, no plugins or custom parsers needed”, but the GitHub Actions example below requires an external action to publish results. Consider rewording to something like “most CI systems can ingest JUnit XML” (and note that some, e.g. GitHub Actions, require a publishing step).

Suggested change
Keploy supports exporting test results as standard JUnit XML. Use `--format junit` flag on the `keploy report` command — CI systems parse the output natively, no plugins or custom parsers needed.
Supported CI systems: GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure DevOps.
Keploy supports exporting test results as standard JUnit XML. Use the `--format junit` flag on the `keploy report` command — most CI systems can ingest JUnit XML, though some (like GitHub Actions) require a separate step to publish the results.
Supported CI systems include: GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure DevOps.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the necessary changes and reworded this section in the docs.

Comment on lines +26 to +34
Keploy supports exporting test results as standard JUnit XML. Use `--format junit` flag on the `keploy report` command — CI systems parse the output natively, no plugins or custom parsers needed.
Supported CI systems: GitHub Actions, GitLab CI, Jenkins, CircleCI, Azure DevOps.

## Usage

```bash
keploy test -c "<CMD_TO_RUN_APP>" --delay 10
keploy report --format junit > test-results.xml
```
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page documents keploy report --format junit, but the v4.0.0 CLI reference (running-keploy/cli-commands.md) doesn’t list a --format flag for report. To avoid confusing readers, please either update the CLI reference in this version or add a note/link clarifying where this flag is documented and from which Keploy version it’s available.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the --format flag to the report command in versioned_docs/version-4.0.0/running-keploy/cli-commands.md, including usage examples and a link back to this page.

Comment on lines +78 to +88
- name: Run Keploy Tests
run: keploy test -c "<CMD_TO_RUN_APP>" --delay 10

- name: Generate JUnit Report
run: keploy report --format junit > test-results.xml

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: test-results.xml
```
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In GitHub Actions, if keploy test fails (which is when the JUnit report is most valuable), subsequent steps won’t run by default—so the report may never be generated/published. Adjust the example to ensure the report generation and publishing steps run even when tests fail (e.g., by using an always-run condition and/or capturing the test exit code).

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were several examples of CI providers, so it makes more sense to keep one example because the configuration process is similar across all CI providers.

@slayerjain
Copy link
Member

@PrathamSikka24 please handle the GitHub copilot comments. The related PR in keploy is now merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants