cucumber / cucumber/godog

Support external custom Formatters

Open
#481 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.7k
Forks
280
Avg merge
2d 20h
Merged PRs (30d)
2

Description

### 🤔 What's the problem you're trying to solve?

I have multiple GoDog testing projects and a custom formatter that i wrote for them. But, i unfortunately found out that a custom formatter must be part of the testing package and compiled with the test files as part of the package, otherwise GoDog fails with an error: "unregistered formatter". I would like to suggest an option for loading a precompiled formatter that is independent of the testing package.
I would like to use this formatter in various different testing projects. This puts me in a situation that i need to copy the source files to each project and recompile the tests. Its harder for me to change my code and follow up the formatter's bugs.

### ✨ What's your proposed solution?

Add an option to load a formatter package. something like:
-f path/to/formatter.bin would be nice. even maybe add a flag for an outside formatter if it would be easier for you to add an option and not adjust the existing one.

### ⛏ Have you considered any alternatives or workarounds?

I'm currently copying the files to each testing project package/directory and recompiling.

Contributor guide

Open the contributing guide

Research direction

The issue does not name files or tests; start by tracing formatter registration and command-line option parsing, especially the proposed -f path. Define how a precompiled formatter can load independently of the test package, then verify that existing in-package formatter behavior remains supported and that the external path is handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.