Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage reporting #1276

Closed
tsandall opened this issue Mar 20, 2019 · 3 comments
Closed

Improve test coverage reporting #1276

tsandall opened this issue Mar 20, 2019 · 3 comments

Comments

@tsandall
Copy link
Member

We currently have decent test coverage within core components of OPA however we don't have any automation to report coverage during the PR process (although test coverage is one of the main review criteria.)

It would be nice to have the test coverage results reported on PRs.

@tsandall
Copy link
Member Author

Coverage as of 880d73f

?   	github.com/open-policy-agent/opa	[no test files]
ok  	github.com/open-policy-agent/opa/ast	(cached)	coverage: 85.2% of statements
ok  	github.com/open-policy-agent/opa/bundle	(cached)	coverage: 87.2% of statements
ok  	github.com/open-policy-agent/opa/cmd	4.965s	coverage: 32.9% of statements
?   	github.com/open-policy-agent/opa/config	[no test files]
ok  	github.com/open-policy-agent/opa/cover	0.035s	coverage: 91.6% of statements
ok  	github.com/open-policy-agent/opa/dependencies	(cached)	coverage: 93.3% of statements
ok  	github.com/open-policy-agent/opa/download	(cached)	coverage: 84.5% of statements
ok  	github.com/open-policy-agent/opa/format	(cached)	coverage: 87.8% of statements
?   	github.com/open-policy-agent/opa/internal/cmd/genopawasm	[no test files]
ok  	github.com/open-policy-agent/opa/internal/compiler/wasm	(cached)	coverage: 44.7% of statements
?   	github.com/open-policy-agent/opa/internal/compiler/wasm/opa	[no test files]
?   	github.com/open-policy-agent/opa/internal/ir	[no test files]
ok  	github.com/open-policy-agent/opa/internal/leb128	(cached)	coverage: 60.0% of statements
?   	github.com/open-policy-agent/opa/internal/manifest	[no test files]
ok  	github.com/open-policy-agent/opa/internal/planner	(cached)	coverage: 56.6% of statements
?   	github.com/open-policy-agent/opa/internal/presentation	[no test files]
?   	github.com/open-policy-agent/opa/internal/runtime	[no test files]
?   	github.com/open-policy-agent/opa/internal/version	[no test files]
?   	github.com/open-policy-agent/opa/internal/wasm/constant	[no test files]
ok  	github.com/open-policy-agent/opa/internal/wasm/encoding	(cached)	coverage: 64.4% of statements
?   	github.com/open-policy-agent/opa/internal/wasm/instruction	[no test files]
?   	github.com/open-policy-agent/opa/internal/wasm/module	[no test files]
?   	github.com/open-policy-agent/opa/internal/wasm/opcode	[no test files]
?   	github.com/open-policy-agent/opa/internal/wasm/types	[no test files]
ok  	github.com/open-policy-agent/opa/loader	(cached)	coverage: 84.1% of statements
ok  	github.com/open-policy-agent/opa/metrics	(cached)	coverage: 33.8% of statements
?   	github.com/open-policy-agent/opa/plugins	[no test files]
ok  	github.com/open-policy-agent/opa/plugins/bundle	0.135s	coverage: 73.0% of statements
ok  	github.com/open-policy-agent/opa/plugins/discovery	0.138s	coverage: 85.3% of statements
ok  	github.com/open-policy-agent/opa/plugins/logs	0.196s	coverage: 81.7% of statements
ok  	github.com/open-policy-agent/opa/plugins/rest	(cached)	coverage: 66.7% of statements
ok  	github.com/open-policy-agent/opa/plugins/status	0.040s	coverage: 78.9% of statements
ok  	github.com/open-policy-agent/opa/profiler	1.984s	coverage: 95.6% of statements
ok  	github.com/open-policy-agent/opa/rego	1.333s	coverage: 69.4% of statements
ok  	github.com/open-policy-agent/opa/repl	0.792s	coverage: 67.1% of statements
ok  	github.com/open-policy-agent/opa/runtime	0.095s	coverage: 40.6% of statements
ok  	github.com/open-policy-agent/opa/server	1.615s	coverage: 77.7% of statements
ok  	github.com/open-policy-agent/opa/server/authorizer	0.628s	coverage: 95.7% of statements
ok  	github.com/open-policy-agent/opa/server/identifier	(cached)	coverage: 100.0% of statements
?   	github.com/open-policy-agent/opa/server/types	[no test files]
?   	github.com/open-policy-agent/opa/server/writer	[no test files]
ok  	github.com/open-policy-agent/opa/storage	(cached)	coverage: 53.4% of statements
ok  	github.com/open-policy-agent/opa/storage/inmem	(cached)	coverage: 84.8% of statements
ok  	github.com/open-policy-agent/opa/test/authz	0.210s	coverage: 0.0% of statements
ok  	github.com/open-policy-agent/opa/test/scheduler	0.347s	coverage: 0.0% of statements
?   	github.com/open-policy-agent/opa/test/wasm/cmd	[no test files]
ok  	github.com/open-policy-agent/opa/tester	0.137s	coverage: 80.7% of statements
ok  	github.com/open-policy-agent/opa/topdown	8.946s	coverage: 87.9% of statements
?   	github.com/open-policy-agent/opa/topdown/builtins	[no test files]
?   	github.com/open-policy-agent/opa/topdown/copypropagation	[no test files]
ok  	github.com/open-policy-agent/opa/types	(cached)	coverage: 91.6% of statements
ok  	github.com/open-policy-agent/opa/util	(cached)	coverage: 84.9% of statements
?   	github.com/open-policy-agent/opa/util/test	[no test files]
?   	github.com/open-policy-agent/opa/version	[no test files]
ok  	github.com/open-policy-agent/opa/watch	0.854s	coverage: 84.8% of statements

@tsandall tsandall added this to TODO (Things That Should Be Done) in Open Policy Agent via automation Apr 15, 2020
@tsandall tsandall moved this from TODO (Things That Should Be Done) to Planned (Things We Are Going To Do) in Open Policy Agent Apr 15, 2020
@tsandall
Copy link
Member Author

tsandall commented Jul 9, 2020

@patrick-east can we close this now?

@patrick-east
Copy link
Contributor

Yep I think we're good, Codecov reports should be on PR's now and project wide stats are available here https://codecov.io/gh/open-policy-agent/opa

Open Policy Agent automation moved this from Planned (Things We Are Going To Do) to Done Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants