Add support for outputting missing tests#8240
Merged
mattklein123 merged 8 commits intoenvoyproxy:masterfrom Sep 17, 2019
Merged
Add support for outputting missing tests#8240mattklein123 merged 8 commits intoenvoyproxy:masterfrom
mattklein123 merged 8 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Lisa Lu <lisalu@lyft.com>
added 3 commits
September 13, 2019 15:47
Signed-off-by: Lisa Lu <lisalu@lyft.com>
Signed-off-by: Lisa Lu <lisalu@lyft.com>
Signed-off-by: Lisa Lu <lisalu@lyft.com>
Contributor
Author
|
/retest |
|
🤷♀️ nothing to rebuild. |
Signed-off-by: Lisa Lu <lisalu@lyft.com>
Contributor
Author
|
/retest |
|
🔨 rebuilding |
Signed-off-by: Lisa Lu <lisalu@lyft.com>
jyotimahapatra
previously approved these changes
Sep 16, 2019
mattklein123
requested changes
Sep 17, 2019
Member
mattklein123
left a comment
There was a problem hiding this comment.
Cool stuff. LGTM with some small nits. Thank you!
/wait
test/tools/router_check/coverage.cc
Outdated
| return 100 * static_cast<double>(covered_routes_.size()) / num_routes; | ||
| } | ||
|
|
||
| void Coverage::printMissingTests(std::set<std::string> const& all_route_names, |
Member
There was a problem hiding this comment.
You want: const std::set<std::string>&, same below.
test/tools/router_check/coverage.cc
Outdated
| std::set_difference(all_route_names.begin(), all_route_names.end(), covered_route_names.begin(), | ||
| covered_route_names.end(), | ||
| std::inserter(missing_route_names, missing_route_names.end())); | ||
| std::set<std::string>::iterator it; |
Member
There was a problem hiding this comment.
nit: just define this on line 65
test/tools/router_check/router.cc
Outdated
| // check. | ||
| void RouterCheckTool::assignUniqueRouteNames(envoy::api::v2::RouteConfiguration& route_config) { | ||
| Runtime::RandomGeneratorImpl random; | ||
| std::string route_name; |
Member
There was a problem hiding this comment.
nit: remove variable, just inline uuid() call on line 97
test/tools/router_check/router.cc
Outdated
| std::move(api), Coverage(route_config)); | ||
| } | ||
|
|
||
| // Set UUID as the name for each route for detecting missing tests during the coverage |
Member
There was a problem hiding this comment.
nit: move this comment to the header file
Signed-off-by: Lisa Lu <lisalu@lyft.com>
Contributor
danzh2010
pushed a commit
to danzh2010/envoy
that referenced
this pull request
Sep 24, 2019
…y#8240) Signed-off-by: Lisa Lu <lisalu@lyft.com>
danzh2010
pushed a commit
to danzh2010/envoy
that referenced
this pull request
Oct 4, 2019
…y#8240) Signed-off-by: Lisa Lu <lisalu@lyft.com>
danzh2010
pushed a commit
to danzh2010/envoy
that referenced
this pull request
Oct 4, 2019
…y#8240) Signed-off-by: Lisa Lu <lisalu@lyft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Lisa Lu lisalu@lyft.com
Description: Previously the router check tool only supported outputting the percentage of routes covered from the coverage reports. This made it difficult to determine which routes were actually missing tests. This change adds support for printing out routes that aren't covered by any tests as a part of the detailed coverage report (under the flag --covall). Relates to #730.
Risk Level: Low
Testing: Added a unit test against to check output in route_tests.sh.
Docs Changes: included
Release Notes: included
[Optional Fixes #Issue]
[Optional Deprecated:]