• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

msabramo / gocover-cobertura / 16
76%
master: 79%

Build:
Build:
LAST BUILD BRANCH: calc-aggregates
DEFAULT BRANCH: master
Ran 14 Feb 2018 06:21PM UTC
Jobs 4
Files 2
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
16

push

travis-ci

msabramo
Use testdata as-is without gen from template

While trying to run `gocover-cobertura` on `testdata/testdata_set.txt`, I noticed that
it's actually a Go template; not actual data; so the tool can't process
it. The template seems to be just to replace `{{.PkgPath}}` with the
current directory. By using `.` instead in that file, it eliminates the
need for a bunch of code for rendering the template (it eliminates
2 stdlib imports, not that it's a big deal)

Before:

```
$ gocover-cobertura < testdata/testdata_set.txt | head -n 18
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage line-rate="0" branch-rate="0" version="" timestamp="1518632283054" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0" complexity="0">
	<sources>
		<source>/usr/local/Cellar/go/1.10rc1/libexec/src</source>
		<source>/Users/abramowi/go/src</source>
	</sources>
	<packages></packages>
</coverage>
```

After:

```
$ gocover-cobertura < testdata/testdata_set.txt | head -n 18
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage line-rate="0" branch-rate="0" version="" timestamp="1518632265239" lines-covered="0" lines-valid="0" branches-covered="0" branches-valid="0" complexity="0">
	<sources>
		<source>/usr/local/Cellar/go/1.10rc1/libexec/src</source>
		<source>/Users/abramowi/go/src</source>
	</sources>
	<packages>
		<package name="./testdata" line-rate="0" branch-rate="0" complexity="0">
			<classes>
				<class name="-" filename="./testdata/func1.go" line-rate="0" branch-rate="0" complexity="0">
					<methods>
						<method name="Func1" signature="" line-rate="0" branch-rate="0" complexity="0">
							<lines>
								<line number="4" hits="1"></line>
								<line number="5" hits="1"></line>
								<line number="5" hits="0"></line>
								<line number="6" hits="0"></line>
```

183 of 240 relevant lines covered (76.25%)

23.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 16.1 14 Feb 2018 06:22PM UTC 0
76.25
Travis Job 16.1
2 16.2 14 Feb 2018 06:21PM UTC 0
75.83
Travis Job 16.2
3 16.3 14 Feb 2018 06:21PM UTC 0
75.83
Travis Job 16.3
4 16.4 14 Feb 2018 06:23PM UTC 0
75.83
Travis Job 16.4
Source Files on build 16
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #16
  • 53dfefa9 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc