[jira] [Commented] (SUREFIRE-1700) @Disabled is not honored for JUnit5 tests having a single @Test method

2021-12-23 Thread Greg A (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17464697#comment-17464697
 ] 

Greg A commented on SUREFIRE-1700:
--

I've seen this too with junit 5 & surefire 2.22.2.

NB. only test methods whose name starts "test..." seem to be affected. If your 
test methods have a different name you won't be able to reproduce the issue

> @Disabled is not honored for JUnit5 tests having a single @Test method
> --
>
> Key: SUREFIRE-1700
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1700
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.22.2, 3.0.0-M3
>Reporter: Tony Falabella
>Assignee: Tibor Digana
>Priority: Minor
>  Labels: junit5
> Attachments: surefire-1700.zip
>
>
> JUnit5's {{@Disabled}} should ignore/skip running any test method with that 
> annotation.  It seems however that if there is a single {{@Test}} method with 
> {{@Disabled}} that test method will still be run. 
> Similar issue noted on StackOverflow: 
> [https://stackoverflow.com/questions/52602351/junit-5-disabled-is-ignored]
> 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(); }
> }
>   
> Sample pom.xml (this is a multi-module pom that also has child modules of a 
> parent).  The test above is in a child project.
>  
>  
> 
>  
>  
>  
>  
>  org.apache.maven.plugins
>  maven-surefire-plugin
>  
>  2.22.0
>  ...
>  
> 
>  ...
>  
>  org.junit.jupiter
>  junit-jupiter-engine
>  
>  compile
>  
>  
>  org.mockito
>  mockito-junit-jupiter
>  test
>  
>  
>  
>  org.junit.platform
>  junit-platform-launcher
>  test
>  
>  
>  
>  org.junit.vintage
>  junit-vintage-engine
>  test
>  
>  
>   
> Note that I've also tried this both with{{ junit-vintage-engine}} and without 
> it (not sure if it would matter) and the issue still happens.
> This is affecting IntelliJ as well as noted here:
> [https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006399720-IDEA-2019-2-2-Ultimate-Edition-ignores-Disabled-for-JUnit5-tests-having-a-single-Test-method]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (SUREFIRE-1700) @Disabled is not honored for JUnit5 tests having a single @Test method

2019-10-29 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16962614#comment-16962614
 ] 

Tibor Digana commented on SUREFIRE-1700:


I wrote the project with Spring boot test and attached it in Jira.
This project works for me with 3.0.0-SNAPSHOT and cannot reproduce the issue.


{noformat}
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 4.484 
s - in pkg.MyTest
[INFO] 
[INFO] Results:
[INFO] 
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1
[INFO] 
[INFO] 
[INFO] BUILD SUCCESS
{noformat}


> @Disabled is not honored for JUnit5 tests having a single @Test method
> --
>
> Key: SUREFIRE-1700
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1700
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.22.2, 3.0.0-M3
>Reporter: Tony Falabella
>Priority: Minor
>  Labels: junit5
>
> JUnit5's {{@Disabled}} should ignore/skip running any test method with that 
> annotation.  It seems however that if there is a single {{@Test}} method with 
> {{@Disabled}} that test method will still be run. 
> Similar issue noted on StackOverflow: 
> [https://stackoverflow.com/questions/52602351/junit-5-disabled-is-ignored]
> 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(); }
> }
>   
> Sample pom.xml (this is a multi-module pom that also has child modules of a 
> parent).  The test above is in a child project.
>  
>  
> 
>  
>  
>  
>  
>  org.apache.maven.plugins
>  maven-surefire-plugin
>  
>  2.22.0
>  ...
>  
> 
>  ...
>  
>  org.junit.jupiter
>  junit-jupiter-engine
>  
>  compile
>  
>  
>  org.mockito
>  mockito-junit-jupiter
>  test
>  
>  
>  
>  org.junit.platform
>  junit-platform-launcher
>  test
>  
>  
>  
>  org.junit.vintage
>  junit-vintage-engine
>  test
>  
>  
>   
> Note that I've also tried this both with{{ junit-vintage-engine}} and without 
> it (not sure if it would matter) and the issue still happens.
> This is affecting IntelliJ as well as noted here:
> [https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006399720-IDEA-2019-2-2-Ultimate-Edition-ignores-Disabled-for-JUnit5-tests-having-a-single-Test-method]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1700) @Disabled is not honored for JUnit5 tests having a single @Test method

2019-10-26 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16960381#comment-16960381
 ] 

Tibor Digana commented on SUREFIRE-1700:


