Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classification can not be added on cucumber features report in Jenkins build #380

Open
durubayram opened this issue Oct 22, 2020 · 2 comments

Comments

@durubayram
Copy link

durubayram commented Oct 22, 2020

Hi, this problem occurs when i build code on Jenkins. I can not see additional classifications which are added from code. I can not see any problem on local build.

Local build:
local-cucumber

Jenkins build:
jenkins-cucumber

Omega Release can not be added on Jenkins build. Is there any problem on Jenkins cucumber-reports-plugin?
Cucumber Report Version : 5.3.1

code for adding classification and generating report below:

public void testParallel() {
    Results results = Runner.path(TESTS_DIR_PATH).tags(tagsList).parallel(THREAD_COUNT);
    JSONObject version = new JSONObject(Runner.runFeature("classpath:test/omega/version.feature", null, true));
    String releaseVersion = version.getJSONObject("response").get("data").toString();
    generateReport(results.getReportDir(), releaseVersion);
    assertEquals(0, results.getFailCount(), results.getErrorMessages());

}

public static void generateReport(String karateOutputPath, String version) {
    Collection<File> jsonFiles = FileUtils.listFiles(new File(karateOutputPath), new String[]{"json"}, true);
    List<String> jsonPaths = new ArrayList<>(jsonFiles.size());
    jsonFiles.forEach(file -> jsonPaths.add(file.getAbsolutePath()));
    Configuration config = new Configuration(new File("target"), "OMEGA & TALISMAN");
    config.addClassifications("Omega Release", version);
    ReportBuilder reportBuilder = new ReportBuilder(jsonPaths, config);
    reportBuilder.generateReports();
}
@durubayram durubayram changed the title Classification can not add on cucumber features report on Jenkins build Classification can not be added on cucumber features report in Jenkins build Oct 22, 2020
@damianszczepanik
Copy link
Member

Verify configuration

@durubayram
Copy link
Author

what do you mean 'verify configuration' ? What's wrong with config.addClassification() function usage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants