department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

Use Mochawesome Report Generator to Collect E2E Data and Push it to BigQuery #25516

Closed pjhill closed 3 years ago

pjhill commented 3 years ago

Description

Configure Cypress to use Mochawesome as a test reporter. Collect the test results, create a report, and push the report data to BigQuery.

Tasks

holdenhinkle commented 3 years ago

PR to grab Cypress Mochawesome test results files as an artifact from each Cypress test execution running in parallel, then, once all 6 executions are complete, kick off a workflow that checks out the Testing Tools Team Dashboard Data repo, downloads the artifacts into the mochawesome/data directory, updates the results files, merges them, generates a Mochawesome report, then posts the results data to BigQuery - https://github.com/department-of-veterans-affairs/vets-website/pull/17625

I made good progress on this today. Testing it now. Very close to working (might be working!).

holdenhinkle commented 3 years ago

Soooo close getting this to work!

Convo with Demian - https://dsva.slack.com/archives/CJYRZK2HH/p1623887134208800

I'm guessing we'll be able to pump Cypress Mochawesome results into BigQuery tomorrow morning.

holdenhinkle commented 3 years ago

Jeremy is adding testing tools param access to frontend GHA SA.

See - https://github.com/department-of-veterans-affairs/devops/pull/9428

holdenhinkle commented 3 years ago

We’ve got Cypress test results data pumping into BigQuery from GitHub Actions using Darius’ Cypress parallelization:

GHA Job - https://github.com/department-of-veterans-affairs/vets-website/runs/2851625155?check_suite_focus=true

Create report and post results to BigQuery
Run yarn cypress-mochawesome-to-bigquery
yarn run v1.22.10
$ node src/mochawesome/
Inserted 1 row(s) into cypress_test_suite_executions.
Inserted 139 row(s) into cypress_test_results.
Done in 1.94s.
holdenhinkle commented 3 years ago

image.png

holdenhinkle commented 3 years ago

PR submitted - https://github.com/department-of-veterans-affairs/vets-website/pull/17625

holdenhinkle commented 3 years ago

The PR was merged.

holdenhinkle commented 3 years ago

This ticket is complete.

pjhill commented 3 years ago

Excellent -- great work!