Skip to content

add -trace #10

@ppadmavilasom

Description

@ppadmavilasom

Request to add -trace global flag so intermediate command results in a pipeline sequence can be displayed for debugging.
It might even be good to make this a config to turn on and off without modifying test scripts

for eg if we run

tcli utils echo -format 'range(1;2) | {body: {id:.,name:.|tostring,photourls:[.|tostring]}}' \
  | tcli petstore pet addPet  

we get something like

{“id”:1,”name”:”1”,photoUrls”:[],”tags”:[]}

however, to still keep the pipeline and see intermediate output of what was provided as body to add, something like the following is needed

tcli utils echo -format 'range(1;2) | {body: {id:.,name:.|tostring,photourls:[.|tostring]}}' | tee /tmp/body;tcli petstore pet addPet  < /tmp/body

now we get something like

{“body”: {“id”:1,”name”:”1”,”photoUrls”:[1]}}
{“id”:1,”name”:”1”,”photoUrls”:[],”tags”:[]}

Ask here is to either do

tcli utils echo -format 'range(1;2) | {body: {id:.,name:.|tostring,photourls:[.|tostring]}}' -trace \
| tcli petstore pet addPet  

or add a flag in config.yaml to turn on trace globally so that intermediate results are visible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions