Actually need to get SubFolder name using Test ID which is present under
Test Plan > Subject > Sample(Folder Name) > Scenario (Sub Folder) > TC1 (Test- BPT)
I need to retrieve Scenario
as subfolder name using TestID
Here is my code
ITestSetTreeManager tstm = tdc.testSetTreeManager().queryInterface(ITestSetTreeManager.class);
ITestSetFolder tsf = tstm.nodeByPath("Root\\Lab").queryInterface(ITestSetFolder.class);
IList testSets = tsf.findTestSets("Regression", false, "");
for (Com4jObject testSetObj : testSets)
{
ITestSet testSet = testSetObj.queryInterface(ITestSet.class);
System.out.println(testSet.name());
IBaseFactory testFactory = testSet.tsTestFactory().queryInterface(IBaseFactory.class);
IList testInstances = testFactory.newList("");
for (Com4jObject testInstanceObj : testInstances)
{
ITSTest testInstance = testInstanceObj.queryInterface(ITSTest.class);
System.out.println(testInstance.testName());
Object ID = testInstance.testId();
System.out.println(ID.toString());
}
}
Using ID object I could be able to retrieve TestId
and also I need to retrieve the sub folder name.
For that tried with TS_SUBJECT but it fails
Can anyone share your views on fetching sub folder name / TS_SUBJECT field value.
Finally retrieved the Folder (Sub folder) name of current Business Process Test by using
ISubjectNode
using java Com4jObject