Support all cucumber formatters
Currently we have to use a custom cucumber formatter (
ExtraHooks::Pretty) to get the extra
AfterFeature hooks. However, when we run the automated tests in jenkins we want to support the JSON formatter at least.
Create our extra hooks independent of the formatter used.
So now we can use the cucumber formatters however we want.
#2 Updated by anonym almost 5 years ago
- Assignee changed from anonym to intrigeri
- % Done changed from 0 to 50
- QA Check set to Ready for QA
- Feature Branch set to test/9424-support-all-formatters
So when running the test suite without adding any
--format (cucumber) option, all should be identical to how it worked before, including the semantics of
--log-to-file. However, now we could do something like this:
./run_test_suite ... -- --format jsonseparately
--isoand its argument, etc. However, stuff that we print to stderr (e.g.
--debugoutput, the memory fill progress, which is printed even without
--debug) will mess up the json on the terminal output. Instead we can do:
./run_test_suite ... -- --format json --out /tmp/test.json
and then the crap we write will be the only thing written to stderr (on the terminal), and nothing will be written to stdout since no formatter is directed to it (cucumbers default is the
prettyformatter directed to stdout).
In jenkins we likely will want to do this:
./run_test_suite ... --debug -- --format pretty --format json --out /tmp/test.json
Then we'll get the clean, JSON output in
/tmp/test.jsonfor the fancy JSON jenkins plugin blah, and we'll also have a full debug level log written to the terminal output that might be of interest in case of test failures. I suppose jenkins saves the terminal output, but in case it doesn't we may want to throw in