Unable to get customer artefacts.(iOS)

0

Hello AWS,
I am running my scripts on AWS device farm(Automation testing) and I am using the java+testNG environment for automation. My requirement is, I need a "Cucumber.json" file that is generating after every successful execution of the script.
I have tried out many things but unable to get this file. but the same thing it's generating locally. can you help me with this?
sample Code:-

public class ReportHelper {
	private static final String REPORT_OUTPUT_DIRECTORY = System.getenv("DEVICEFARM_LOG_DIR");
	public static void generateCucumberReport(String testfeature) {
		File reportOutputDirectory = new File(REPORT_OUTPUT_DIRECTORY);
		ArrayList<String> jsonFiles = new ArrayList<String>();
		jsonFiles.add("tmp/cucumber.json");
		String projectName = "ion-robot-app-automation";
		Configuration configuration = new Configuration(reportOutputDirectory, projectName);
		configuration.addClassifications("Platform", "iOS");
		ReportBuilder reportBuilder = new ReportBuilder(jsonFiles, configuration);
		try {
			reportBuilder.generateReports();
		} catch (Exception ex) {
			System.out.println("report generation failed" + ex.getMessage());
		}
	}

Thanks,
Abhishek Garg

Edited by: Tobe-AWS on Feb 22, 2021 5:03 PM

asked 3 years ago171 views
2 Answers
0

Hello abhishek1991,

Is your ReportBuilder object moving your tmp/cucumber.json file to the path specified in DEVICEFARM_LOG_DIR ? If not, the file will not be zipped and available for download as an artifact.

To troubleshoot, first check where the cucumber.json file is actually located at the end of your test and see if its in the directory specified by the DEVICEFARM_LOG_DIR environment variable.

You can also move this file during the post test phase of your test spec .yml file.

AWS
answered 3 years ago
0

Thanks

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions