diff --git a/test/frontend-integration-test/helloworld.spec.js b/test/frontend-integration-test/helloworld.spec.js index 9795ced09ca..c4082a0e656 100644 --- a/test/frontend-integration-test/helloworld.spec.js +++ b/test/frontend-integration-test/helloworld.spec.js @@ -220,12 +220,16 @@ describe('deploy helloworld sample run', () => { // Deploy $('#startNewRunBtn').click(); + + browser.saveScreenshot('./new-run-screenshot.png'); }); it('redirects back to all runs page', () => { browser.waitUntil(() => { return (new URL(browser.getUrl())).hash === '#/runs'; }, waitTimeout, `URL was: ${new URL(browser.getUrl())}`); + + browser.saveScreenshot('./redirect-screenshot.png'); }); it('displays both runs in all runs page', () => { diff --git a/test/frontend-integration-test/run_test.sh b/test/frontend-integration-test/run_test.sh index 94ee7b43587..de2b7fb2c49 100755 --- a/test/frontend-integration-test/run_test.sh +++ b/test/frontend-integration-test/run_test.sh @@ -74,17 +74,21 @@ POD=`/src/tools/google-cloud-sdk/bin/kubectl get pods -n ${NAMESPACE} -l app=ml- ./node_modules/.bin/wait-port 127.0.0.1:3000 -t 20000 export PIPELINE_OUTPUT=${RESULTS_GCS_DIR}/pipeline_output - -JUNIT_TEST_RESULT=junit_FrontendIntegrationTestOutput.xml - # Don't exit early if 'npm test' fails -TEST_RESULT=`npm test 2>&1` +set +e +npm test TEST_EXIT_CODE=$? +set -e -# Log the test result -printf '%s\n' "$TEST_RESULT" -# Convert test result to junit.xml -printf '%s\n' "$TEST_RESULT" | go-junit-report > ${JUNIT_TEST_RESULT} +echo 'new-run-screenshot' +base64 'new-run-screenshot.png' +echo \"-----\" + +echo 'redirect-screenshot' +base64 'redirect-screenshot.png' +echo \"-----\" + +JUNIT_TEST_RESULT=junit_FrontendIntegrationTestOutput.xml echo "Copy test result to GCS ${RESULTS_GCS_DIR}/${JUNIT_TEST_RESULT}" tools/google-cloud-sdk/bin/gsutil cp ${JUNIT_TEST_RESULT} ${RESULTS_GCS_DIR}/${JUNIT_TEST_RESULT}