You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improvement: Add unit tests for cr_checker using pytest and Bazel #177
The cr_checker tool currently lacks unit tests, which compromises its reliability and increases the risk of regressions during updates. Unit testing is essential for validating functionality, identifying issues early, and maintaining a stable tool. Additionally, integrating pytest with the Bazel build system aligns with our existing workflows and ensures consistent test execution across environments.
Objectives
Write comprehensive unit tests for cr_checker using pytest to achieve robust coverage.
Integrate pytest into the Bazel build system to standardize testing and enable automation in CI/CD workflows.
Acceptance Criteria
A suite of unit tests is implemented for cr_checker, covering critical functionality and edge cases.
pytest is successfully integrated with Bazel, allowing tests to run seamlessly through Bazel commands.
Tests are runnable both locally and in the CI pipeline without additional manual steps.
Documentation is provided for running and maintaining the tests.
Proposed Steps
Analyze Tool Functionality:
Review the codebase of cr_checker to identify the key components and their functionalities.
Outline critical paths and edge cases that require testing.
Develop Unit Tests:
Use pytest to write tests for individual functions and modules.
Ensure high test coverage by addressing all major use cases and failure scenarios.
Integrate Pytest with Bazel:
Create or modify Bazel rules to include pytest-based testing.
Ensure pytest is correctly configured to work within the Bazel environment.
Verify and Validate:
Run tests locally via Bazel to confirm they execute successfully.
Integrate the tests into the CI pipeline and verify the workflow.
Document the Process:
Provide clear instructions for running the tests with Bazel.
Include guidelines for writing and adding new tests in the future.
In aspect of integrating pytest in Bazel as framework, yes, but we need to write pytests for the tool and make sure they are tested with Bazel both locally and on CI.
I see there is already PR providing framework, so we will wait until the PR is not merged.
Activity
AlexanderLanin commentedon Jan 17, 2025
Note for 3.: this seems to overlap with #159
nradakovic commentedon Jan 17, 2025
In aspect of integrating pytest in Bazel as framework, yes, but we need to write pytests for the tool and make sure they are tested with Bazel both locally and on CI.
I see there is already PR providing framework, so we will wait until the PR is not merged.
AlexanderLanin commentedon Apr 28, 2025
The same is true for every single tool we have. I'll close this for now.