Skip to content

Add --progress flag to show real-time test execution#63

Open
camilamacedo86 wants to merge 1 commit intoopenshift-eng:mainfrom
camilamacedo86:add-progress-flag
Open

Add --progress flag to show real-time test execution#63
camilamacedo86 wants to merge 1 commit intoopenshift-eng:mainfrom
camilamacedo86:add-progress-flag

Conversation

@camilamacedo86
Copy link
Copy Markdown

@camilamacedo86 camilamacedo86 commented Apr 21, 2026

This commit adds support for Ginkgo's progress reporting feature by exposing a --progress flag in both run-suite and run-test commands.

Changes:

  • Added --progress flag to run-suite command
  • Added --progress flag to run-test command
  • Modified Ginkgo configuration to enable ShowNodeEvents when progress is requested
  • Progress can also be enabled via OTE_PROGRESS=true environment variable

When --progress is enabled, users will see STEP output in real-time as tests execute, rather than only seeing output after tests complete.

This significantly improves the local development experience for long-running tests (e.g., operator installation, upgrade tests).

Example usage:
./bin/test-binary run-suite my/suite --progress
./bin/test-binary run-test -n "test name" --progress

Closes: https://github.com/openshift-eng/openshift-tests-extension/issues

Generated-by: Claude

This commit adds support for Ginkgo's progress reporting feature
by exposing a --progress flag in both run-suite and run-test commands.

Changes:
- Added --progress flag to run-suite command
- Added --progress flag to run-test command
- Modified Ginkgo configuration to enable ShowNodeEvents when progress is requested
- Progress can also be enabled via OTE_PROGRESS=true environment variable

When --progress is enabled, users will see STEP output in real-time
as tests execute, rather than only seeing output after tests complete.

This significantly improves the local development experience for
long-running tests (e.g., operator installation, upgrade tests).

Example usage:
  ./bin/test-binary run-suite my/suite --progress
  ./bin/test-binary run-test -n "test name" --progress
@openshift-ci openshift-ci Bot requested review from deads2k and jupierce April 21, 2026 09:11
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 21, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: camilamacedo86
Once this PR has been reviewed and has the lgtm label, please assign smg247 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

concurrencyFlags *flags.ConcurrencyFlags
junitPath string
htmlPath string
progress bool
Copy link
Copy Markdown

@perdasilva perdasilva Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe isShowProgress or showProgress?

Comment thread pkg/ginkgo/util.go
)

func configureGinkgo() (*types.SuiteConfig, *types.ReporterConfig, error) {
return configureGinkgoWithProgress(false)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be better to do something like:

Suggested change
return configureGinkgoWithProgress(false)
return configureGinkgoWithProgress(os.Getenv("OTE_PROGRESS") == "true")

we seem to be setting the OTE_PROGRESS in runsuite.go

as it is we call it with false but the that intent gets overridden by the env var.

Comment thread pkg/ginkgo/util.go

// Enable progress reporting if requested via --progress flag or OTE_PROGRESS env var
// This shows STEP output as tests run, not just when they complete
if showProgress || os.Getenv("OTE_PROGRESS") == "true" {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this hidden condition and move the env var check to the callers or configureGinkgoWithProgress

Suggested change
if showProgress || os.Getenv("OTE_PROGRESS") == "true" {
if showProgress {

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants