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

Golden testing for some requests #11

Open
chelmertz opened this issue Dec 22, 2023 · 2 comments
Open

Golden testing for some requests #11

chelmertz opened this issue Dec 22, 2023 · 2 comments

Comments

@chelmertz
Copy link
Owner

chelmertz commented Dec 22, 2023

The logic is getting a bit hairy to properly handle giving out points/dealing with comments etc., trying to keep it all in one's head.

Maybe use json tags for the specific fields we need to shred.

@chelmertz
Copy link
Owner Author

chelmertz commented Aug 6, 2024

A good flow, for point related bugs, could be:

  • There's a PR shown in the GUI that is either above 0 points but uninteresting, or it has negative points, but is interesting
  • Click somewhere in the GUI to turn that part of the graphql response into a test
    • When I develop, I start the elly process in the foreground. Maybe only render this button (and only listen to a specific endpoint) when a -golden flag is provided
  • Either turn the response into a unit test
    • "Zoom in" by changing the expected outcome
  • Or, prepared with a fuzzying boilerplate setup, seeded with example data from the graphql response
    • Having properties (mixin PBT and fuzzying here) is the end goal. Based on re-reading the existing fuzzy-tests, it might be hard to create a relevant test based on a single bad PR point assignment.
    • Let's start with unit tests.

chelmertz added a commit that referenced this issue Aug 6, 2024
Specifically: golden testing for points, #11
@chelmertz
Copy link
Owner Author

Need to either:

  • Persist the raw (or deserialized) version of a PR, so that we can use it for tests
    • Wasteful and possibly impacting the storage layer 👎
  • Or: hit the Github API again, either using the big graphql query or a custom smaller one, for less impact
    • Using the real one diverges as little as possible 👍

@chelmertz chelmertz self-assigned this Aug 6, 2024
@chelmertz chelmertz removed their assignment Sep 19, 2024
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

No branches or pull requests

1 participant