Skip to content

Commit

Permalink
#187: CR comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
grey-rain committed Sep 7, 2024
1 parent a8e32f2 commit 7c49961
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,10 @@ and add `failsafe.rerunFailingTestsCount` or `surefire.rerunFailingTestsCount` p
In some cases, you may need to customize the test name for BDD Scenario Outlines (for example, to insert parameters into
the test name in ReportPortal). To achieve this, you need to implement the desired customization logic in a class which
implements the `TestNameProvider` interface. This class should then be specified in the `ReportIntegrationConfig`.
For example, if I want to provide ability for test name to insert parameters, I need to do the following
For example, to provide ability for test name to insert parameters, I need to do the following

1. Create class `ParametrizedNameProvider`:

```
public class ParametrizedNameProvider implements TestNameProvider {
Expand All @@ -363,7 +365,9 @@ public class ParametrizedNameProvider implements TestNameProvider {
return result.toString();
}
```

2. Update integration configuration:

```
ReportIntegrationConfig.get().useTestNameTransformer(new ParametrizedNameProvider());
```
Expand Down

0 comments on commit 7c49961

Please sign in to comment.