sbt-junit


License

License

Categories

Categories

JUnit Unit Testing
GroupId

GroupId

com.dadrox
ArtifactId

ArtifactId

sbt-junit_2.10
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

sbt-junit
sbt-junit
Project URL

Project URL

https://github.com/dadrox/sbt-junit
Project Organization

Project Organization

com.dadrox
Source Code Management

Source Code Management

https://github.com/dadrox/sbt-junit

Download sbt-junit_2.10

How to add to project

<!-- https://jarcasting.com/artifacts/com.dadrox/sbt-junit_2.10/ -->
<dependency>
    <groupId>com.dadrox</groupId>
    <artifactId>sbt-junit_2.10</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.dadrox/sbt-junit_2.10/
implementation 'com.dadrox:sbt-junit_2.10:0.1'
// https://jarcasting.com/artifacts/com.dadrox/sbt-junit_2.10/
implementation ("com.dadrox:sbt-junit_2.10:0.1")
'com.dadrox:sbt-junit_2.10:jar:0.1'
<dependency org="com.dadrox" name="sbt-junit_2.10" rev="0.1">
  <artifact name="sbt-junit_2.10" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.dadrox', module='sbt-junit_2.10', version='0.1')
)
libraryDependencies += "com.dadrox" % "sbt-junit_2.10" % "0.1"
[com.dadrox/sbt-junit_2.10 "0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.10.0-RC5
junit : junit-dep jar 4.10
org.scala-tools.testing : test-interface jar 0.5

Project Modules

There are no modules declared in this project.

SBT Junit Interface

This is an implementation of the testing-interface for SBT, that focuses on making junit test output useful.

Most output is suppressed, and more can be enabled, if desired.

Short stack traces for test failures are enabled by default.

Usage

Dependency

Add "com.dadrox" % "sbt-junit" % "0.3.1" % "test" to your dependencies.

Add to your build

Add testFrameworks += new TestFramework("com.dadrox.sbt.junit.JunitFramework") to your build.sbt

Or testFrameworks += new TestFramework("com.dadrox.sbt.junit.JunitFramework") to your full configuration.

Configuration

Default test options can be added to your full build configuration like this:

testOptions in Test += Tests.Argument(framework, "-vo", "-tv")

System properties can be used to enable settings for specific contexts, such as Continuous Integration (recommended):

> sbt -Dsbt.reports.traces.short= test

test-only and test-quick allow you to provide test options on the fly:

> sbt "test-only [test suite pattern] -- -td -vss"

sbt> test-quick [test suite pattern] -- -vts

To see your printlns in your tests and code:

> sbt "test-only -- -vo" // runs all tests

> sbt "test-only [test suite pattern] -- -vo"

sbt> test-only [test suite pattern] -- -vo

Options

<Long option>          <Short> <System Property>

--no-color             -nc     -Dsbt.log.noformat=true
    Disable color output.
    It's usually better to completely disable colors in sbt output with -Dsbt.log.noformat=true
    
--verbose-output       -vo     -Dsbt.reports.verbose.output=     
   Log test stdout/err inline at info level.
   
--verbose-traces       -tv     -Dsbt.reports.traces.verbose=
  Log full test failure stacktraces at error level.
  
--disable-traces       -td     -Dsbt.reports.traces.disable=
    Log shortened test failure stacktraces at error level.
    
--verbose-test-start   -vts    -Dsbt.reports.verbose.test.start=
    Log "Test Started" messages at info rather than debug.
    
--verbose-test-pass    -vtp    -Dsbt.reports.verbose.test.pass=
    Log "Test Passed" messages at info rather than debug.
    
--verbose-suite-start  -vss    -Dsbt.reports.verbose.suite.start=
    Log "Test Suite Started" messages at info rather than debug.

Compatibility

Now implemented in Java, so should work with all version of Scala and SBT.

Known Issues

  • There is no way to create list of all failed suites/test to log at the end of the test run.

License

Copyright (C) 2012-2013, Christopher Wood (dadrox)

Published under BSD 2-Clause License

Versions

Version
0.1