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

Test shouldn't perform call to backend #120

Open
JcMinarro opened this issue Jan 26, 2023 · 2 comments
Open

Test shouldn't perform call to backend #120

JcMinarro opened this issue Jan 26, 2023 · 2 comments

Comments

@JcMinarro
Copy link
Member

Currently, our tests are performing calls to our backend server and they need concrete creds/config to pass.
It is not the best approach, because if any of our tests fail, we can't be sure it is because the code we changed is breaking them, the network connection to our backend was not good, or the backend server is not working as expected just at the moment our tests are running.

To improve it we should provide some Mock Server (There are different libs that can help us like MockWebServer or WireMock) configuring the expected responses for every request our tests need to perform

@TanishqBhardwaj
Copy link

TanishqBhardwaj commented Feb 22, 2024

Hey @JcMinarro , can I pick this task?

As far as I can see we have unit tests that are calling the backend server, which I need to mock using Mockito or any other library.

Do we also have other tests than unit tests which need to be modified?

@tbarbugli
Copy link
Member

Hey @JcMinarro , can I pick this task?

As far as I can see we have unit tests that are calling the backend server, which I need to mock using Mockito or any other library.

Do we also have other tests than unit tests which need to be modified?

makes sense :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants