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

test: Add a DB log filter by test name cli tool #2677

Merged
merged 3 commits into from Dec 22, 2020
Merged

Conversation

nbbeeken
Copy link
Contributor

Adds a custom xunit reporter that captures stdio and reports start
and end times of tests.

Add a CLI tool "Crawfish" can take structured mongodb logs and
the new xunit test report and merge the information to
obtain filtered mongodb logs by test name.

Deduplicate suite names to ensure grepping / filtering works as expected

Ensure all tests print to stderr to prevent
logs from interfering with custom reporters.

Update eslint config to correctly handle mjs files
as well as ignore compiled js in the lib folder

Skunkworks

@nbbeeken
Copy link
Contributor Author

You can see here on a skipped test what the captured stdout/err looks like, its not spectacularly interesting but now you could conceivably run a patch with a bunch of logs and get a look quickly per test what the outputs are! hopefully that comes in handy down the road

Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🦐 One general stylistic question, why the heavy use of Reflect?

@nbbeeken
Copy link
Contributor Author

For bad TS reasons, I turn on the type checker just for me locally and I'm added properties to these objects that don't originally have them so I get errors, reflect is just me circumventing the red underlines which don't mean anything anyway. I should revert it to just be normal sets and accesses, if it were TS I'd be able to extend the Mocha.Test type interface and put in the props I want but alas, another time. 😄

and end times of tests.

Add a CLI tool "Crawfish" can take structured mongodb logs and
the new xunit test report and merge the information to
obtain filtered mongodb logs by test name.

Deduplicate suite names to ensure grepping / filtering works as expected

Ensure all tests print to stderr to prevent
logs from interfering with custom reporters.

Update eslint config to correctly handle mjs files
as well as ignore compiled js in the lib folder

Skunkworks
@nbbeeken nbbeeken merged commit 16c1574 into master Dec 22, 2020
@nbbeeken nbbeeken deleted the skunkworks/crawfish branch December 22, 2020 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants