Skip to content

[CLI] convert --verbose output from dict to valid JSON #380

@cgeisel

Description

@cgeisel

Problem to solve (from the user’s perspective)

I use trcli in my CI pipeline and frequently need to debug an issue with --verbose. The challenge is that the output is a dict with single quotes that does not validate as JSON, so it is not easily formatted, parsed, etc.

How could we improve this?

Convert the dict to valid json using json.dumps before output.

I would like to contribute this PR if you are open to it.

Primary value dimension

Other (specify below)

If you selected “Other”, describe the value dimension

Convenience

Where is the limitation?

CLI — missing capability

CLI version (fill if CLI is involved)

trcli 1.12.0

TestRail version/edition (fill if API is involved)

TestRail Cloud v9.6

What improves, and by how much?

Customer experience when debugging trcli errors.

KPI(s)

Unknown

Urgency

Low — incremental improvement

Proposal (CLI-level sketch)

Add json.dumps() to

if payload:
rather than printing the dict as an f string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions