What is sequence coverage?

657 Views Asked by At

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

2

There are 2 best solutions below

0
On BEST ANSWER

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%.

0
On

Evidently "Sequence Coverage" is a Shippable CI term. According to Shippable CI's docs, "sequence coverage" just means line coverage. Perhaps they chose that term to contrast to "branch coverage".