I write my test cases in Confluence and then automate them in Cypress. I was wondering is there any way I can get the test coverage report. I already looked into Istanbul but it is for code coverage. I am looking for a test coverage solution. Thanks in advance.
-
"I write my test cases in Confluence and then automate them in Cypress." That sounds like duplicate work, why don't you just use Cypress? Why do you need Confluence when it seems that the same scenario is in Cypress as well?– pavelsamanSep 7, 2021 at 20:34
-
3Cypress is for automation. We definitely don't automate every manual test case.– popSep 8, 2021 at 8:18
-
I think there's some misunderstanding in terms of terminology. For example, I don't know what you mean by "manual" test case. It sounds like some people follow some script you write in advance. That doesn't sound like testing. But anyway, if this is the case, why not automate every such boring task and let people focus on exploration where automation falls short? Then there'd be no need to type anything in Confluence, hence the duplicate work I mentioned.– pavelsamanSep 8, 2021 at 12:46
2 Answers
Use Code Coverage provided by Cypress.
Computing the source code lines that were executed during the test is done through code coverage. Code coverage requires inserting additional counters into your source code before running it. This step is called instrumentation.
-
I think the OP's question was how to provide a test coverage agains what they write in Confluence. Let's say there are some pages in Confluence with a test case each, then you run some Cypress checks, the goal is to see what Confluece test cases have been covered by the automated execution. Sep 9, 2021 at 19:30
I store test cases in TestRail and then generate weekly reports that show the percentage of test cases that are marked automated against the total. I'm not sure what you mean about storing your test cases in Confluence. Are you using Atlassian's Zephyr tool?