Endava / cats

CATS is a REST API Fuzzer and negative testing tool for OpenAPI endpoints. CATS automatically generates, runs and reports tests with minimum configuration and no coding effort. Tests are self-healing and do not require maintenance.
Apache License 2.0
1.17k stars 74 forks source link

How disable colorization in non terminal system? #24

Closed comat0zz closed 2 years ago

comat0zz commented 2 years ago

Is it possible to disable colorization in the output? When it is displayed in the terminal, everything is fine, but when it is displayed on a page, for example, jenkins, then a lot of unnecessary things are visible, which makes it difficult to navigate.

Example: [*Test 376*][VLVIFF*] ● note Path /signDocument has the following headers: null  [*Test 376*][VLVIFF*] ● note Headers that should be added to all paths: null  [*Test 376*][VLVIFF*] ● note Path reference data replacement: path /signDocument has the following reference data: {}  [*Test 376*][VLVIFF*] ● note Final list of request headers: [CatsRequest.Header(name=Accept, value=application/json), CatsRequest.Header(name=Content-Type, value=application/json)]  [*Test 376*][VLVIFF*] ● note Final payload:

en-milie commented 2 years ago

Hi @comat0zz. This is available in https://github.com/Endava/cats/commit/a4f8e7799211fb276ffb8486b4922008d246a9fc In order to disable ANSI formatting, you need to set the NO_COLOR system variable (with any value).

export NO_COLOR=true

CATS will output plaint text with no formatting.

comat0zz commented 2 years ago

Thx :+1: