-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
117 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ain/java/com/github/invictum/reportportal/recorder/DefaultBddOutlineTestNameProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.github.invictum.reportportal.recorder; | ||
|
||
import net.thucydides.model.domain.TestOutcome; | ||
|
||
/** | ||
* Default implementation of name as seen in Serenity. | ||
*/ | ||
public class DefaultBddOutlineTestNameProvider implements TestNameProvider { | ||
|
||
@Override | ||
public String provideName(TestOutcome testOutcome, int scenarioIndex) { | ||
return testOutcome.getName(); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/github/invictum/reportportal/recorder/TestNameProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.github.invictum.reportportal.recorder; | ||
|
||
import net.thucydides.model.domain.TestOutcome; | ||
|
||
/** | ||
* Allows to transform particular test name in ReportPortal according to specific user requirements. | ||
*/ | ||
public interface TestNameProvider { | ||
|
||
/** | ||
* @param testOutcome original test data | ||
* @param scenarioIndex index of scenario which is being reported | ||
* @return transformed test name | ||
*/ | ||
String provideName(TestOutcome testOutcome, int scenarioIndex); | ||
} |