microsoft / microsoft/vscode-java-test

Branch code coverage not working properly

Aperta
#1,751 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

ai-triaged bug test-reporting
Lingua principale
TypeScript
Stelle
340
Fork
173
Merge medio
1g 19h
PR unite (30g)
18

Descrizione

I recently discovered the branch code coverage and I think it would be a very useful tool, however at the moment is buggy:

Image

In the case above it tells me the branch 6 has no coverage, which is the case when the first three statements are false.

Image

Here it tells me branch 2 is not covered, which is when the statement is false.

First of all maybe the fact that the statements are divided by lines shouldn't truncate the number of branches... If I put all statements in one line it would tell me that branch 8 is not covered (when all statements are false)

But most importantly as you can see branch 8 would be the one actually covered because the 'else' statement is all green. I could give you other examples where this is evident. Essentially what I am trying to say that if one of the branches is not covered at the moment the extension just says the last branch is not covered, when in fact in the case I gave you earlier I am pretty sure branch 7 (when now.equals(orarioFineEsec) equals true) is not covered, but I wouldn't know on the info that is given here.

Guida per i contributori

Apri la 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.

Direzione di ricerca

Nel report non sono indicati alcun file sorgente, test o punto di ingresso. Inizia riproducendo la visualizzazione della branch coverage descritta negli screenshot e traccia il modo in cui i branch coperti e non coperti vengono assegnati alle istruzioni. Il lavoro è completato quando i numeri dei branch e lo stato della coverage visualizzati identificano il branch effettivamente non coperto sia nei casi multilinea sia in quelli su una sola riga.

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

Valutazione

Stack tecnologico
java, typescript
Ambito
devtools, testing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.