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 --auto-import-ca Option to speed up tests in Chrome #26744

Open
amenk opened this issue May 12, 2023 · 3 comments
Open

Add --auto-import-ca Option to speed up tests in Chrome #26744

amenk opened this issue May 12, 2023 · 3 comments
Labels
E2E Issue related to end-to-end testing type: feature New feature that does not currently exist

Comments

@amenk
Copy link

amenk commented May 12, 2023

What would you like?

As described in #7307, Google Chrome has severe performance issues for untrusted websites.

Why is this needed?

Cypress uses a own CA to issue certificates, so Cypress tests run slow, because now Chrome does not cache anything anymore.

Other

The certificate can be imported like this as a workaround:

Prequirements (example for Debian Linux based systems):

apt update
apt install -y libnss3-tools

Installing the CA:

yarn cypress install
touch cypress/e2e/empty.cy.js
yarn cypress run --browser chrome --spec cypress/e2e/empty.cy.js || true
certutil -A -n Cypress -t 'TCu,Cu,Tu' -i /root/.config/Cypress/cy/production/proxy/certs/ca.pem -d sql:/root/.pki/nssdb 

It has to be checked if certutil needs to be present if we put this in cypress or if there is a node dependency which can do the same.

Cypress needs to run once to generate the ca.pem, that why we currently create an empty testsuite in the workaround. If cypress installs the CA itself, of course this can be done in a cleaner way.

If certutil is required, --auto-import-ca could just print an error, that certutil needs to be installed first.

@amenk amenk changed the title Add --auto-import-ca Option Add --auto-import-ca Option to speed up tests in Chrome May 12, 2023
@nagash77 nagash77 added type: feature New feature that does not currently exist E2E Issue related to end-to-end testing labels May 15, 2023
@nagash77
Copy link
Contributor

@amenk , Thank you for submitting your feature request. Cypress Product Managers will review this request and consider it for future implementation. Please remember we cannot guarantee this will be implemented in a specific timeframe or at all. Please see the Cypress App Product Roadmap for what we currently have in the works.

@ChaseBig
Copy link

ChaseBig commented Dec 4, 2023

This issue is causing my lighthouse performance audit tests to fail and I cannot seem to figure out how to get the workaround to work on the latest Cypress version (v13.6.0). I use the cypress-audit plugin and this opens up a new tab in the cypress runner browser to execute the performance audit -- the issue is that it loads on http which doesn't allow my app to access a certain header required to load my app correctly.

Is there any update on this?

@valter11111
Copy link

valter11111 commented Apr 5, 2024

I reported this issue in 2021, it was merged with this ticket and the cache issue was reported even earlier (in 2019 - I found it from those forums)... It was closed due to "Lack of activity"...

Wouldn't it be a time to tell us the approximate time? Another 2 years or we wait till this ticket is also "lack of activity" and then merge with someone else who "recently" reported it and make it seem like its "just new"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

4 participants