8000 Feature Request: Emulate -fd style output · Issue #1668 · onsi/ginkgo · GitHub
[go: up one dir, main page]

Skip to content

Feature Request: Emulate -fd style output #1668

Open

Description

@woodie

Emulate "format documentation" style output

Ginkgo's output can be a bit noisy for large test suites compared to RSpec's -fd output. The ginkgo-fd post-processor is an attempt to achieves this by consuming Ginkgo's --json-report output.

Should I create a PR that adds the -fd flag directly into Ginko?

Activity

  1. onsi commented on Jun 4, 2026

    @onsi
    Owner

    sure thing! go for it! be sure to update the docs as well, thanks!

  2. woodie commented on Jun 4, 2026

    @woodie
    ContributorAuthor

    We could use the same footer.

    Ran 127 of 127 Specs in 0.078 seconds
    SUCCESS! -- 127 Passed | 0 Failed | 0 Pending | 0 Skipped
    

    vs this

    Finished in 75ms
    127 examples, 0 failures
    
  3. onsi commented on Jun 4, 2026

    @onsi
    Owner

    imo keep the same footer

  4. woodie commented on Jun 4, 2026

    @woodie
    ContributorAuthor

    Will do. A direct clone seemed like a good starting point, but more (unnecessary) work to maintain.

  5. woodie commented on Jun 5, 2026

    @woodie
    ContributorAuthor

    OK, the latest PR uses the same footer.

    $ go run github.com/onsi/ginkgo/v2/ginkgo -fd  ./reporters/...
    DefaultReporter
      Rendering SuiteWillBegin
        Default Behavior
        With Labels
        With long Labels
        With SemVerConstraints
        With ComponentSemVerConstraints
        When configured to randomize all specs
        when configured to run in parallel
        when succinct and in series
        when succinct and in parallel
        when succinct and with labels
        when succinct and with SemVerConstraints
        when succinct and with ComponentSemVerConstraints
    •••
    JunitReport
      default behavior
        generates a Junit report and writes it to disk
      when configured to omit all the omittables
        generates a Junit report and writes it to disk
      when configured to write the report inside a folder
        creates the folder and the report file
    
    Ran 127 of 127 Specs in 0.078 seconds
    SUCCESS! -- 127 Passed | 0 Failed | 0 Pending | 0 Skipped
    PASS
    
    Ginkgo ran 1 suite in 2.338581833s
    Test Suite Passed
    
  6. woodie commented on Jun 5, 2026

    @woodie
    ContributorAuthor

    There was a bit to unwind from the first implementation, but change looks solid now.

  7. woodie commented on Jun 5, 2026

    @woodie
    ContributorAuthor

    I'm also working on simplifying this change in this PR.

  8. Huaian666 commented on Jun 5, 2026

    @Huaian666

    one of those rare projects where the more you use it the more you appreciate it. small things keep surprising me in a good way.

  9. woodie commented on Jun 5, 2026

    @woodie
    ContributorAuthor

    If Ginko responds to multiple flags, the current -fd behavior may bypasses it.
    • How should the -fd behave with report.RunningInParallel which is currently ignored?
    • Should the logic of DidRun() be broken out into new functions or should didRunFd() be embedded into DidRun()?

    I've closed PR1669 as PR1670 seems so much better to me.

  10. onsi commented on Jun 7, 2026

    @onsi
    Owner

    @woodie I think it's fine having this bypass other flags and essentially be a stand-alone opt-in mode. it occurs to me that it is unlikely to play well with -randomize-all and parallel specs as in both cases there is no guarantee that tests at different container nestings won't interleave.

  11. woodie commented on Jun 7, 2026

    @woodie
    ContributorAuthor

    let me know if you want to see any other changes.

  12. woodie commented on Jun 22, 2026

    @woodie
    ContributorAuthor

    The CHANGELOG could include something like this.

    +-fd (RSpec-style "format documentation" output) is now exclusive of -p/-procs and -randomize-all. Its hierarchical tree assumes specs run serially in declaration order, so Ginkgo now overrides those flags and prints a notice when it does, rather than producing fragmented, hard-to-read output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0