-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress Behind Bluecoat Proxy #939
Comments
If cypress can't connect to CDN to lazy download some source code, how it works for you in dev mode ? There is something i cannot get here. If cypress can't reach So the issue is in your build not in cypress. You should have a build where everything is local. You should define more accuratly which test type you want to achieve. What is your context ? Is it local dev test ? CI test ? Something else ? |
It works fine locally because chrome, Firefox and IE all ask for proxy
credentials when we access the internet.
What I would like to see in Cypress is support for corporate proxies so
that we can use Cypress to test our application as it would work in
deployment. Our application is going to be public facing, and proxies will
not affect CDNs if those people can reach our page in the first place.
Just a note, I can use http_proxy and https_proxy environment variables for
my proxy and credentials. When those variables are set though, Cypress
fails to connect to localhost. I tried setting the variable NO_PROXY, but
Cypress still couldn't connect to localhost.
…On Nov 21, 2017 5:50 AM, "marlou" ***@***.***> wrote:
If cypress can't connect to CDN to lazy download some source code, how it
works for you in dev mode ?
There is something i cannot get here. If cypress can't reach
cdn.domain.tld you can't reach it either when running your app locally.
So the issue is in your build not in cypress. You should have a build
where everything is local.
You should define more accuratly which test type you want to achieve. What
is your context ? Is it local dev test ? CI test ? Something else ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#939 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA1qOxaiMZHRZXgc9MGzYhhARujbjJRLks5s4qr7gaJpZM4Qk5nE>
.
|
Hmm if using Chrome browser works by itself, try running Cypress not in its built electron browser, but using chrome ?
…Sent from my iPhone
On Nov 21, 2017, at 08:38, Christopher Charron ***@***.***> wrote:
It works fine locally because chrome, Firefox and IE all ask for proxy
credentials when we access the internet.
What I would like to see in Cypress is support for corporate proxies so
that we can use Cypress to test our application as it would work in
deployment. Our application is going to be public facing, and proxies will
not affect CDNs if those people can reach our page in the first place.
Just a note, I can use http_proxy and https_proxy environment variables for
my proxy and credentials. When those variables are set though, Cypress
fails to connect to localhost. I tried setting the variable NO_PROXY, but
Cypress still couldn't connect to localhost.
On Nov 21, 2017 5:50 AM, "marlou" ***@***.***> wrote:
> If cypress can't connect to CDN to lazy download some source code, how it
> works for you in dev mode ?
>
> There is something i cannot get here. If cypress can't reach
> cdn.domain.tld you can't reach it either when running your app locally.
>
> So the issue is in your build not in cypress. You should have a build
> where everything is local.
>
> You should define more accuratly which test type you want to achieve. What
> is your context ? Is it local dev test ? CI test ? Something else ?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#939 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AA1qOxaiMZHRZXgc9MGzYhhARujbjJRLks5s4qr7gaJpZM4Qk5nE>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I have. In Chrome + Cypress, I can get the app to load (only if http_proxy
and https_proxy are unset), but the CDNs won't load. I do not get a
credentials popup like I normally do. I assume this because this instance
of chrome is set to use Cypress as the proxy instead of the corporate
proxy, and Cypress does not request credentials.
…On Nov 21, 2017 8:46 AM, "Gleb Bahmutov" ***@***.***> wrote:
Hmm if using Chrome browser works by itself, try running Cypress not in
its built electron browser, but using chrome ?
Sent from my iPhone
> On Nov 21, 2017, at 08:38, Christopher Charron ***@***.***>
wrote:
>
> It works fine locally because chrome, Firefox and IE all ask for proxy
> credentials when we access the internet.
>
> What I would like to see in Cypress is support for corporate proxies so
> that we can use Cypress to test our application as it would work in
> deployment. Our application is going to be public facing, and proxies
will
> not affect CDNs if those people can reach our page in the first place.
>
> Just a note, I can use http_proxy and https_proxy environment variables
for
> my proxy and credentials. When those variables are set though, Cypress
> fails to connect to localhost. I tried setting the variable NO_PROXY, but
> Cypress still couldn't connect to localhost.
>
> On Nov 21, 2017 5:50 AM, "marlou" ***@***.***> wrote:
>
> > If cypress can't connect to CDN to lazy download some source code, how
it
> > works for you in dev mode ?
> >
> > There is something i cannot get here. If cypress can't reach
> > cdn.domain.tld you can't reach it either when running your app locally.
> >
> > So the issue is in your build not in cypress. You should have a build
> > where everything is local.
> >
> > You should define more accuratly which test type you want to achieve.
What
> > is your context ? Is it local dev test ? CI test ? Something else ?
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub
> > <#939#
issuecomment-345989470>,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/
AA1qOxaiMZHRZXgc9MGzYhhARujbjJRLks5s4qr7gaJpZM4Qk5nE>
> > .
> >
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#939 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA1qO8VIzlnprT3ri5Yq7V03-sKYxBmHks5s4tRHgaJpZM4Qk5nE>
.
|
You should definitely have a purely local build version to run the tests against. Relying on external service makes your tests unstables (the cypress team loves the term "flaky"). Anytime a problem will occur at your cdn provider or at a network level your tests will fail. They should not. IMHO your best bet is to try mocking your CDN provider with Check the part named "Change the default whitelisting" from the You will be able to remove :
And you can try this right now without changing your build. |
I am using Cypress to test against another product called Web AppBuilder from Esri (It generates web mapping applications). Because of this dependency it wants/needs to download assets from a CDN to get the ArcGIS JavaScript API. Behind a corporate proxy I am unable to load the application as it fails trying to request the resources. On an outside network it is fine. So, the idea that e2e testing could not use CDN code in unrealistic. If I cannot connect to the ArcGIS API the application wont work anyway. Clearly if everything is local it is better and I am not arguing that, I am just saying that sometimes you need to connect to CDN resources. Anyway, I have the same issues. If we go to Esri's web site: https://developers.arcgis.com/web-appbuilder/ We can grab a public facing sample: My test file describe('My First Test', function() {
//Works
it('Visits the Kitchen Sink', function() {
cy.visit('https://example.cypress.io')
})
//fails
it('Visits the jsapi site', function() {
cy.visit('http://gis.calhouncounty.org/ParcelViewer3.1/')
})
}) I am not 100% if that site should work but I get the same behavior with my local apps running on localhost. Hopefully this is somewhat helpful... This is on Windows 7, latest (LTS) version of Node. |
+many on the NO_PROXY setting... it should work, but cypress ignores it :( |
Can ya'll try to set |
I have been looking around the various proxy related issues, and experimented alot. I want to report I am also behind a BlueCoat proxy, I have |
The code for this is done in cypress-io/cypress#3531, but has yet to be released. |
Released in |
Is this a Feature or Bug?
Feature
Current behavior:
Our application pulls from CDNs for additional CSS libraries. (semantic, react-md, font-awesome), but when running the tests, it cannot connect through the corporate (BlueCoat) proxy leading to missing styles, functionality and slow page loads (it waits for the connections to timeout).
Desired behavior:
Add the ability to enter proxy credentials in some way. Perhaps add proxy credentials to the configuration options?
The text was updated successfully, but these errors were encountered: