cucumber / cucumber/godog

tests in different folders - godog with more than one TestMain

Open
#291 6 comments 7 reactions 0 assignees View on GitHub
:zap: enhancement
Dominant language
Go
Stars
2.7k
Forks
280
Avg merge
2d 20h
Merged PRs (30d)
2

Description

I can run tests using the command `godog`, and `go test` (with TestMain)

If I have two feature files, I can put them in separate folders, and run each one separately in their folder with `godog` or `go test`.

I can run both from the parent folder using `go test ./...`

I don't seem to be able to run all tests from the parent folder (was hoping that `godog ./...` would do this).

I am prevented from having all my tests in the same folder due to having more than one TestMain.

How can I split up my tests into different files and folders?

In order to run the tests in the release pipeline, I would like to build everything into **one** executable using `godog -o`

What is the best way forward?

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported behavior by running godog and go test ./... with feature files in separate folders, then compare it with godog ./... and godog -o. Read the command and test-running entry points responsible for discovery and executable output. Done means separated tests can be run from the parent and the requested release-pipeline executable behavior is defined and works.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.