From 7c499618df9c54264bcacf7a4a3525c07e8b570a Mon Sep 17 00:00:00 2001 From: Daria Yershova Date: Fri, 6 Sep 2024 21:43:01 -0500 Subject: [PATCH] #187: CR comments addressed --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98540a3..e792235 100644 --- a/README.md +++ b/README.md @@ -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 { @@ -363,7 +365,9 @@ public class ParametrizedNameProvider implements TestNameProvider { return result.toString(); } ``` + 2. Update integration configuration: + ``` ReportIntegrationConfig.get().useTestNameTransformer(new ParametrizedNameProvider()); ```