Project Onboarding Procedure
Below are step-by-step instructions on how to onboard a project to report test metrics.
Prerequisites
To report test metrics for a project, ensure the following requirements are met:
- The project uses CircleCI for test execution, and members of the ETE team have access to the CircleCI pipelines.
- Testing and coverage results are stored as artifacts in CircleCI jobs:
- Test results must be in JUnit format.
- Coverage results must be in JSON format.
- Supported test frameworks are listed in the Metric Interpretation Guide.
1. Add CircleCI Pipelines to the Config File and Scrape Historical Data
- Add the new CircleCI pipelines under the
circleci_scraper
section in your localconfig.ini
andconfig.ini.sample
. Push changes to theconfig.ini.sample
to the repository to keep contributors up-to-date. - Execute the
circleci_scraper
using the following command. Ensure thedays_of_data
option in thecircleci_scraper
section ofconfig.ini
is omitted to scrape all available historical data. Test and coverage data will be stored locally in thetest_result_dir
(typically calledraw_data
at the project root).make run_circleci_scraper
- Once scraping is complete, compress the contents of
test_result_dir
, and replace the corresponding file in the ETE team folder.
2. Create and Populate Tables in the ETE BigQuery Dataset
- Create Tables:
- For test results, create two empty tables using the following naming conventions:
{project_name}_averages
{project_name}_results
- For coverage results, create one empty table named
{project_name}_coverage
. - These tables should be created in the
test_metrics
dataset of the ETE BigQuery instance. Reference the official documentation to create empty tables with schema definitions. Schemas can be copied from existing project tables.
- For test results, create two empty tables using the following naming conventions:
- Populate Tables:
- Execute the following command to populate the tables with data:
make run_metric_reporter
- Execute the following command to populate the tables with data:
3. Create a Looker Dashboard
-
License Requirement: A developer license is required to create and edit dashboards in Looker. Instructions for obtaining a license and resources for learning Looker are available on the Mozilla Confluence. Additional help can be found in the
#data-help
and#looker-platform-discussion
Slack channels. -
Update Looker Project:
- Update the ecosystem-test-eng Looker project Looker project model and add the required views for the new project test data. Related repository: looker-ecosystem-test-eng.
-
Create Dashboard: Create a new dashboard, populate it with looks for the new project data, and add it to the ETE Test Metrics Board.