开发者

How to get pretty output from specs+scalacheck with maven?

开发者 https://www.devze.com 2023-01-29 04:58 出处:网络
When I run Specs + Scalacheck tests with IDEA, I get nice pretty output: Specification \"CoreSpec\" The core grammar should

When I run Specs + Scalacheck tests with IDEA, I get nice pretty output:

  Specification "CoreSpec"
    The core grammar should
    + parse any encoded string
    + fail to parse an empty encoded string
    + parse an expected empty string
    + fail on a non-empty string when expecting an empty string
    + parse well-formed coordinates

In order to get my tests to run with maven, I have the usual:

class CoreSpecTest extends JUnit4(CoreSpec)

...but then the output is not very satisfying:

Running CoreSpecTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.782 sec

Results :

Tests run: 5, Failures: 0, Errors: 0, Skipped: 0

开发者_如何学CIs there a way to get the pretty output in this case?

Thanks...


I have some workaround for my project:

f.e. I have specs

class SomeSpec extends HtmlSpecification with Textile { .... }

class Some2Spec extends HtmlSpecification with Textile { .... }

also I have Junit test like this

@Test class AppTest {

@Test
def testOk = {}

@Test
def printSpecs  {
    (new SomeSpec).reportSpecs
    (new Some2Spec).reportSpecs
}   

}

I know that this is not good solution, so I think that the best is to migrate from maven to sbt.

0

精彩评论

暂无评论...
验证码 换一张
取 消