[~tfalabella]
Pls check my answers for you on the Stackoverflow. I replied to you there as 
well. Pls try to use the snapshot version and let us know how it is. 
Additionally you can write integration test in Surefire on GitHub. I would be 
very glad because this vould be transparent. Talking about issues on 
Stackoverflow about new issues does not solve anything. You have to tell us! 
Without it, nothing would be possible. 

If the issue would be visible, I will ask you to contribute on GitHub with 
integration test at least.
if the issue does not exist with snapshot version, then tell me and I will 
close this issue in Jira.

> @Disabled is not honored for JUnit5 tests having a single @Test method
> --
>
> Key: SUREFIRE-1700
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1700
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.22.2, 3.0.0-M3
>Reporter: Tony Falabella
>Priority: Minor
>  Labels: junit5
>
> JUnit5's {{@Disabled}} should ignore/skip running any test method with that 
> annotation.  It seems however that if there is a single {{@Test}} method with 
> {{@Disabled}} that test method will still be run. 
> Similar issue noted on StackOverflow: 
> [https://stackoverflow.com/questions/52602351/junit-5-disabled-is-ignored]
> 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(); }
> }
>   
> Sample pom.xml (this is a multi-module pom that also has child modules of a 
> parent).  The test above is in a child project.
>  
>  
> 
>  
>  
>  
>  
>  org.apache.maven.plugins
>  maven-surefire-plugin
>  
>  2.22.0
>  ...
>  
> 
>  ...
>  
>  org.junit.jupiter
>  junit-jupiter-engine
>  
>  compile
>  
>  
>  org.mockito
>  mockito-junit-jupiter
>  test
>  
>  
>  
>  org.junit.platform
>  junit-platform-launcher
>  test
>  
>  
>  
>  org.junit.vintage
>  junit-vintage-engine
>  test
>  
>  
>   
> Note that I've also tried this both with{{ junit-vintage-engine}} and without 
> it (not sure if it would matter) and the issue still happens.
> This is affecting IntelliJ as well as noted here:
> [https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006399720-IDEA-2019-2-2-Ultimate-Edition-ignores-Disabled-for-JUnit5-tests-having-a-single-Test-method]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SUREFIRE-1700) @Disabled is not honored for JUnit5 tests having a single @Test method

2019-10-17 Thread Tibor Digana (Jira)


[ 
https://issues.apache.org/jira/browse/SUREFIRE-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16953924#comment-16953924
 ] 

Tibor Digana commented on SUREFIRE-1700:


[~tfalabella]
Use the latest snapshot version and repository as it is described in 
https://issues.apache.org/jira/browse/SUREFIRE-1584?focusedCommentId=16951759=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16951759
and let me know if the development version works for you. We have a unit test 
with {{@Disable}} .

> @Disabled is not honored for JUnit5 tests having a single @Test method
> --
>
> Key: SUREFIRE-1700
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1700
> Project: Maven Surefire
>  Issue Type: Bug
>  Components: Maven Failsafe Plugin, Maven Surefire Plugin
>Affects Versions: 2.22.2, 3.0.0-M3
>Reporter: Tony Falabella
>Priority: Minor
>  Labels: junit5
>
> JUnit5's {{@Disabled}} should ignore/skip running any test method with that 
> annotation.  It seems however that if there is a single {{@Test}} method with 
> {{@Disabled}} that test method will still be run. 
> Similar issue noted on StackOverflow: 
> [https://stackoverflow.com/questions/52602351/junit-5-disabled-is-ignored]
> 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(); }
> }
>   
> Sample pom.xml (this is a multi-module pom that also has child modules of a 
> parent).  The test above is in a child project.
>  
>  
> 
>  
>  
>  
>  
>  org.apache.maven.plugins
>  maven-surefire-plugin
>  
>  2.22.0
>  ...
>  
> 
>  ...
>  
>  org.junit.jupiter
>  junit-jupiter-engine
>  
>  compile
>  
>  
>  org.mockito
>  mockito-junit-jupiter
>  test
>  
>  
>  
>  org.junit.platform
>  junit-platform-launcher
>  test
>  
>  
>  
>  org.junit.vintage
>  junit-vintage-engine
>  test
>  
>  
>   
> Note that I've also tried this both with{{ junit-vintage-engine}} and without 
> it (not sure if it would matter) and the issue still happens.
> This is affecting IntelliJ as well as noted here:
> [https://intellij-support.jetbrains.com/hc/en-us/community/posts/360006399720-IDEA-2019-2-2-Ultimate-Edition-ignores-Disabled-for-JUnit5-tests-having-a-single-Test-method]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)