Please let us skip backend tests for this

Aperta
#556 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
testing

Direzione di ricerca

Inizia leggendo support.js alle righe 158-208, prestando particolare attenzione al controllo backendCodeCoverage e al suo utilizzo di baseUrl e proxyUrl. Ricostruisci il percorso con cui la configurazione di supporto di Cypress arriva a questo codice e individua i test di coverage esistenti. Il lavoro è completato quando gli utenti possono saltare la raccolta della coverage del backend senza disabilitare gli altri comportamenti di coverage.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
440
Fork
114
Merge medio
42m
PR unite (30g)
19

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cypress-io/code-coverage

Tutte le issue di cypress-io/code-coverage

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.