Project

General

Profile

Feature #9424

Support all cucumber formatters

Added by anonym over 4 years ago. Updated about 4 years ago.

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

100%

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

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.


Related issues

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

Associated revisions

Revision 303a348a (diff)
Added by Tails developers over 4 years ago

Create our extra hooks independent of the formatter used.

So now we can use the cucumber formatters however we want.

Will-fix: #9424

Revision 7e7eda24
Added by intrigeri over 4 years ago

Merge remote-tracking branch 'origin/test/9424-support-all-formatters' into stable

Fix-committed: #9424

History

#1 Updated by Tails over 4 years ago

  • Status changed from Confirmed to In Progress

#2 Updated by anonym over 4 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 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 over 4 years ago

  • % Done changed from 50 to 60

Code review passes.

#4 Updated by intrigeri over 4 years ago

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

#5 Updated by intrigeri over 4 years ago

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

#6 Updated by intrigeri about 4 years ago

  • Status changed from Fix committed to Resolved

#7 Updated by intrigeri 10 months ago

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

Also available in: Atom PDF