Skip to content

[Hackathon] fix(testlist): testlist run ignores --report-file / --report-suite-name without --report junit, dispatches everything and exits 0 with no report #569

Closed

Description

@PugarHuda

Verified against (commit SHA or released version)

v0.15.0, main at d61e6df, built from source on Windows 11 with Node 26, 2026-10-20.

Discord Username / User ID

hajislamet

What does this improvement do?

test run and test rerun check their JUnit flags with the shared assertJUnitReportOptions (src/lib/junit-report.ts:89). A bad combination is exit 5 VALIDATION_ERROR before anything is dispatched, for example --report-file requires --report junit.

testlist run does not use that shared check. It has its own partial copy in validateTestlistRunOptions (src/commands/testlist.ts ~501-509), which rejects only two cases:

  • --report junit with no --report-file;
  • --report junit without --wait.

So under the same flags, testlist run does this:

Command test run testlist run today
--wait --report-file results.xml (forgot --report junit) exit 5, nothing dispatched every case dispatched and billed, polled, no JUnit file written, exit 0 on an all-pass run
--wait --report-suite-name nightly without --report junit exit 5 silently ignored

In CI the first row is the dangerous one. The JUnit upload step finds no file, or uploads a stale results.xml from an earlier run, while the gate is green.

Reproduction

  1. Run testsprite testlist run <list-id> --wait --report-file results.xml.
  2. Every member runs. results.xml is never created and the exit code is 0.
  3. Run the same flags with testsprite test run <id> --wait --report-file results.xml. It exits 5 immediately.

Details / implementation notes

Proposed fix: replace the two hand-written checks in validateTestlistRunOptions with assertJUnitReportOptions({ ...opts, batchPath: true }), the same rules test run and test rerun use. That is a net −6 lines, and the existing testlist report tests still pass.

Tests (src/commands/testlist.spec.ts, mock transport): an it.each named "%s → VALIDATION_ERROR before dispatch". Each case asserts a VALIDATION_ERROR with the right details.field and that no request was sent. The cases are:

  • --report-file without --report junit;
  • --report-suite-name without --report junit;
  • --report junit --report-file "".

All three fail on main: they dispatch and poll. With the fix they pass, and testlist.spec is 53/53. I have this ready locally.

Related, not overlapping: #455 validates the report and summary paths before dispatch. This issue is about the flag combination rules that testlist run skips. #376 covers the test command's flags.

Confirmations

  • I have searched existing issues and this is not a duplicate.
  • I have provided my Discord identity above for reward coordination.

Activity

  1. added
    needs-triage
    hackathon
    on Oct 30, 2026
  2. ruili-testsprite commented on Oct 31, 2026

    @ruili-testsprite
    Contributor

    Confirmed on v0.15.0, thanks @PugarHuda. testlist run checks only two report-flag combinations itself, so --report-file or --report-suite-name without --report junit dispatches every member and exits 0 with no report, while test run refuses the same flags before dispatch. Accepted, scope:

    • In validateTestlistRunOptions (src/commands/testlist.ts), replace the two report checks with the shared assertJUnitReportOptions from src/lib/junit-report.ts, so both commands refuse the same combinations with the same exit 5 and message before any request.
    • Leave the other testlist checks (--max-concurrency, and --gh-output / --summary-file requiring --wait) as they are.
    • Tests (each must fail before the fix): --report-file alone and --report-suite-name alone exit 5 with no dispatch. Controls: --report junit --report-file <path> --wait still writes the report; the two existing checks still fire.
    • One CHANGELOG Fixed line.

    No new dependency. Comment /assign to claim it.

  3. added
    accepted
    and removed
    needs-triage
    on Oct 31, 2026
  4. zhengqiuyang commented on Nov 2, 2026

    @zhengqiuyang
    Contributor

    /assign

  5. added
    in-progress
    on Nov 2, 2026
  6. testsprite-hob commented on Nov 2, 2026

    @testsprite-hob

    Assigned to @zhengqiuyang. Thanks for taking this on. (1 more slot available.)

    Your open assigned issues (2/3):

  7. added a commit that references this issue on Nov 10, 2026
  8. added a commit that references this issue on Nov 10, 2026
    4118ba0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

acceptedhackathonin-progress

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions