Skip to content

Commit

Permalink
#114 provide hierarchical test-name
Browse files Browse the repository at this point in the history
  • Loading branch information
anshooarora committed Feb 1, 2020
1 parent 046c611 commit 63495e0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,14 @@ public static String getRunDuration(Test test) {
public static Long getRunDurationMillis(Test test) {
return test.getEndTime().getTime() - test.getStartTime().getTime();
}

public static String getHierarchicalName(Test test) {
StringBuilder sb = new StringBuilder(test.getName());
while (test.getParent() != null) {
test = test.getParent();
sb.insert(0, test.getName() + ".");
}
return sb.toString();
}

}

0 comments on commit 63495e0

Please sign in to comment.