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

Add the "Decouple the back-end and front-end test through Contract Testing" chapter #40

Closed
wants to merge 1 commit into from

Conversation

NoriSte
Copy link
Owner

@NoriSte NoriSte commented Mar 29, 2023

Bring @NoriSte's article to the repo.


### One Paragraph Explainer

E2E tests do not scale well for hig applications, with thousands of user flows. Things get even worse if the UI E2E tests are used to test the server too because the result is hundred of slow and coupled tests. In Hasura, an internal working group proposed to decouple the back-end and front-end tests.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "hig applications"


I (a Front-end engineer, keep it in mind) recently championed an initiative aimed at reducing Hasura's CI pipeline duration and the dependence on not-scaling-well E2E tests.

The problem is that **the Server team defensively uses the Hasura Console's** (the main UI of the company) **E2E tests** to check for regressions. If the Console works as expected, the Server works as expected as a by-product.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol... so why don't they have api e2e tests?

Copy link
Collaborator

@muratkeremozcan muratkeremozcan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully get the layman's takeaway from this article.

At a high level, this sounds like we are running some e2e tests, they are recroding fixtures (which in this context are called contracts), and future tests are made into UI-integration tests. Is this correct?

E2e recording to fixutres is a decent idea. Where can someone not in Hasura find out more about doing something similar?

How about alternatives? Why doesn't the company use API e2e tests, instead of UI e2e, or UI integration?

Have you considered Pact? What did you find out, why isn't it a good fit?

I kind of wish to see this kind of analysis at the end, and recommendation for a layman to take some ideas away. Otherwise it's a good story, but does not help the reader as much as I wish it did.

Copy link
Collaborator

@muratkeremozcan muratkeremozcan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dupe

Base automatically changed from from-unreadable-tests-to-simple-ones to master March 31, 2023 15:29
@NoriSte
Copy link
Owner Author

NoriSte commented Jun 10, 2023

I don't fully get the layman's takeaway from this article.

At a high level, this sounds like we are running some e2e tests, they are recroding fixtures (which in this context are called contracts), and future tests are made into UI-integration tests. Is this correct?

E2e recording to fixutres is a decent idea. Where can someone not in Hasura find out more about doing something similar?

How about alternatives? Why doesn't the company use API e2e tests, instead of UI e2e, or UI integration?

Have you considered Pact? What did you find out, why isn't it a good fit?

I kind of wish to see this kind of analysis at the end, and recommendation for a layman to take some ideas away. Otherwise it's a good story, but does not help the reader as much as I wish it did.

I agree, let me close this PR and come back on this topic in the future with more examples and suggestions, if any 😊

@NoriSte NoriSte closed this Jun 10, 2023
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.

None yet

2 participants