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년 전184회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