You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With TestNG the @Test annotation can be placed on a class instead of the method. In this case all public void methods are considered tests even if they are not annotated.
Example:
@Test
public class TestNGTest {
public void test1() {
System.out.println("Test 1");
}
public void test2() {
System.out.println("Test 2");
}
private void privateMethod() {
System.out.println( "Not a test" );
}
}
Currently there does not appear to be any way to run a test unless it is explicitly annotated. Right clicking and selecting Run just pops up an alert with No tests in file: .... No code lens appear at either class or method level. No tests appear under the class in the Test panel.
The text was updated successfully, but these errors were encountered:
Consider adding support for TestNG class level annotations.
https://testng.org/doc/documentation-main.html#class-level
With TestNG the
@Test
annotation can be placed on a class instead of the method. In this case allpublic void
methods are considered tests even if they are not annotated.Example:
Currently there does not appear to be any way to run a test unless it is explicitly annotated. Right clicking and selecting
Run
just pops up an alert withNo tests in file: ...
. No code lens appear at either class or method level. No tests appear under the class in the Test panel.The text was updated successfully, but these errors were encountered: