Closed qtran-n4 closed 6 years ago
@meysholdt
Go to Xpect method
is added However, the following does not work:
Go to File
because these are implementations of JDT JUnit.@meysholdt Good catch Moritz. I am stuck then :( How can we calculate the URI to an Xpect method while providing short labels for Xpect methods in the ResultView tree. Any idea?
To run an individual test maybe Xpect could filter out all sibling tests but keep the parent test suites. However, if we're unlucky Xpect does this already and it's JDT that removes the parent test suites.
It's JDT that does not create a TestSuiteElement node if a single Xpect test is executed (cf. TestRunSession#createTestElement
)
public TestElement createTestElement(TestSuiteElement parent, String id, String testName, boolean isSuite, int testCount) {
TestElement testElement;
if (isSuite) {
TestSuiteElement testSuiteElement= new TestSuiteElement(parent, id, testName, testCount);
testElement= testSuiteElement;
if (testCount > 0)
fIncompleteTestSuites.add(new IncompleteTestSuite(testSuiteElement, testCount));
} else {
testElement= new TestCaseElement(parent, id, testName);
}
fIdToTest.put(id, testElement);
return testElement;
}
@meysholdt I have included in resource URI in the labels for Xpect test methods. For readability, I show the Xpect test method name + optional comment on the right hand side and put the resource URI inside a special brackets.
@yoosiba @meysholdt Please have a second look
Task: https://github.com/eclipse/Xpect/issues/224