Jump to content

Test Kitchen/Maintainer introduction

From Wikitech

This page provides an introduction to working with Test Kitchen for maintainers.

Component Catalog

As explained in Test Kitchen#About, Test Kitchen provides an standardized toolkit to implement experiments or instruments on Wikimedia-hosted wikis. This toolkit is composed of various resources, libraries or extensions:

  • MediaWiki extensions: Hosts the PHP and JS SDKs and integrate them with MediaWiki, and enrolls logged-in users into experiments
  • UI/GrowthBook: The UI you use to configure and analyze experiments and instruments
  • Schemas: Common data contracts used to validate events that your experiments and instruments send
  • Streams: Shared streams that your experiments and instruments send events to
  • Dashboards: Dashboards that allow us to monitor the health of the system
  • Bots: Bots that alert us to changes in the system

You will likely work on all of these components while maintaining Test Kitchen. This section will give you an overview of all of the components and jumping off points to help you start working on them.

MediaWiki Extensions

TestKitchen

The TestKitchen extension hosts and integrates the Test Kitchen SDKs with MediaWiki, and enrolls logged-in users into experiments.

EventBus

The Test Kitchen PHP SDK uses the EventBus extension to send events.

EventStreamConfig

The EventBus extension requires the EventStreamConfig extension.

The EventStreamConfig extension is a utility extension that provides library functions for retrieving event stream configuration and an API for exporting it.

WikimediaEvents (Optional)

WikimediaEvents is the extension where almost all experiments and instruments reside.

EventLogging (Optional)

Test Kitchen doesn't depend on the EventLogging extension (EventLogging). However, when the Experiment Platform team was the Metrics Platform team, they introduced a lot of functionality to EventLogging that would later become the Test Kitchen SDKs. The Experiment Platform team are planning on tidying up a lot of that functionality.

Test Kitchen UI

Test Kitchen UI allows you to configure and activate experiments and instruments. GrowthBook allows you to do the same and to also analyze experiment results.

Schemas

Schemas are part of the Event Platform, which Test Kitchen depends on.

Schemas are the data contracts used to validate events that your experiments and instruments send. https://gitlab.wikimedia.org/repos/data-engineering/schemas-event-secondary contains all of the schemas that have been used by EventLogging, the Event Platform (FKA Modern Event Platform), Metrics Platform, and now Test Kitchen. The Test Kitchen schemas and schema fragments are available.

Streams

Streams are part of the Event Platform, which Test Kitchen depends on.

Test Kitchen uses two streams by default, product_metrics.web_base and product_metrics.app_base. If a custom schema is required, then a new stream must be created and registered with Test Kitchen UI and GrowthBook.

Test Kitchen doesn't store experiment or instrument configuration in stream configuration. However, when the Experiment Platform team was the Metrics Platform team, they introduced a lot of functionality that was configured using stream configuration. The Experiment Platform team are planning on tidying up a lot of that functionality.

Dashboards