Gradle project running jUnit 5 tests in IntelliJ
<p>I am trying both Gradle and jUnit5 right now. Everything works fine except that I cannot run a specific jUnit test. The "Run 'SampleTest'" option does not appear when I right-click a test class.</p>

<p>I have the latest version of IntelliJ (2016.1.3) Ultimate. Here is my <code>build.gradle</code> file:</p>

<pre><code>repositories {
    mavenCentral()
}

apply plugin: 'java'

version = '1.0.0-SNAPSHOT'

jar {
    baseName = 'test-project'
}

dependencies {
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.0.0-M1'
}
</code></pre>

<p>The project structure is the standard one (like in Maven). And here is an example of a test:</p>

<pre><code>package com.test;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class SampleTest {
  @Test public void sampleTest() {
    int test = 1;
    Assertions.assertTrue(test == 1);
  }
}
</code></pre>

<p>What am I missing?</p>

<p><strong>EDIT:</strong></p>

<p>It seems that Gradle is not picking up my test either. When I go to <code>build/reports/tests/index.html</code>, it indicates 0 test.</p>

<p><strong>FINAL EDIT:</strong></p>

<p>Following @dunny's answer, here is what I did to make everything work. I modified my <code>build.gradle</code> file like this:</p>

<pre><code>buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M1'
    }
}

repositories {
    mavenCentral()
}

apply plugin: 'java'
apply plugin: 'org.junit.platform.gradle.plugin'

version = '1.0.0-SNAPSHOT'

jar {
    baseName = 'test-project'
}

dependencies {
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.0.0-M1'
    testCompile group: 'org.junit.platform', name: 'junit-platform-runner', version: '1.0.0-M1'
    testCompile group: 'junit', name: 'junit', version: '4.12'
    testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.0.0-M1'
}

test {
    testLogging {
        events 'started', 'passed'
    }
}
</code></pre>

<p>In IntelliJ, I then opened the Gradle window, and clicked on the "refresh all gradle projects" button, to refresh the libraries.</p>

<p>Then in my test class, I added <code>@RunWith(JUnitPlatform.class)</code> on top of the class declaration.</p>

<p>And when I do a <code>gradle build</code>, the results are available here: <code>build\test-results\junit-platform\TEST-junit-jupiter.xml</code></p>