HarryR / HarryR/logpipe

Improve tests, ensure parsing and formatting regressions are caught

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently the test suite is sub-optimal, the [test.sh](test.sh) script provides some rudimentary checks, however I'm absolutely certain that I've subtly broken the `apacheclf` parser so that it rejects some lines which were previously successfully parsed.

Additionally the log files which are downloaded from random internet sites as part of the test suite provide no consistency, these files are useful because they provide a real log file sample and have highlighted a few issues (such as non-urlencoded spaces in the filename, and latin1 encoded characters), the `zzuf` tool is also useful in finding edge cases and has shown that the JSON serialiser used by `logpipe` can produce output that can't be parsed by PHP and Pythons native JSON modules.

The aims of a regression testing suite are:
- Given a specific pipeline configuration, with input and output samples, ensure that the pipeline exits with a specific known state.
- Ensure that known bugs are documented
- Ensure that known working pipelines continue to work
- Verify that changes to the pipeline and parsers don't cause regressions
- Verify that pipelines work consistently across platforms and build environments

I believe that when an appropriate regression testing framework is in place it will significantly improve confidence in the correctness of operation, and provide an easy way for the development cycle to incorporate examples of correct or incorrect behaviour from users.

In short, it lets us audit and verify the programs behaviour to achieve many goals and remain disciplined when developing features.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.