Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up allure for integration tests #491

Merged
merged 54 commits into from
Dec 11, 2024
Merged

Setting up allure for integration tests #491

merged 54 commits into from
Dec 11, 2024

Conversation

swetha1654
Copy link
Collaborator

@swetha1654 swetha1654 commented Dec 2, 2024

Overview

Integrated Allure tool for visualization of integration tests.

Rationale

This integration is required so that we can analyse the reasons for failure of integration tests better.

Workflow Changes

  • The pytest collection plugin is defined under python/pytest-plugins for setting the default result status as unknown for all tests during collection time.
  • The allure-add-default-for-missing-results is defined to merge the results obtained from the collection time with the actual results.
  • Changes were made to integration-test-run.yaml to introduce the collection of tests and use the pytest plugin then.
  • Allure report generation workflow was defined to combine the results, create a report and upload it to gh-pages

Checklist

  • The contributing guide was applied
  • The PR is tagged with appropriate label (urgent, trivial, complex)

Results

Here's an example report from github-runners repo using this workflow.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 88 files.

Valid Invalid Ignored Fixed
19 1 68 0
Click to see the invalid file list
  • .github/workflows/allure_report.yaml
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

.github/workflows/allure_report.yaml Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 96 files.

Valid Invalid Ignored Fixed
20 6 70 0
Click to see the invalid file list
  • python/cli/allure_add_default_for_missing_results/init.py
  • python/cli/allure_add_default_for_missing_results/allure_add_default_for_missing_results.py
  • python/cli/pyproject.toml
  • python/pytest_plugins/allure_pytest_collection_report/init.py
  • python/pytest_plugins/allure_pytest_collection_report/_plugin.py
  • python/pytest_plugins/allure_pytest_collection_report/pyproject.toml
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 96 files.

Valid Invalid Ignored Fixed
20 6 70 0
Click to see the invalid file list
  • python/cli/allure_add_default_for_missing_results/init.py
  • python/cli/allure_add_default_for_missing_results/allure_add_default_for_missing_results.py
  • python/cli/pyproject.toml
  • python/pytest_plugins/allure_pytest_collection_report/init.py
  • python/pytest_plugins/allure_pytest_collection_report/_plugin.py
  • python/pytest_plugins/allure_pytest_collection_report/pyproject.toml
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

@swetha1654 swetha1654 requested a review from a team as a code owner December 10, 2024 08:47
.github/workflows/allure_report.yaml Show resolved Hide resolved
.github/workflows/allure_report.yaml Outdated Show resolved Hide resolved
.github/workflows/allure_report.yaml Outdated Show resolved Hide resolved
.github/workflows/integration_test_allure.md Outdated Show resolved Hide resolved
python/cli/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

LGTM!
Minor nits :)

As of newlines, https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline i think this might help reason about why its required:D

.github/workflows/allure_report.yaml Show resolved Hide resolved
.github/workflows/allure_report.yaml Outdated Show resolved Hide resolved
.github/workflows/allure_report.yaml Outdated Show resolved Hide resolved
.github/workflows/allure_report.yaml Show resolved Hide resolved
.github/workflows/allure_report.yaml Outdated Show resolved Hide resolved
.github/workflows/integration_test_allure.md Outdated Show resolved Hide resolved
.github/workflows/integration_test_allure.md Outdated Show resolved Hide resolved
.github/workflows/integration_test_run.yaml Show resolved Hide resolved
python/cli/README.md Outdated Show resolved Hide resolved
Copy link

@erinecon erinecon left a comment

Choose a reason for hiding this comment

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

Thanks for writing this how-to guide! My review is mostly nitpicks to make the style checker happy :)

docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
docs/how-to/integration_test_allure.md Outdated Show resolved Hide resolved
Copy link
Contributor

@jdkandersson jdkandersson left a comment

Choose a reason for hiding this comment

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

Looks fine, please get a review from @weiiwang01 as the senior review in this case

@jdkandersson
Copy link
Contributor

Thank you for adding this, I think it will help us improve our tests a lot!

@swetha1654 swetha1654 merged commit 59c4212 into main Dec 11, 2024
84 checks passed
@swetha1654 swetha1654 deleted the ISD-2620-allure branch December 11, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants