Conversation
...rosoft.java.test.plugin/src/main/java/com/microsoft/java/test/plugin/util/TestItemUtils.java
Show resolved
Hide resolved
target's outFiles array in the "launch.json" file to match the "Launch Tests (maven-junit)" target
jdneo
left a comment
There was a problem hiding this comment.
Just some small pieces.
BTW, I noticed that you deleted the changes in junit5/AppTest. I suggest keeping that. Although we covered it in the test cases but imagine if the output format of the test runner changes, we can still leverage it to do some quick manual verification.
I'll go ahead and bring the changes back then |
|
I tested the change for TestNG project. looks like there is some problem parsing the test suite: See: Now the method name will contain the parameter types, but I found that TestNG has some problem if the method name contains parameter types. (It cannot find the test method in this case) One quick workaround can change the return statement to
You can use the following test class to verify: import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class CharUtilsTest {
@DataProvider
public Object[][] ValidDataProvider() {
return new Object[][]{
{ 'A', 65 },{ 'a', 97 },
{ 'B', 66 },{ 'b', 98 },
{ 'C', 67 },{ 'c', 99 },
{ 'D', 68 },{ 'd', 100 },
{ 'Z', 90 },{ 'z', 122 },
{ '1', 49 },{ '9', 517 }
};
}
@Test(dataProvider = "ValidDataProvider")
public void CharToASCIITest(final char character, final int ascii) {
int result = CharUtils.CharToASCII(character);
Assert.assertEquals(result, ascii);
}
@Test
public void CharToASCIITest() {
Assert.assertEquals(1, 2);
}
} |
Just made some updates to resolve this issue with testng tests. |
Fixes #1517
Solution Description
When creating test IDs for TestNG and JUnit5 tests, the method parameters are included in the test IDs. This allows for multiple tests of the same name to be correctly identified on the server and the client.