maiflai / gradle-scalatest

A plugin to enable the use of scalatest in a gradle Scala project.
The Unlicense
73 stars 35 forks source link

IDEA console ANSI color render #91

Closed pan3793 closed 3 years ago

pan3793 commented 3 years ago

Hi, I'm using this plugin on my project with IDEA, but found the issue about ANSI color when click run button from IDE.

So, should I tune some configuration to make color render correctly? Or can I disable gradle-scalatest ANSI color ouput?

Starting Gradle Daemon...
Gradle Daemon started in 684 ms

> Task :xenon-common:xenon-common-spark:compileJava UP-TO-DATE
> Task :xenon-common:xenon-common-spark:compileScala UP-TO-DATE
> Task :xenon-common:xenon-common-spark:processResources NO-SOURCE
> Task :xenon-common:xenon-common-spark:classes UP-TO-DATE
> Task :xenon-common:xenon-common-spark:jar UP-TO-DATE
> Task :xenon-ng:xenon-ng-spark:compileJava NO-SOURCE
> Task :xenon-ng:xenon-ng-spark:compileScala UP-TO-DATE
> Task :xenon-ng:xenon-ng-spark:processResources UP-TO-DATE
> Task :xenon-ng:xenon-ng-spark:classes UP-TO-DATE
> Task :xenon-ng:xenon-ng-spark:compileTestJava NO-SOURCE
> Task :xenon-ng:xenon-ng-spark:compileTestScala
> Task :xenon-ng:xenon-ng-spark:processTestResources
> Task :xenon-ng:xenon-ng-spark:testClasses
> Task :xenon-ng:xenon-ng-spark:test
Discovery starting.
Discovery completed in 90 milliseconds.
Run starting. Expected test count is: 1
10
BsonTest:
- parse mongo shake json as bson (41 milliseconds)
Run completed in 194 milliseconds.
Total number of tests run: 1
Suites: completed 2, aborted 0
Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
All tests passed.
pan3793 commented 3 years ago

@maiflai Any suggestion?

maiflai commented 3 years ago

I think this is a duplicate of the open issue https://github.com/maiflai/gradle-scalatest/issues/69?

In my opinion the IDE should instruct Gradle that it requires plain ASCII output, and then this plugin will respect its wishes.

Alternatively you might consider using https://github.com/helmethair-co/scalatest-junit-runner. It takes an approach that is more compatible with IDE integration.