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

已提問 3 年前檢視次數 187 次
2 個答案
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
已回答 3 年前
0

Thanks

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南