Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support embedding JUnit test methods #22

Open
alexander-yevsyukov opened this issue Jul 31, 2020 · 0 comments
Open

Support embedding JUnit test methods #22

alexander-yevsyukov opened this issue Jul 31, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@alexander-yevsyukov
Copy link
Collaborator

alexander-yevsyukov commented Jul 31, 2020

Currently, the command does not allow to embed a JUnit test method starting from the @Test annotation. Test suites usually have more than one test method. We cannot reference a method having start="@Test".

The annotation which follows @Test is usually @DisplayName("value"). Although, display names are usually unique within a test suite, it is not possible to reference the start of the method using start="@Test*@DisplayName(\"value\")". This is so because start assumes that it's only one line number, not a sequence of numbers. That's why matching for the above start value fails.

A workaround for this problem is to put @DisplayName on the same line with @Test. This is what I did, but it's not customary in Java to put several method annotations on the same line.

We need to either be able to reference methods by their names (including references to the nested classes) OR support multi-line reference in start and end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant