Skip to content

feat: TestCases with 70% coverage#430

Open
bidhan-nagarro wants to merge 17 commits into
mainfrom
feature/dagster-tests
Open

feat: TestCases with 70% coverage#430
bidhan-nagarro wants to merge 17 commits into
mainfrom
feature/dagster-tests

Conversation

@bidhan-nagarro
Copy link
Copy Markdown
Collaborator

@bidhan-nagarro bidhan-nagarro commented Feb 19, 2026

What type of PR is this?

  • test: Commits that add missing tests or correcting existing tests

Summary

What does this PR do

This PR adds unit test cases and tries 70% code coverage

how to test

  1. Trigger the Test Suite locally (or on CI/CD):

    • Open your terminal and ensure you are in the dagster directory (or the root if using task).
    • Run the complete test suite. If you are using the Taskfile, you can run:
      task test
    • Alternatively, you can run the tests directly via poetry:
      cd dagster
      poetry run pytest --cov=src --cov-report=term-missing
  2. Verify All Tests Pass:

    • Wait for pytest to finish executing the unit test cases we wrote (including Spark Session tests, Data Quality tests, and Asset tests).
    • Verification Checks:
      • The output should indicate that 100% of the newly added/fixed unit tests passed successfully.
    • Screenshot 5: Take a screenshot of the terminal output showing 100% passes and zero failures.
  3. Verify Code Coverage:

    • Review the final table printed by pytest-cov at the end of the test execution.
    • Verification Checks:
      • The TOTAL coverage percentage line at the very bottom should be over 70%, verifying that the new coverage requirements are met.
Screenshot From 2026-03-25 11-18-43

Copy link
Copy Markdown
Collaborator

@brianmusisi brianmusisi left a comment

Choose a reason for hiding this comment

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

@bidhan-nagarro, most of these tests are not actually testing any actual functionality. Everything is being mocked, and so we are not testing any actual functionality.

What we need to do test that when we perform transformations, the results we get are what we expect. For example, if we have duplicates, those should be picked up.

If we receive invlaid values, they are being handled. That's what these should do. I don't see this being done anywhere for any of the assets

@bidhan-nagarro bidhan-nagarro force-pushed the feature/dagster-tests branch from c9f24f5 to a98eb15 Compare March 19, 2026 05:41
Copy link
Copy Markdown
Collaborator

@brianmusisi brianmusisi left a comment

Choose a reason for hiding this comment

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

Fix merge conflicts and then should be fine. Do not merge, I will merge when I'm back

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.

2 participants