cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russ Hatch (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-7226) get code coverage working again (cobertura or other)
Date Fri, 16 May 2014 11:08:39 GMT


Russ Hatch updated CASSANDRA-7226:

    Attachment: trunk-7226.txt

Attaching patch to add jacoco for build tests (functional tests aren't sorted out yet but
should be possible).

To try it out, get the latest stuff:
ant maven-ant-tasks-retrieve-build

Run the unit tests:
ant jacoco-run

Run more tests if you want. The execution info is appended by default, so you can run many
tasks for a combined report. If you don't want the unit tests, provide an ant task name to
invoke. As long as the task runs through the testmacro the jacoco java agent will be included
and coverage data will be appended.
ant jacoco-run -Dtaskname=pig-tests

Run a coverage report on the test(s) you have run:
ant jacoco-report

To run tests and the report in one shot:
ant codecoverage
ant codecoverage -Dtaskname=pig-tests

To view the report, open up build/jacoco/index.html in your browser.

When you are done with the coverage data and report, run:
ant jacoco-cleanup

> get code coverage working again (cobertura or other)
> ----------------------------------------------------
>                 Key: CASSANDRA-7226
>                 URL:
>             Project: Cassandra
>          Issue Type: Test
>            Reporter: Russ Hatch
>            Assignee: Russ Hatch
>         Attachments: coverage.png, trunk-7226.txt
> We need to sort out code coverage again, for unit and cassandra-dtest tests. Preferably
the same tool for both.
> Seems like cobertura project activity has dwindled. Jacoco might be a viable alternative
to cobertura. Jacoco can can instrument running bytecode so I think it could also work for
dtests (does require an agent, not sure if that's a problem yet). If using an agent is problematic
looks like it can also work with offline bytecode though I don't see how that could benefit
dtests. Project seems pretty active, with a release just last week.

This message was sent by Atlassian JIRA

View raw message