code-coverage icon indicating copy to clipboard operation
code-coverage copied to clipboard

Please let us skip backend tests for this

Open nanomosfet opened this issue 3 years ago • 0 comments

I am really frustrated that backendCodeCoverage is running

https://github.com/cypress-io/code-coverage/blob/master/support.js#L158-L208

and its failing my test with the error

CypressError: `cy.request()` failed trying to load:

http://localhost:34212/__coverage__

We attempted to make an http request to this URL but the request failed without a response.

We received this error at the network level:

  > Error: socket hang up

-----------------------------------------------------------

The request we sent was:

Method: GET
URL: http://localhost:34212/__coverage__

-----------------------------------------------------------

Common situations why this would fail:
  - you don't have internet access
  - you forgot to run / boot your web server
  - your web server isn't accessible
  - you have weird network configuration settings on your computer

Because this error occurred during a `after all` hook we are skipping all of the remaining tests.
    at https://tim-dev-at-intuit-e2e.app.intuit.com/__cypress/runner/cypress_runner.js:157368:78
From previous event:
    at Context.request (https://tim-dev-at-intuit-e2e.app.intuit.com/__cypress/runner/cypress_runner.js:157365:15)
From Your Spec Code:
    at Context.collectBackendCoverage (https://tim-dev-at-intuit-e2e.app.intuit.com/__cypress/tests?p=cypress/support/index.js:410:10)

From Node.js Internals:
  RequestError: Error: socket hang up
      at new RequestError (/Users//Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/request-promise-core/lib/errors.js:14:15)
      at Request.plumbing.callback (/Users//Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/request-promise-core/lib/plumbing.js:87:29)
      at Request.RP$callback [as _callback] (/Users//Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/request-promise-core/lib/plumbing.js:46:31)
      at self.callback (/Users//Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/request/request.js:183:22)
      at Request.emit (events.js:376:20)
      at Request.onRequestError (/Users//Library/Caches/Cypress/8.7.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/request/request.js:869:8)
      at ClientRequest.emit (events.js:388:22)
      at Socket.socketOnEnd (_http_client.js:499:9)
      at Socket.emit (events.js:388:22)
      at endReadableNT (internal/streams/readable.js:1336:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

Describe the solution you'd like A clear and concise description of what you want to happen.

let me skip this part because i am not trying to collect backend test coverage but by your check that baseUrl and proxyUrl this part of your code thinks i am...

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. so far i have just edited the file directly and turned off those lines by just hard coding a false. right now i am looking at ways to set proxyUrl but there doesnt seem to be an easy way to do that. Additional context Add any other context or screenshots about the feature request here.

nanomosfet avatar Mar 24 '22 22:03 nanomosfet