You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Stig Rohde Døssing (JIRA)" <ji...@apache.org> on 2018/11/12 14:37:00 UTC
[jira] [Created] (NETBEANS-1663) JUnit 5 run single test does not
work for @ParameterizedTest, and go to source from test results doesn't
work for these tests
Stig Rohde Døssing created NETBEANS-1663:
--------------------------------------------
Summary: JUnit 5 run single test does not work for @ParameterizedTest, and go to source from test results doesn't work for these tests
Key: NETBEANS-1663
URL: https://issues.apache.org/jira/browse/NETBEANS-1663
Project: NetBeans
Issue Type: Bug
Components: java - JUnit
Affects Versions: 10.0
Reporter: Stig Rohde Døssing
Assignee: Stig Rohde Døssing
In https://issues.apache.org/jira/browse/NETBEANS-6 some code was added that decides whether a code is a JUnit 5 test or not, by whether its annotation has {{@Testable}}
as a "parent" (for lack of a better term). This is too conservative, {{@Testable}} is a meta-annotation and can appear anywhere in the parent hierarchy for test method annotations. For example, {{@ParameterizedTest}} has {{@TestTemplate}} as a parent, which has {{@Testable}} as a parent.
The code should be updated to look through the entire annotation hierarchy to figure out if {{@Testable}} appears as a parent.
Also when a {{@ParameterizedTest}} is run, and the test results window is used to go to the test method, the IDE throws an exception. This happens because the test name of a parameterized test is e.g. "myMethod{myParamType}[0]", rather than just "myMethod". The lookup code assumes that the test name will appear verbatim in the source.
I think it makes sense to differentiate between the display name of a test method, and the actual method name. Adjusting org.netbeans.modules.gsf.testrunner.api.Testcase to allow this would let us fix this issue, while also making it easier to implement support for e.g. https://junit.org/junit5/docs/5.0.3/api/org/junit/jupiter/api/DisplayName.html at a later date.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
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