Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

onXmaps/mochawesome-to-gbq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is mochawesome-to-gbq

This package modifies and uploads mochawesome report files to a given Google Big Query data store. The report files can be generated with mochawesome. This package will merge the report files with mochawesome-merge and generate a report with mochawesome-report-generator in the mochawesome-report directory.

What get modified?

  • Fields passPercent and pendingPercent to be of schema type FLOAT.
  • Field err is modified to be of schema type RECORD.

Why?

When a mochawesome report file is uploaded to Google Big Query, the table schema is auto detected. The attributes and values set in the initial upload dictate the table schema. Any subsequent uploads to the same table that result in a mismatch of the initial table schema will result in an upload failure. These modificiations mitigate upload discrepancies when percentages switch between an INTEGER (ie 100) or a FLOAT (ie 98.8888) and when the field err has zero or more records.

Installation

Mochawesome

This package assumes that the report files are already generated by mochawesome in the mochawesome-report directory. See https://github.com/adamgruber/mochawesome#output

Google Cloud SDK

Get the latest Google Cloud SDK at https://cloud.google.com/sdk/docs#install_the_latest_cloud_tools_version_cloudsdk_current_version

Npm package

npm install -D https://github.com/coltadorsey/mochawesome-to-gbq.git

Google Cloud configuration

Authenticate

gcloud auth login

Set current project

gcloud config set project PROJECT_ID

Use this package

DS=your_data_store TBLREPORT=your_report_name npx mochawesome-to-gbq

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published