You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Qingtian Wang (Jira)" <ji...@apache.org> on 2021/03/08 17:50:00 UTC
[jira] [Created] (NETBEANS-5428) JUnit annotations not working in
Maven projects
Qingtian Wang created NETBEANS-5428:
---------------------------------------
Summary: JUnit annotations not working in Maven projects
Key: NETBEANS-5428
URL: https://issues.apache.org/jira/browse/NETBEANS-5428
Project: NetBeans
Issue Type: Bug
Components: java - JUnit
Affects Versions: 12.2
Environment: Windows 10 64-bit
JDK 15
NetBeans 12.2
Reporter: Qingtian Wang
Attachments: Screenshot 2021-03-08 114834.png
For example, the @BeforeEach and @AfterEach mothed are not run. Steps to reproduce:
# Add new Java Maven project by clicking on the + button on the upper left screen
# Create a new Java class, and write some public method to test.
# Create corresponding JUnit test class by clicking key short ctrl-alt-t. Keep all defaults for the test class generation.
# Uncomment the @Test method generated.
# Add some debug sout message in the @BeforeEach method generated.
# Run the test case.
Expected result: The debug message in @BeforeEach method should print.
Real result: No debug message printed, indicating the @BeforeEach annotation is not recognized, and the setup method not run.
The problem is not limited to @BeforeEach only. Other JUnit 5 annotations have similar problem.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists