Feature #9424

Support all cucumber formatters

Added by anonym 2015-05-18 12:20:06 . Updated 2015-07-03 03:36:54 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Test suite
Target version:
Start date:
2015-05-18
Due date:
% Done:

100%

Feature Branch:
test/9424-support-all-formatters
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

Currently we have to use a custom cucumber formatter (ExtraHooks::Pretty) to get the extra BeforeFeature and AfterFeature hooks. However, when we run the automated tests in jenkins we want to support the JSON formatter at least.


Subtasks


Related issues

Related to Tails - Bug #16150: After hooks should be able to mark the scenario as failed in Jenkins Cucumber report Confirmed 2018-11-23

History

#1 Updated by Tails 2015-05-18 12:21:22

  • Status changed from Confirmed to In Progress

Applied in changeset commit:303a348af2bc65b778d92cba404a19791e3177c9.

#2 Updated by anonym 2015-05-21 09:04:12

  • 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 json

separately
Where “...” is --iso and its argument, etc. However, stuff that we print to stderr (e.g.--debug output, 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 pretty formatter 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.json for 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 --log-to-file too.

#3 Updated by intrigeri 2015-05-25 11:28:15

  • % Done changed from 50 to 60

Code review passes.

#4 Updated by intrigeri 2015-05-25 12:10:48

  • Status changed from In Progress to Fix committed
  • % Done changed from 60 to 100

Applied in changeset commit:7e7eda24219b9449adabe6b6cf736d67b15955a6.

#5 Updated by intrigeri 2015-05-25 12:11:49

  • Assignee deleted (intrigeri)
  • QA Check changed from Ready for QA to Pass

#6 Updated by intrigeri 2015-07-03 03:36:54

  • Status changed from Fix committed to Resolved

#7 Updated by intrigeri 2018-11-24 05:19:10

  • related to Bug #16150: After hooks should be able to mark the scenario as failed in Jenkins Cucumber report added