Unable to run Coverage with Karma

I got the same [WARN] because the plugin ‘karma-coverage’ was not defined inside the plugins of the config, try to see if adding it fixes your warning, not sure if it will fix your full problem. plugins: [ ‘karma-jasmine’, ‘karma-coverage’, ‘karma-chrome-launcher’, ‘karma-firefox-launcher’, ], UPDATE: I also had a different problem when running the coverage, caused … Read more

Merging Integration and Unit test reports with JaCoCo

I recently implemented this: after some headaches and a lot of testing, I have a configuration that works beautifully. <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>${jacoco.version}</version> <executions> <execution> <id>pre-unit-test</id> <goals> <goal>prepare-agent</goal> </goals> <configuration> <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile> <propertyName>surefireArgLine</propertyName> </configuration> </execution> <execution> <id>pre-integration-test</id> <goals> <goal>prepare-agent-integration</goal> </goals> <configuration> <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile> <propertyName>testArgLine</propertyName> </configuration> </execution> <execution> <id>post-integration-test</id> <phase>post-integration-test</phase> <goals> <goal>report</goal> </goals> <configuration> <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile> <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory> </configuration> </execution> … Read more

JestJS – show all uncovered lines in coverage report

Is there a way to print all of the uncovered lines? I’m using React + TypeScript + Jest. In my project, I run npm test — –coverage, and the file with the remaining uncovered lines is under the coverage directory: <project name>\<directory>\<directory>\coverage\lcov-report\index.html (Your file path may have a variation on the coverage part. :-)) Then … Read more

How to get all packages’ code coverage together in Go?

EDIT: Things have changed since I wrote this answer. See the release notes of Go 1.10: https://golang.org/doc/go1.10#test : The go test -coverpkg flag now interprets its argument as a comma-separated list of patterns to match against the dependencies of each test, not as a list of packages to load anew. For example, go test -coverpkg=all … Read more