Skip to content

Commit

Permalink
Merge pull request #48 from zebrunner/#47
Browse files Browse the repository at this point in the history
return opportunity to change name of test dir
  • Loading branch information
vdelendik authored Dec 5, 2022
2 parents 500420c + c710be1 commit 5853176
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import com.qaprosoft.carina.core.foundation.utils.R;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -87,9 +88,9 @@ public void feature(PickleWrapper pickleWrapper, FeatureWrapperCustomName featur
} else {
testName = CucumberNameResolver.prepareTestName(STR_FORMAT_TEST_FOLDER_NAME, pickleWrapper, featureWrapper.getFeatureWrapper());
}

// commented renaming report folder
// ReportContext.setCustomTestDirName(testName);
if(R.CONFIG.getBoolean("custom_testdir_naming")) {
ReportContext.setCustomTestDirName(testName);
}
testNamesList.add(testName);
this.testNGCucumberRunner.runScenario(pickleWrapper.getPickle());
// think about catching IllegalStateException
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# determines whether the ability to set a custom test directory (report folder) name is enabled
custom_testdir_naming=false

0 comments on commit 5853176

Please sign in to comment.