I want to disable colors in output from tests run from postman cli, since I run them from Jenkins, and itβs only making a lot of noice in the log there.
Running βpostman collection run -hβ i get documentet that ββcolor offβ will remove the colors
But when i try to run the command-line βpostman collection run β¦ --color off -e β¦β I do still get color-codes. Here is a small example from the generated output:
Thereβs been no response on this from anyone since it was requested. I have tried multiple options to remove the useless (in a log file) garbage escape codes and no options appear to remove them.
Iβve used test runners like this in the past - the typicaly output formats are far more useful, including the ones used by multiple CI/CD tools such as Azure DevOps build pipelines:
NxUnit / JUnit - an XML-based output format that renders well in modern build pipes
At a guess this is due to Postman themselves trying to force people to use the GUI rather than command line. Given that the GUI only permits 25 calls per month, a number useless for normal daily development where test suites are run at least once per day, this forces users to purchase the FULL USD $396 payment yearly.
In short: the Postman CEO or business staff deliberately crippled this function to force their users to pay a monthly fee. Itβs not a bug - itβs a feature.
Is this specific to Jenkins?
Itβs not a tool that I use but it looks like Jenkins interprets the table differently (based on the original screenshot)β¦ have you tried Newman? does that produce the same?
At first glance, it looks like the final βfailureβ/βdetailβ string is the only coloring that is still being output. But if you open the output in an editor, you can see that the ascii-art-table still has all the escape sequences in it, too. E.g., having piped the --color off rendition to a file, when I open that in my editor, I can see all of the escape sequences that are still there:
Bottom line, --color off appears to be omitting some escape sequences, but not all.
For now, I do a regex replacement of [\x1b]\[\d+m with an empty string and it gets rid of these extraneous escape sequences, but it is annoying to have any escape sequences in the output when we do --color off.