Code Monkey home page Code Monkey logo

android-junit5's Introduction

android-junit5

Travis Build Status

A Gradle plugin that allows for the execution of JUnit 5 unit tests in Android environments.

Download

buildscript {
    dependencies {
        classpath "de.mannodermaus.gradle.plugins:android-junit5:1.0.0-M6"
    }
}

Snapshots of the development version are available through Sonatype's snapshots repository.

Setup

apply plugin: "com.android.application"
apply plugin: "de.mannodermaus.android-junit5"

dependencies {
    testApi junitJupiter()

    // (Optional) If you need "parameterized tests"
    testApi junitParams()
}

Usage

This plugin configures the junitPlatform task for each registered build variant of a project. It automatically attaches both the Jupiter & Vintage Engines during the execution phase of your tests.

More instructions on how to write JUnit 5 tests can be found in their User Guide. Furthermore, this repository provides a small showcase of the functionality provided by JUnit 5 here.

Extras

Inside the configuration closure applied by the plugin, you can specify the same properties as you would for a Java-based project with the JUnit Platform Gradle plugin. However, there are some additional properties that you can apply:

junitPlatform {
    // The JUnit Jupiter dependency version to use; matches the platform's milestone by default
    jupiterVersion "5.0.0-M6"
    // The JUnit Vintage Engine dependency version to use; matches the platform's milestone by default
    vintageVersion "4.12.0-M6"
}

android-junit5's People

Contributors

mannodermaus avatar aurae avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.