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

Logstash Config Test Coverage #95

Open
breml opened this issue Nov 27, 2020 · 2 comments
Open

Logstash Config Test Coverage #95

breml opened this issue Nov 27, 2020 · 2 comments
Milestone

Comments

@breml
Copy link
Collaborator

breml commented Nov 27, 2020

If one has larger and more complex Logstash configuration (especially if there is some use of conditions), it gets harder and harder to make sure, one does have a test case for every branch of the configuration and the necessary coverage of the corner cases.

Therefore it would be beneficial, if Logstash Filter Verifier (LFV) would provide some support to track the "code" coverage of the Logstash configuration. The idea here is to use the Logstash pipeline stats (https://www.elastic.co/guide/en/logstash/current/node-stats-api.html#pipeline-stats) after the execution of the test cases to get the details, which filters have been hit. Given every filter has an ID configured, it would be possible to emit the name of the filters, which have not been hit by any test case.

@magnusbaeck
Copy link
Owner

It shouldn't be too hard to generate an HTML file with per-file stats and the configuration under test with non-covered filters marked with a different background color (similar to the output from e.g. gocov-html).

@breml
Copy link
Collaborator Author

breml commented Dec 4, 2020

It shouldn't be too hard to generate an HTML file with per-file stats and the configuration under test with non-covered filters marked with a different background color (similar to the output from e.g. gocov-html).

This is a nice idea. For a first implementation I would focus on the simpler thing and then improve from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants