Skip to content

Comments

Add E2E test#54

Open
jovnc wants to merge 13 commits intogit-mastery:mainfrom
jovnc:feat/e2e
Open

Add E2E test#54
jovnc wants to merge 13 commits intogit-mastery:mainfrom
jovnc:feat/e2e

Conversation

@jovnc
Copy link
Collaborator

@jovnc jovnc commented Feb 16, 2026

Fixes git-mastery/git-mastery#65

As per RFC: https://docs.google.com/document/d/101Qh5SiW-MZGy3DH0lLvn2lqRutxkTKbx01A8dNyI6o/edit?tab=t.0#heading=h.x8t43doyrgeb

Requires merging into main branch first before tests can run.

Things to do before merge:

  1. create e2e-test environment
  2. add GH_PAT as environment secret and repository secret (requires duplicate steps unfortunately)

Copy link
Contributor

@SAN-MUYUN SAN-MUYUN left a comment

Choose a reason for hiding this comment

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

Thank you for your hard work to set this up! I think this is a good starting point for implementing E2E tests.
For the .sh and .yml files, they seem fine to me. Would be better to let @VikramGoyal23 or someone who knows github CI better to look through it as well.
Generally LGTM!

"""Test that progress reset works correctly after verify has run."""
exercise_dir = exercises_dir / EXERCISE_NAME
res = runner.run(["progress", "reset"], cwd=exercise_dir)
# TODO: verify that the progress has actually been reset
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that it is fine for us to leave this for now. Are we going to implement E2E test for reset for all/most of the exercises? Some exercises are easier to reset, while some are more prone to regressions.
Then, if we want to test this behavior for all exercises, we will need to do test_download for all the exercises.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We shouldn't test the behaviour of the reset command for individual exercises. E2E testing is not meant to catch all bugs, as they're expensive to run and we can't possibly test every possibility. They're mainly there to verify the basic behaviour of the command, to ensure no significant regressions are introduced.

["progress", "sync", "off"], cwd=exercises_dir, stdin_text="y\n"
)
res_off.assert_success()
res_off.assert_stdout_contains("Successfully removed your remote sync")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not very sure if it is necessary here, but would it be better to check that /progress folder is still present?

Copy link
Collaborator Author

@jovnc jovnc Feb 20, 2026

Choose a reason for hiding this comment

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

For a start, I'll test the command output, but we can refactor in the future to test more in depth, just need to verify that this works properly first before introducing more thorough tests.

Copy link
Contributor

@VikramGoyal23 VikramGoyal23 left a comment

Choose a reason for hiding this comment

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

The tests and workflow all LGTM, I agree with @SAN-MUYUN on the points raised, I only have a few questions about the tests for check.

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.

Introducing E2E testing for the app

3 participants