-
Notifications
You must be signed in to change notification settings - Fork 46
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
Use mocks for remote/integration testing #331
Comments
Hey @ascheman I have some experience with testing. I would love to contribute! Can you help me on where to start from |
Hi @RehanChalana, thanks a lot, I appreciate your offer. My idea would be to mock away external services which are used for testing (and are somewhat unstable in their availability). Hence, I would like to start a (local) mock service and run the tests against the mocked endpoints. Suitable technologies could be Wiremock, and perhaps Testcontainers? But I am happy if you see another approach. |
Thank you so much for the detailed response! To start, I am working on htmlSanityCheckcore/src/test/groovy/org/aim42/htmlsanitycheck/check/BrokenHttpLinksCheckerSpec.groovy I’m trying to use WireMock as you mentioned, but I’ve encountered an issue since its latest version requires Java 11 or higher. I’m still figuring it out but its fun! |
Are you on (the Hacktoberfest) Discord? You can reach out to me (gerdaschemann) so we could have a chat about the problems you encounter (or if you need any other support). I am also happy if you will contribute to the development documentation of the project if you manage to solve your issues. A second PR wrt. to docs could increase your Hacktoberfest score. |
Yes i am on discord! as well as participating in hacktoberfest! I sent you a friend request on discord as well. my username is rc__22. Thanks ! |
…mHostNameResolver - fixes aim42#331 - Updated all URLs in test cases to use WireMock with Testcontainers. - Integrated CustomHostNameResolver to ensure tests run without internet. - Updated `mappings.json` with mappings for all test URLs. - Remove test for recognizing internet connectivity.
- Added WireMockContainer to BrokenHttpLinksCheckerSpec for mocking HTTP responses. - progress towards fixing aim42#331 - Configured WireMock to use mappings.json for predefined request-response mappings.
…ests - progress towards fixing aim42#331
…stnames - progress towards fixing aim42#331
…mHostNameResolver - fixes aim42#331 - Updated all URLs in test cases to use WireMock with Testcontainers. - Integrated CustomHostNameResolver to ensure tests run without internet. - Updated `mappings.json` with mappings for all test URLs. - Remove test for recognizing internet connectivity.
- Added WireMockContainer to BrokenHttpLinksCheckerSpec for mocking HTTP responses. - progress towards fixing aim42#331 - Configured WireMock to use mappings.json for predefined request-response mappings.
…ests - progress towards fixing aim42#331
…stnames - progress towards fixing aim42#331
…mHostNameResolver - fixes aim42#331 - Updated all URLs in test cases to use WireMock with Testcontainers. - Integrated CustomHostNameResolver to ensure tests run without internet. - Updated `mappings.json` with mappings for all test URLs. - Remove test for recognizing internet connectivity.
As developer of HSC I would like to use a mock service to test for misc. external resources as the real resources are sometimes not stable which leads to frequent flaky errors and unstable builds.
The text was updated successfully, but these errors were encountered: