All Projects → helmethair-co → scalatest-junit-runner

helmethair-co / scalatest-junit-runner

Licence: MIT license
JUnit 5 runner for Scalatest

Programming Languages

java
68154 projects - #9 most used programming language
scala
5932 projects
kotlin
9241 projects

Projects that are alternatives of or similar to scalatest-junit-runner

kotest-gradle-plugin
A gradle plugin for Kotest
Stars: ✭ 18 (-40%)
Mutual labels:  test, gradle-plugin, testing-tools
api-test
🌿 A simple bash script to test JSON API from terminal in a structured and organized way.
Stars: ✭ 53 (+76.67%)
Mutual labels:  test, testing-tools, testing-library
Junit Dataprovider
A TestNG like dataprovider runner for JUnit with many additional features
Stars: ✭ 226 (+653.33%)
Mutual labels:  test, junit, testing-tools
PixelTest
Fast, modern, simple iOS snapshot testing written purely in Swift.
Stars: ✭ 56 (+86.67%)
Mutual labels:  test, testing-tools, testing-tool
doc
QuickPerf documentation: https://github.com/quick-perf/doc/wiki/QuickPerf
Stars: ✭ 22 (-26.67%)
Mutual labels:  junit, junit-test
threat9-test-bed
No description or website provided.
Stars: ✭ 26 (-13.33%)
Mutual labels:  test, testing-tools
toster
DSL framework for testing Android apps
Stars: ✭ 31 (+3.33%)
Mutual labels:  testing-tools, testing-library
react-router-testing-utils
A collection of utilities to test React Router with React Testing Library (Work in progress 🚧)
Stars: ✭ 34 (+13.33%)
Mutual labels:  testing-tools, testing-library
Gradle Testsets Plugin
A plugin for the Gradle build system that allows specifying test sets (like integration or acceptance tests).
Stars: ✭ 182 (+506.67%)
Mutual labels:  test, gradle-plugin
Starwars-clean
Simple project with clean architecture
Stars: ✭ 34 (+13.33%)
Mutual labels:  test, junit
mocat
🐈 Mocat is a mocking toolbar that allows you to interactively develop and test network requests.
Stars: ✭ 27 (-10%)
Mutual labels:  testing-tools, testing-library
Fsharp Hedgehog
Release with confidence, state-of-the-art property testing for .NET.
Stars: ✭ 219 (+630%)
Mutual labels:  test, testing-tools
Androidunittest
Save time & clear your unit tests on Android !
Stars: ✭ 205 (+583.33%)
Mutual labels:  test, junit
Hitchhiker
a Restful Api test tool
Stars: ✭ 2,175 (+7150%)
Mutual labels:  test, testing-tools
timber-junit-rule
A highly configurable JUnit Rule that outputs Timber logs to standard output
Stars: ✭ 42 (+40%)
Mutual labels:  junit, junit-test
mock-hls-server
Fake a live/event HLS stream from a VOD one. Useful for testing. Supports looping.
Stars: ✭ 61 (+103.33%)
Mutual labels:  test, testing-tools
jpa-unit
JUnit extension to test javax.persistence entities
Stars: ✭ 28 (-6.67%)
Mutual labels:  test, junit
volder
volder is powerful Object schema validation lets you describe your data using a simple and readable schema and transform a value to match the requirements
Stars: ✭ 106 (+253.33%)
Mutual labels:  testing-tools, testing-tool
Mocktopus
Mocking framework for Rust
Stars: ✭ 179 (+496.67%)
Mutual labels:  test, testing-tools
Video Recorder Java
This library allows easily record video of your UI tests by just putting couple annotations.
Stars: ✭ 179 (+496.67%)
Mutual labels:  test, junit

ScalaTest Junit 5 runner

Tests codecov Maven Central

JUnit 5 runner library for ScalaTest tests. It can be used to fully integrate Scalatest into Gradle (version >= 4.5) and to Maven.

There is an open issue to natively support JUnit 5 in ScalaTest without this library.

Getting Started

Features

  • Running ScalaTest test on the Junit 5 platform
  • Fully integrate ScalaTest into gradle
  • Report individual test runs
  • Report errors to Junit 5 with stack-traces
  • Support ScalaTest tags
  • Optional early stopping after the first test fail

How to use

Gradle

version >= 4.5 This library allows to run scalatest on the new JUnit Platform (JUnit 5) To run Scalatest on the old JUnit Vintage (JUnit 4) platform use the gradle-scalatest Gradle plugin.

Groovy

gradle.properties

scala_lib_version=2.12
scala_version=2.12.10
junit_platform_version=1.6.0

build.gradle

plugins {
    id 'scala'
}

repositories {
    jcenter()
}

dependencies {
    implementation "org.scala-lang:scala-library:$scala_version"

    testImplementation "org.scalatest:scalatest_$scala_lib_version:3.2.0-M3"
    testRuntime "org.junit.platform:junit-platform-engine:$junit_platform_version"
    testRuntime "org.junit.platform:junit-platform-launcher:$junit_platform_version"
    testRuntime "co.helmethair:scalatest-junit-runner:0.1.11"
}

test {
    useJUnitPlatform {
        includeEngines 'scalatest'
        testLogging {
            events("passed", "skipped", "failed")
        }
    }
}

See example Groovy Gradle project

Kotlin DSL

build.gradle.kts

...
tasks {
    test{
        useJUnitPlatform {
            includeEngines("scalatest")
            testLogging {
                events("passed", "skipped", "failed")
            }
        }
    }
}

See example Kotlin DSL Gradle project

Maven

Surefire plugin version >= 2.22.0

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project ...
    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
            <scope>compile</scope>
        </dependency>

        <!-- junit 5 -->
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- scalatest -->
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.compat.version}</artifactId>
            <version>${scalatest.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- scalatest junit 5 runner -->
        <dependency>
            <groupId>co.helmethair</groupId>
            <artifactId>scalatest-junit-runner</artifactId>
            <version>${scalatest.runner.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src/main/scala</sourceDirectory>
        <testSourceDirectory>src/test/scala</testSourceDirectory>
        <plugins>
        ...
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
            </plugin>
            ...
        </plugins>
    </build>
</project>

See example maven project

JUnit console

Add the library to the classpath and run your test

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

We use semantic versioning.

This project is licensed under the MIT License - see the LICENSE for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].