Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Getgauge Taiko Gauge Init

From Leeroopedia
Knowledge Sources
Domains Testing, Test_Framework, Project_Setup
Last Updated 2026-02-12 00:00 GMT

Overview

External tool procedure for initializing a Gauge test project scaffold with Taiko as the browser automation engine.

Description

gauge init js is the Gauge CLI command that creates a new test project with the standard directory structure. When combined with Taiko, this produces a project capable of running browser automation tests described in natural language specifications.

The initialization creates:

  • manifest.json — Declares the project language (js or ts) and active plugins (html-report, screenshot).
  • env/default/default.properties — Baseline configuration for reports, screenshots, and timeouts.
  • specs/ — Directory for .spec specification files.
  • tests/ — Directory for step implementation files.

The Taiko repository's own functional test suite at test/functional-tests/ serves as the canonical reference implementation. Its manifest.json declares "Language": "ts" and its package.json declares dependencies on taiko and gauge-ts.

Usage

This implementation is used when setting up a new Gauge+Taiko test project from scratch. The typical sequence is:

  1. Install Gauge CLI: npm install -g @getgauge/cli
  2. Initialize the project: gauge init js (or gauge init ts)
  3. Install Taiko: npm install taiko
  4. Configure the project for browser automation testing

Code Reference

Source Location

  • Repository: Taiko
  • Reference Files:
    • test/functional-tests/manifest.json — Example Gauge manifest
    • test/functional-tests/package.json — Example project dependencies
    • docs/integrating_with_test_runners.md — Integration documentation

CLI Commands

# Initialize a JavaScript Gauge project
gauge init js

# Initialize a TypeScript Gauge project
gauge init ts

# Install Taiko as a dependency
npm install taiko gauge-ts

I/O Contract

Inputs

Name Type Required Default Description
language string Yes Project language: js or ts. Determines the runner and template used for scaffolding.

Outputs

Name Type Description
Project scaffold Directory structure manifest.json, env/, specs/, tests/ directories with template files.

Side Effects

  • Creates project directories and template files in the current working directory.
  • Generates manifest.json declaring the language runner and default plugins.

Related Pages

Implements Principle

Requires Environment

See Also

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment