Search code examples
rubycode-coveragesimplecovshippable-ci

What is sequence coverage?


I am using simplecov for code coverage. I have no idea what sequence coverage is. I Googled it but I could not find anything, although I did find information about Branch Coverage.

Here is what I see in Shippable CI: enter image description here


Solution

  • The term "Sequence coverage" comes from Shippable CI, not simplecov.

    From Shippable's API documentation we can find this:

    branchCoveragePercent The percentage of branches (if/then/else condtions) that are covered by tests

    sequenceCoveragePercent Percentage of lines there are code coverage for

    So branch coverage counts all your code branching such as:

    if a==b
      do stuff            # branch 1
    else
      do other stuff      # branch 2
    end
    

    Now if your test suite only tests when a==b, your branch coverage for this file is 50%.

    Sequence coverage is the regular line by line coverage report, if your code has 100 lines and during the tests only 70% of the lines have been run, your sequence coverage is 70%.