Coder Social home page Coder Social logo

Comments (19)

srawlins avatar srawlins commented on June 9, 2024 15

Big +1

from coverage.

JZ-at-TP avatar JZ-at-TP commented on June 9, 2024 14

+1 from 2019

from coverage.

liamappelbe avatar liamappelbe commented on June 9, 2024 13

Update: Function coverage is implemented, and I'm working on branch coverage at the moment.

from coverage.

felangel avatar felangel commented on June 9, 2024 9

+1 from 2020

from coverage.

micaelcid avatar micaelcid commented on June 9, 2024 8

+1 from 2021

from coverage.

liamappelbe avatar liamappelbe commented on June 9, 2024 7

Update: I have an implementation of branch coverage sitting in a PR, but branch coverage required some VM work and a new service API, so the PR is blocked on the service API updating to v8.2.0. Eta is a few weeks.

from coverage.

nirwannursabda avatar nirwannursabda commented on June 9, 2024 5

any update for Function coverage?
we already in the end of 2019 :)

from coverage.

cmc5788 avatar cmc5788 commented on June 9, 2024 5

It sounds like there's two separate requests here, both involving coarsening the coverage data to make it easier to read. I looked into the feasibility of supporting this in the VM (not for the web).

  1. Function level. This is easy enough, because the VM service API can already give us code ranges for every function. We can coarsen the coverage data using these ranges. I will start work on this soon.
  2. Branch/block level. This is much harder. There's no way of getting code ranges for blocks ATM. We could potentially add a new RPC to the API, but this would be quite a lot of work.

How important is the branch/block level info? Would function level info be sufficient for your needs?

My personal feeling is that with line level on one end and function level on the other, it would cover a good span.

branch would certainly be nice to have in the long-run, but the effort to value ratio seems like it would favor getting function coverage sooner.

from coverage.

a-siva avatar a-siva commented on June 9, 2024 5

bumping priority as it appears to be an issue for customers

from coverage.

IchordeDionysos avatar IchordeDionysos commented on June 9, 2024 4

I would prefer branch coverage as it gives you way more information/metadata on what is actually covered than line and especially function coverage can give you!

I am really not sure what useful metric function coverage would give you?!

With Branch coverage, you can make informed decisions on how much of your if/else, switch/case, ... statements are covered and make sure that nobody accidentally missed an else statement, as it would be reflected in your coverage report that this else was not covered!

from coverage.

Eghosa-Osayande avatar Eghosa-Osayande commented on June 9, 2024 1

+1 from 2022

from coverage.

depimomo avatar depimomo commented on June 9, 2024 1

+1 from 2022

from coverage.

acoutts avatar acoutts commented on June 9, 2024

Would love to see this implemented as well! Looks like still there is no function coverage.
Screen Shot 2020-04-18 at 10 40 37 AM

from coverage.

a-siva avatar a-siva commented on June 9, 2024

/cc @liamappelbe

from coverage.

liamappelbe avatar liamappelbe commented on June 9, 2024

It sounds like there's two separate requests here, both involving coarsening the coverage data to make it easier to read. I looked into the feasibility of supporting this in the VM (not for the web).

  1. Function level. This is easy enough, because the VM service API can already give us code ranges for every function. We can coarsen the coverage data using these ranges. I will start work on this soon.
  2. Branch/block level. This is much harder. There's no way of getting code ranges for blocks ATM. We could potentially add a new RPC to the API, but this would be quite a lot of work.

How important is the branch/block level info? Would function level info be sufficient for your needs?

from coverage.

cmc5788 avatar cmc5788 commented on June 9, 2024

To follow up a bit on my comment from last March;

branch would certainly be nice to have in the long-run, but the effort to value ratio seems like it would favor getting function coverage sooner.

My definition of "long-run" has changed a bit since due to the passage of time and more experience with the limitations of line coverage. I 100% agree with @IchordeDionysos :

With Branch coverage, you can make informed decisions on how much of your if/else, switch/case, ... statements are covered and make sure that nobody accidentally missed an else statement, as it would be reflected in your coverage report that this else was not covered!

from coverage.

amarghosh avatar amarghosh commented on June 9, 2024

Is this available in Flutter? I ran flutter test --coverage, but genhtml still complains about missing function and branch data. I am using flutter 2.8.1

from coverage.

liamappelbe avatar liamappelbe commented on June 9, 2024

@amarghosh Flutter has their own coverage implementation, so it would need to be implemented there independently. I help out with their coverage implementation, but I'm not on the flutter team, so I don't know if they want the feature or not. File a bug with them, and if they think it's a good idea I'll help add it.

from coverage.

liamappelbe avatar liamappelbe commented on June 9, 2024

Filed flutter/flutter#108313

from coverage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.