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

Make testing easier and unified #504

Open
The-Huginn opened this issue Aug 16, 2023 · 0 comments
Open

Make testing easier and unified #504

The-Huginn opened this issue Aug 16, 2023 · 0 comments

Comments

@The-Huginn
Copy link

The-Huginn commented Aug 16, 2023

I would like to discuss an easier way to test github apps. I can see other github bots trying to do the same and test their applications with slightly different approaches. It would be best to unify this process.

There could be 2 main areas to improve on this.

  1. Create JSON processors for most common events such as Pull Request. It will make tests more readable and configurable without the need of having many slightly different *.json payloads with Pull Requests.
  2. Create easier mocking for most common cases and events (similarly to first point)

Example of JSON processor in our repo

Example of mocking builder (In case the PR was updated please use this link and find file MockedGHPullRequestProcessor). Builder and usage

We would need to find a trade-off between mocking too much and covering just the basics. Also we could provide mocking for classes not extending GHObject as they are not able to use GitHubMockContext#ghObject mocking method such as GHPullRequestCommitDetail.

Quick links to quarkus and hibernate bots

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