Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Spek2 alpha1を動かしてみる

Spek2 alpha1を動かしてみる

~海辺でもくもく~集まれKotlin好き!Kotlin愛好会 vol3

Ryo Sakaguchi

August 18, 2018
Tweet

More Decks by Ryo Sakaguchi

Other Decks in Programming

Transcript

  1. 2018.8.18 -
    ©2018 Wantedly, Inc.
    4QFLBMQIB

    Λಈ͔ͯ͠ΈΔ
    dւลͰ΋͘΋͘dू·Ε,PUMJO޷͖ʂ,PUMJOѪ޷ձWPM
    3ZP4BLBHVDIJ !XBLXBL

    View Slide

  2. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ
    ©2018 Wantedly, Inc.
    ݁Ռ͸

    View Slide

  3. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ
    ©2018 Wantedly, Inc.
    ͏͍ͨ͝ʂ

    View Slide

  4. ©2018 Wantedly, Inc.

    View Slide

  5. ©2018 Wantedly, Inc.

    View Slide

  6. ©2018 Wantedly, Inc.
    ηοτΞοϓ

    View Slide

  7. ©2018 Wantedly, Inc.
    buildscript {
    ext.kotlin_version = ‘1.2.60'
    ext.android_junit5_version= '1.2.0.0'
    repositories {
    google()
    jcenter()
    }
    dependencies {
    classpath 'com.android.tools.build:gradle:3.2.0-beta05'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath "de.mannodermaus.gradle.plugins:android-junit5:$android_junit5_version"
    }
    }
    allprojects {
    repositories {
    google()
    jcenter()
    maven { url "https://dl.bintray.com/spekframework/spek-dev" }
    }
    }

    View Slide

  8. ©2018 Wantedly, Inc.
    apply plugin: “de.mannodermaus.android-junit5"
    android {
    testOptions {
    junitPlatform {
    filters {
    engines {
    include 'spek2'
    }
    }
    }
    }
    }
    def spek_version='2.0.0-alpha.1'
    def junit5_runner='0.2.2'
    dependencies {
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek_version"
    testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek_version"
    androidTestRuntimeOnly "de.mannodermaus.junit5:android-instrumentation-test-runner:$junit5_runner"
    }

    View Slide

  9. ©2018 Wantedly, Inc.
    4QFLͱॻ͖ํҧ͏ʁ
    w ଟ෼ͦΜͳʹมΘΒͳ͍
    w EFTDSJCF JU
    w HJWFO͕ݟ౰ͨΒͳ͍
    ͪΌΜͱಈ͘ʁ
    w งғؾಈ͍ͯΔ
    w "OESPJE4UVEJPͷϓϥάΠϯ͸ಈ͔ͳ͔ͬͨ
    w ࠓ·Ͱ+VOJUͰॻ͍ͯͨςετͱͷಉډ͸ઃఆ͕ඞཁ
    ͱΓ͋͑ͣಈ͍ͨ

    View Slide

  10. ©2018 Wantedly, Inc.
    1MVHJOͷ͸ͳ͠

    View Slide

  11. ©2018 Wantedly, Inc.
    https://github.com/spekframework/spek/issues/452
    https://github.com/spekframework/spek/issues/464
    Pluginͷ࿩

    View Slide

  12. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ
    ©2018 Wantedly, Inc.
    <·͊alpha΍͠ͳ…
    Pluginͷ͸ͳ͠

    View Slide

  13. ©2018 Wantedly, Inc.
    ڞଘͷ͸ͳ͠

    View Slide

  14. ©2018 Wantedly, Inc.
    apply plugin: “de.mannodermaus.android-junit5"
    android {
    testOptions {
    junitPlatform {
    filters {
    engines {
    include 'spek2'
    }
    }
    }
    }
    }
    def spek_version='2.0.0-alpha.1'
    def junit5_runner='0.2.2'
    dependencies {
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek_version"
    testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek_version"
    androidTestRuntimeOnly "de.mannodermaus.junit5:android-instrumentation-test-runner:$junit5_runner"
    }

    View Slide

  15. ©2018 Wantedly, Inc.
    apply plugin: “de.mannodermaus.android-junit5"
    android {
    testOptions {
    junitPlatform {
    filters {
    engines {
    include ‘spek2’,‘junit-vintage’
    }
    }
    }
    }
    }
    def spek_version='2.0.0-alpha.1'
    def junit5_runner='0.2.2'
    dependencies {
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    testImplementation 'junit:junit:4.12'
    testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek_version"
    testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek_version"
    testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.2.0"
    androidTestRuntimeOnly "de.mannodermaus.junit5:android-instrumentation-test-runner:$junit5_runner"
    }

    View Slide

  16. ϖʔδλΠτϧ ϖʔδαϒλΠτϧ
    ©2018 Wantedly, Inc.
    ͓ΘΓ
    IUUQTHJUIVCDPNXBLXBL-FBSO4QFL

    View Slide