IDEA 2019.2.2 (Ultimate Edition) ignores @Disabled for JUnit5 tests having a single @Test method

Answered

I'm using IDEA 2019.2.2 (Ultimate Edition) and it ignores `@Disabled` for JUnit5 tests having a single `@Test` method when running something like "All Tests".

IntelliJ IDEA 2019.2.2 (Ultimate Edition)
Build #IU-192.6603.28, built on September 6, 2019
Runtime version: 11.0.3+12-b304.56 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1
GC: ParNew, ConcurrentMarkSweep
Memory: 4029M
Cores: 8
Registry: compiler.automake.allow.when.app.running=true
Non-Bundled Plugins: Batch Scripts Support, CMD Support, Insert Final Modifier, Lombook Plugin, MyBatisLogPlugin, String Manipulation, google-java-format, com.atlassian.bitbucket.references, ink.organics.pojo2json, io.codearte.props2yaml, io.protostuff.protostuff-jetbrains-plugin, liwey.Json2PojoWithLombok, mobi.hsz.idea.gitignore, cn.wuzhizhan.plugin.mybatis, MavenRunHelper, com.intellij.plugin.adernov.powershell, Pythonid, com.vladsch.idea.multimarkdown, org.sonarlint.idea

 

The issue is similar to what's noted here: https://stackoverflow.com/questions/52602351/junit-5-disabled-is-ignored

I've tried running both from right-clicking a class and from Run/Debug Configurations > JUnit > All in package and both have the issue.

 

Sample class

package xxx;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit.jupiter.SpringExtension;

import static org.assertj.core.api.Assertions.assertThat;

@ExtendWith(SpringExtension.class)
@SpringBootTest(classes = XyzBoot.class)
public class MyTest {

@Test
@Disabled
public void testSomething() {
assertThat(true).isTrue();
}
}

 

3 comments
Comment actions Permalink

Hello,

Please tell if the issue is reproduced for you with IntelliJ IDEA 2019.3 (https://www.jetbrains.com/idea/nextversion/) when you run all tests in package? Thank you 

0
Comment actions Permalink

Olga Klisho - do you mean 2019.2.3 Build 192.681714 ?  I don't see a 2019.3 yet.

0
Comment actions Permalink

I mean EAP version, you may find it by link:

https://www.jetbrains.com/idea/nextversion/

0

Please sign in to leave a comment.