utPLSQL / utPLSQL-maven-plugin

Maven plugin for running Unit Tests with utPLSQL v3
Apache License 2.0
13 stars 11 forks source link

<color>true/false</color> should be supported #27

Closed jgebal closed 6 years ago

jgebal commented 6 years ago

The documentation reporter comes with option to display results in color. It would be good to have that option available in maven plugin

jgarec commented 6 years ago

The activation of color flag seems to be based on a system property, not on a flag in pom.xml

https://github.com/utPLSQL/utPLSQL-maven-plugin/blob/b13cd2a56396d8d3c44427c6f9b58acf8db0bcd8/utplsql-maven-plugin/src/main/java/org/utplsql/maven/plugin/helper/PluginDefault.java#L73-L80

jgebal commented 6 years ago

That's fine. Then the trouble is on my local env as I get color output from maven but reporter output is without color. Probably relovling of color doesn't always work properly.

jgebal commented 6 years ago

Let me try it in several ways. It would probably be worth mentioning this behavior in readme too

jgarec commented 6 years ago

if i force the value, it gives that :

capture d ecran 2018-07-30 a 20 28 41

just need to fix the way we activate (or not) the color.

jgebal commented 6 years ago

Do you get color without forcing it on your machine?

jgarec commented 6 years ago

In this version, you have to set an environment variable before running the plugin : export style.color=always

I don't like this solution. All parameters should be taken from pom.xml or defined with default values if not provided. They shouldn't be taken from system/env properties because i think it adds too much complexity.

jgebal commented 6 years ago

Maven somehow "knows" if it should provide output in color. Maybe we can just check if maven is displaying in color or not.

jgarec commented 6 years ago

You're right, we can ask maven if coloration is activated or not.