@Test public void toCucumberId_should_return_concatenated_and_without_functionalities() { String[] path = new String[] { "all", "Functionality 42: folder", "Functionalities 43, 44: sub-folder", "sub-sub-folder", "Functionality 45: request" }; final String id = cut.toCucumberId(path); assertThat(id).isEqualTo("all/folder/sub-folder/sub-sub-folder/request"); }
String toCucumberId(String[] path) { String[] withoutFunctionalities = new String[path.length]; for (int i = 0; i < withoutFunctionalities.length; i++) { withoutFunctionalities[i] = ScenarioExtractorUtil.removeFunctionalitiesFromScenarioName(path[i]); } String id = String.join("/", withoutFunctionalities); if (id.length() > ExecutedScenario.CUCUMBER_ID_MAX_SIZE) { id = id.substring(id.length() - ExecutedScenario.CUCUMBER_ID_MAX_SIZE); } return id; }
PostmanService { String toCucumberId(String[] path) { String[] withoutFunctionalities = new String[path.length]; for (int i = 0; i < withoutFunctionalities.length; i++) { withoutFunctionalities[i] = ScenarioExtractorUtil.removeFunctionalitiesFromScenarioName(path[i]); } String id = String.join("/", withoutFunctionalities); if (id.length() > ExecutedScenario.CUCUMBER_ID_MAX_SIZE) { id = id.substring(id.length() - ExecutedScenario.CUCUMBER_ID_MAX_SIZE); } return id; } }
PostmanService { String toCucumberId(String[] path) { String[] withoutFunctionalities = new String[path.length]; for (int i = 0; i < withoutFunctionalities.length; i++) { withoutFunctionalities[i] = ScenarioExtractorUtil.removeFunctionalitiesFromScenarioName(path[i]); } String id = String.join("/", withoutFunctionalities); if (id.length() > ExecutedScenario.CUCUMBER_ID_MAX_SIZE) { id = id.substring(id.length() - ExecutedScenario.CUCUMBER_ID_MAX_SIZE); } return id; }  }
PostmanService { String toCucumberId(String[] path) { String[] withoutFunctionalities = new String[path.length]; for (int i = 0; i < withoutFunctionalities.length; i++) { withoutFunctionalities[i] = ScenarioExtractorUtil.removeFunctionalitiesFromScenarioName(path[i]); } String id = String.join("/", withoutFunctionalities); if (id.length() > ExecutedScenario.CUCUMBER_ID_MAX_SIZE) { id = id.substring(id.length() - ExecutedScenario.CUCUMBER_ID_MAX_SIZE); } return id; }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); }
PostmanService { String toCucumberId(String[] path) { String[] withoutFunctionalities = new String[path.length]; for (int i = 0; i < withoutFunctionalities.length; i++) { withoutFunctionalities[i] = ScenarioExtractorUtil.removeFunctionalitiesFromScenarioName(path[i]); } String id = String.join("/", withoutFunctionalities); if (id.length() > ExecutedScenario.CUCUMBER_ID_MAX_SIZE) { id = id.substring(id.length() - ExecutedScenario.CUCUMBER_ID_MAX_SIZE); } return id; }  void parse(JsonParser parser, NewmanParsingResult result); List<ExecutedScenario> postProcess(Run run, NewmanParsingResult result, String newmanReportPath, AtomicInteger requestPosition); void deleteTempFiles(NewmanParsingResult newmanParsingResult); static final String FOLDER_DELIMITER; }