Answer:
Use
ITestResult
, ITestContext
and IMethodInstance
which can give you class name and method name which are using.for (ITestResult testResult : testResultSet) {
String methodName = testResult.getName() + "(";
for (Object arg : testResult.getParameters()) {
methodName += arg == null ? "" : arg.toString() + ", ";
}
uniqueMethodMap.add(testResult.getName());
methodList.add(testResult.getParameters().length > 0 ? methodName.substring(0, methodName.length() - 2) + ")" : methodName + ")");
}
No comments:
Post a Comment