Implement end-to-end testing. by ehmatthes · Pull Request #92 · initialcommit-com/git-sim · GitHub
Skip to content

Implement end-to-end testing.#92

Merged
initialcommit-io merged 3 commits intoinitialcommit-com:devfrom
ehmatthes:start_e2e_testing
Jun 16, 2023
Merged

Implement end-to-end testing.#92
initialcommit-io merged 3 commits intoinitialcommit-com:devfrom
ehmatthes:start_e2e_testing

Conversation

@ehmatthes
Copy link
Copy Markdown
Contributor

As discussed in #55, implements a small set of end-to-end tests.

  • To run tests, you'll need to run pip install pytest if you don't already have it available.
  • I've run the tests on macOS and Windows. I believe they should run on most Linux systems, but have not checked that yet.
  • The image files that are generated on Windows are significantly different (pixel-wise) than what's generated on macOS. This looks like a font-rendering difference. To address this, there are Windows-specific reference files in the test resources.
  • I don't know if this is a Windows-specific issue, or something particular to my Windows setup. We may end up needing to have a small variety of reference images, and only fail a test if none of the reference images match.
  • Includes brief documentation about running tests, and adding new tests.
  • You can make tests fail by adding a call to run_git_reset(tmp_repo) in any of the test functions. This is helpful for seeing what test failures look like, and to make sure the image comparison function can actually fail appropriately.
  • The test functions are written so that every test function contains the raw command that we would expect users to run, such as git-sim log. A helper function then inserts the global options needed to make the tests work.

Eric Matthes added 3 commits June 13, 2023 20:48
Signed-off-by: Eric Matthes <eric@Erics-Mac-Studio.local>
Signed-off-by: Eric Matthes <eric@Erics-Mac-Studio.local>
Signed-off-by: Eric Matthes <eric@Erics-Mac-Studio.local>
@ehmatthes
Copy link
Copy Markdown
Contributor Author

@initialcommit-io initialcommit-io merged commit 0a9b2d3 into initialcommit-com:dev Jun 16, 2023
@ehmatthes ehmatthes mentioned this pull request Jun 16, 2023
8 tasks
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