Opened 8 years ago

Closed 7 years ago

#7821 closed task (implemented)

Look into code coverage more

Reported by: atagar Owned by: atagar
Priority: Medium Milestone:
Component: Archived/Stem Version:
Severity: Keywords: testing
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Stem has quite a bit of tests but I haven't personally run a code coverage tool to figure out what we're missing. Sean had a suggestion on this...

I've used this on three projects (not counting Stem) and it helps
check that written tests are reaching all the dark crevices of one's
code.  If you have questions, I'm happy to help. Once installed, do:

1) coverage run --parallel-mode --branch --omit="test*" ./
-u -i -t RUN_NONE (or some variation)
2) coverage combine
3) coverage html
4) read the nice reports in the htmlcov/ directory

Child Tickets

Attachments (1)

stem-coverage-ec1078ccc39af8d1.tar.bz2 (263.5 KB) - added by robinson 8 years ago. HTML report for 2012-01-03

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by robinson HTML report for 2012-01-03

comment:1 Changed 8 years ago by robinson

I attached a sample HTML report for Stem at commit ec1078ccc39af8d1 on Jan. 3, 2013. This was generated using "./ -u -i -t ONLINE"

comment:2 Changed 8 years ago by atagar

Yikes, coverage provides nice output. I'm curious about the output with both the ONLINE and RUN_ALL targets since that should give much more accurate information about the connection module. However, as gsathya pointed out to me yesterday we have some broken tests with that target. I'll try to fix them this weekend.

comment:3 Changed 8 years ago by robinson


I'll try to run with the ONLINE and RUN_ALL targets the weekend of Jan. 12, 2013, with whatever fixes you have applied by then. I've done this before and it is less than a 5-minute run time, so no big deal.

comment:4 Changed 8 years ago by atagar

Well, that's odd. I've fixed the integ testing issues...

But when I run the RUN_ALL target with coverage it goes through a few test passes then hangs on 'test.integ.control.controller'. It reliably fails with coverage and works without. Pesky...

comment:5 Changed 7 years ago by atagar

Resolution: implemented
Status: newclosed

Abhishek was able to run coverage with the RUN_ALL target so guess it was just the version that I was using. Resolving.

Note: See TracTickets for help on using tickets.