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

Research, Select, & Implement E2E Testing Framework #689

Closed
tn3rb opened this issue Jan 29, 2021 · 9 comments
Closed

Research, Select, & Implement E2E Testing Framework #689

tn3rb opened this issue Jan 29, 2021 · 9 comments
Assignees
Labels
C: automation & deployment ⚙️ category D: Packages 📦 domain: Barista Packages P3: med priority 😐 priority: medium S1: new 👶🏻 status T: deprecated ⚠️ type: DEP - soon-to-be removed features

Comments

@tn3rb
Copy link
Member

tn3rb commented Jan 29, 2021

A critically important aspect of our goal of achieving a fully automated CI/CD pipeline from development to final production product, is having automated End to End (E2E) testing in place to protect against unintended changes and breakage.

steps

  • research available E2E frameworks and document their features, functionality, costs, etc, essentially understand their various pros and cons. Discussion can be done within this issue.

  • select framework based on above discussion

  • execute changes via multiple PRs in a granular fashion

  • implement E2E testing which will involve the following:

    • cutting FET/e2e-tests branch from master

    • creating any service accounts required by e2e framework

    • installing dependencies for e2e framework

    • initial configuration, etc

    • test creation (ongoing process)

  • integrate automated testing and automatic deployment into CI/CD pipeline, which involves:

    • creating a new branch named something like production or deploy cut from master

    • editing of GitHub Actions (GHA) pertaining to Chromatic (StoryBook) so that they only run upon pushes to the production / deploy branch

    • creation of new GHA for running the new E2E tests upon pushes to the production / deploy branch

    • creation of new GHA for automatically rebasing production / deploy branch on to master when ALL tests pass

So the new development process will look something like this:

ScreenShot_20210129123219

@tn3rb tn3rb created this issue from a note in Barista EDTR (To do) Jan 29, 2021
@tn3rb tn3rb added C: automation & deployment ⚙️ category D: Packages 📦 domain: Barista Packages P3: med priority 😐 priority: medium S1: new 👶🏻 status T: deprecated ⚠️ type: DEP - soon-to-be removed features labels Jan 29, 2021
@nicolad
Copy link
Contributor

nicolad commented Jan 29, 2021

GB-related context:

@nicolad nicolad moved this from To do to In progress in Barista EDTR Jan 29, 2021
@tn3rb
Copy link
Member Author

tn3rb commented Jan 29, 2021

how coupled are those utilities to the WP core redux stores and would we still be able to utilize them if they are heavily coupled?

@nicolad
Copy link
Contributor

nicolad commented Feb 1, 2021

how coupled are those utilities to the WP core redux stores and would we still be able to utilize them if they are heavily coupled?

yes, in e2e-test-utils there is a bit of usage of core dispatchers:

image

@nicolad
Copy link
Contributor

nicolad commented Feb 1, 2021

@nicolad
Copy link
Contributor

nicolad commented Feb 1, 2021

these are the main competitors:

image

@nicolad
Copy link
Contributor

nicolad commented Feb 2, 2021

interesting related info, today Garth had reported an issue specific to safari only which is happening on his Mac,
I've noticed that it's possible to run e2e tests on macos-latest in playwright GH action

image

@nicolad
Copy link
Contributor

nicolad commented Feb 3, 2021

Auto-waiting feature is one of the main differences between playwright and puppeteer: https://playwright.dev/docs/actionability/
which makes these type of checks not necessary: https://github.com/WordPress/gutenberg/blob/master/packages/e2e-test-utils/src/install-plugin.js#L23

@tn3rb tn3rb added this to To do in Barista CI/CD Pipeline via automation Feb 3, 2021
@tn3rb tn3rb removed this from In progress in Barista EDTR Feb 3, 2021
@tn3rb tn3rb moved this from To do to In progress in Barista CI/CD Pipeline Feb 3, 2021
@nicolad
Copy link
Contributor

nicolad commented Feb 3, 2021

pupetteer and playwright execution time is almost the same:

image

from https://blog.checklyhq.com/cypress-vs-selenium-vs-playwright-vs-puppeteer-speed-comparison/#conclusion

@nicolad
Copy link
Contributor

nicolad commented Feb 3, 2021

another interesting aspect I found about playwright is that it has support for android emulation and other flavors:

image


this will be important when we will start using react native

Barista CI/CD Pipeline automation moved this from Done to In progress Feb 12, 2021
@nicolad nicolad closed this as completed Mar 16, 2021
Barista CI/CD Pipeline automation moved this from In progress to Done Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: automation & deployment ⚙️ category D: Packages 📦 domain: Barista Packages P3: med priority 😐 priority: medium S1: new 👶🏻 status T: deprecated ⚠️ type: DEP - soon-to-be removed features
Development

No branches or pull requests

3 participants