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

Add python unit tests coverage to github actions #23558

Closed
4 tasks done
GGP1 opened this issue May 22, 2024 · 3 comments · Fixed by #23585 or wazuh/qa-integration-framework#168
Closed
4 tasks done

Add python unit tests coverage to github actions #23558

GGP1 opened this issue May 22, 2024 · 3 comments · Fixed by #23585 or wazuh/qa-integration-framework#168
Assignees
Labels

Comments

@GGP1
Copy link
Member

GGP1 commented May 22, 2024

Description

As part of every release testing, we are calculating the python unit tests coverage manually by executing one of our internal scripts. This has caused us some issues as the results rely on the environment where they are executed, resulting in different coverages depending on who did the tests.

To avoid this and to automate the process, we could edit our existing unit tests (adding --cov to the tests command) and have this information in our workflow.

Checks

The following elements have been updated or reviewed (should also be checked if no modification is required):

  • Tests (unit tests, API integration tests).
  • Changelog.
  • Documentation.
  • Integration test mapping (using api/test/integration/mapping/_test_mapping.py).
@GGP1
Copy link
Member Author

GGP1 commented May 23, 2024

Update

Added the pytest_coverage internal script to the QA integration framework and created a github action to obtain python unit tests coverage on demand.

@Selutario
Copy link
Contributor

Reopening since it was automatically closed after merging wazuh/qa-integration-framework#168

@Selutario Selutario reopened this May 27, 2024
@GGP1
Copy link
Member Author

GGP1 commented May 28, 2024

Update

Added coverage reporting in the existing Python unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
2 participants