fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

perf(`@fluentui/e2e`): slow cypress tests execution

Open Hotell opened this issue 3 years ago • 10 comments

Describe the issue:

It turns out that executing yarn workspace @fluentui/e2e test takes significant time to run time from our PR CI pipeline exectuion duration (in avg 33% when affected).

Technical details:

  • cypress is used to execute those tests

We should investigate why is that happening and improve execution performance.

Actual behavior:

On my local machine (M1) the whole test case suite takes almost 10 minutes Finished 'test' after 9.27 min

Expected behavior:

e2e tests execution time should be improved

Hotell avatar Aug 22 '22 12:08 Hotell

did some initial investigation:

test task consist of following phases:

  1. bundling (webpack)
  2. starting express server that serves build assets
  3. cypress run

bundling (Webpack)

time duration: approx 30 seconds.

  • tried to use esbuild-loader instead babel-loader ( non observable effect )
  • the main slow-down is typescript which is invoked via ForkTsCheckerWebpackPlugin. By removing type checking from build process the compilation improved by 40% !
    • actionable: move type-checking to separate pipeline (type-check task)

starting express server that serves build assets

Fast. no actionable needed.

cypress run

time duration: approx 8 minutes.

Extremely slow 🚨

  • tried to use esbuild (https://github.com/bahmutov/cypress-esbuild-preprocessor) for spec compilation, which is a no go (failed) as spec files are using __filename and other nodejs globs that are not supported by esbuild

Hotell avatar Aug 22 '22 15:08 Hotell

update:

turns out we are on cypress version that doesn't support native M1 https://github.com/microsoft/fluentui/pull/24462

Hotell avatar Aug 23 '22 09:08 Hotell

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

msft-fluent-ui-bot avatar Jan 20 '23 10:01 msft-fluent-ui-bot

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

msft-fluent-ui-bot avatar Jun 22 '23 13:06 msft-fluent-ui-bot

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

as v0 is in maintenance mode, this will be probably closed as wont fix as v0 will be branched to follow our LTS policy

Hotell avatar May 20 '24 09:05 Hotell

This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. Still require assistance? Please add comment - "keep open".

This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. Still require assistance? Please add comment - "keep open".

This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. Still require assistance? Please add comment - "keep open".