Device farm: How to add NodeJS cucumber-html reports to customer artifact ?

1

Hi, I'm able to run cucumber specs (NodeJS & appium) successfully in aws device farm and framework reports generate in host machine file path: /private/tmp/scratchcd0WWN.scratch/test-packageXL7CdE/reports/html/index.html, how can I copy reports from this path location to customer artifact folder. I have included -$DEVICEFARM_LOG_DIR and $WORKING_DIRECTORY in .yml file. please help.!

질문됨 2년 전417회 조회
1개 답변
0

Hello,

Thank you for reaching out to aws Re:Post team. I understand that you are able to successfully run test specs in aws device farm, which generates report in host machine file path.

In order to copy generated report, from host machine file path into customer artifact folder, we need to include the copy commands in the Test Spec file. For example, we can make a directory, say “TestReports" and include the below commands in the "post_test" section of Test Spec YML file to copy the file to desired location.

After our test run finishes, we can successfully collect the test reports file for our tests in the "customer artifacts" section of test reports on "DEVICEFARM_LOG_DIR/TestReports/<files>" path :

Example Command :

post_test:
    commands:
    - mkdir TestReports
    - cp -r $DEVICEFARM_TEST_PACKAGE_PATH $DEVICEFARM_LOG_DIR/TestReports


I hope this is helpful. If you experience any issue, please let us know.

AWS
지원 엔지니어
Isha_K
답변함 2년 전

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

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

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