TestGrid is an interactive dashboard for viewing tests results in a grid. It parses JUnit reports for generating a grid view from the tests.
There is one dashboard group called kyma
which groups dashboards from both of the organizations: kyma-project and kyma-incubator. The dashboards start with the prefix name which refers to one of the organizations: kyma and kyma-incubator.
TestGrid configuration is stored inside the kubernetes/test-infra repository in the /config/testgrids/kyma/
directory.
The dashboards' configuration is stored in the testgrid-default.yaml file. This file is automatically generated from the template testgrid-default.yaml file. See the example of a dashboard configuration file:
dashboards:
# kyma
- name: kyma_integration
- name: kyma_control-plane
# kyma-incubator
- name: kyma-incubator_compass
dashboard_groups:
- name: kyma
dashboard_names:
- kyma_integration
- kyma_control-plane
- kyma-incubator_compass
Follow these steps to add a new dashboard:
- Add a new dashboard name in the
dashboards
field inside a template file. Dashboards must have a dashboard group name as a prefix. - Add the previously added dashboard to the corresponding dashboard_name inside the dashboard_groups field.
- Generate a new config file using the rendertemplates tool and check if the config file generated correctly.
After adding a desired dashboard in the testgrid-default.yaml
file, add Prow Jobs to the dashboard. To do so, define a new annotations field in a Prow Job definition. See the example below:
annotations:
testgrid-dashboards: dashboard-name # [Required] A dashboard already defined in a config.yaml.
testgrid-tab-name: some-short-name # [Optional] A shorter name for the tab. If omitted, just uses the job name.
testgrid-alert-email: [email protected] # [Optional] An alert email that will be applied to the tab created in the first dashboard specified in testgrid-dashboards.
description: Words about your job. # [Optional] A description of your job. If omitted, only the job name is used.
testgrid-num-columns-recent: "10" # [Optional] The number of runs in a row that can be omitted before the run is considered stale. The default value is 10.
testgrid-num-failures-to-alert: "3" # [Optional] The number of continuous failures before sending an email. The default value is 3.
testgrid-days-of-results: "15" # [Optional] The number of days for which the results are visible. The default value is 15.
testgrid-alert-stale-results-hours: "12" # [Optional] The number of hours that pass with no results after which the email is sent. The default value is 12.
The only required field is testgrid-dashboards. It must correspond to the name defined in the testgrid-default.yaml
file. It is also recommended to add a short description of the job in the description field.
The rest of the fields are optional and can be omitted.
If you don't want to include a job on the TestGrid, use this annotation to disable the generation of the TestGrid test group:
annotations:
testgrid-create-test-group: "false"
This configuration applies to postsumbit and periodic jobs. Presubmit jobs can be added to the TestGrid, however, if there is no annnotations field defined, the job will be omitted in the config file generation.