mcpField
G
gauge-skill

gauge-skill

github.com/lambdatestTesting & quality384212 installsUpdated 2w ago
Repository

About gauge-skill

gauge-skill is a reference skill for writing and running Gauge tests. It covers specifications, reusable concepts, step implementations, and practices for browser testing and CI/CD.

Key features

  1. 01Markdown test specifications
  2. 02Reusable concepts and step groups
  3. 03Java and Python step examples
  4. 04Hooks, page objects, and test data
  5. 05Cloud browser and CI/CD guidance

Use cases

  1. 01Create Gauge scenarios for login flows
  2. 02Organize shared steps across specifications
  3. 03Run browser tests with remote execution
  4. 04Troubleshoot Gauge setups and test runs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/lambdatest/agent-skills --skill gauge-skill

After installing, type/gauge-skillin Claude Code to confirm it loaded.

Bundled filesreference/advanced-patterns.mdreference/playbook.md

Details

From the project README

Gauge Automation Skill

Core Patterns

Specification (specs/login.spec)
# Login Feature

## Successful Login
* Navigate to login page
* Enter email "[email protected]"
* Enter password "password123"
* Click login button
* Verify dashboard is displayed
* Verify welcome message contains "Welcome"

## Invalid Credentials
* Navigate to login page
* Enter email "[email protected]"
* Enter password "wrong"
* Click login button
* Verify error message "Invalid credentials" is shown

## Login with multiple users
|email             |password |expected  |
|-----------------|---------|----------|
|[email protected]   |admin123 |Dashboard |
|[email protected]    |pass123  |Dashboard |
|[email protected]     |wrong    |Error     |

* Login as <email> with <password>
* Verify <expected> page is shown
Step Implementation — Java
import com.thoughtworks.gauge.Step;
import com.thoughtworks.gauge.Table;

public class LoginSteps {
    WebDriver driver;

    @Step("Navigate to login page")
    public void navigateToLogin() {
        driver.get("http://localhost:3000/login");
    }

    @Step("Enter email <email>")
    public void enterEmail(String email) {
        driver.findElement(By.id("email")).sendKeys(email);
    }

    @Step("Enter password <password>")
    public void enterPassword(String password) {
        driver.findElement(By.id("password")).sendKeys(password);
    }

    @Step("Click login button")
    public void clickLogin() {
        driver.findElement(By.cssSelector("button[type='submit']")).click();
    }

    @Step("Verify dashboard is displayed")
    public void verifyDashboard() {
        assertTrue(driver.getCurrentUrl().contains("/dashboard"));
    }
}
Step Implementation — Python
from getgauge.python import step
from selenium import webdriver

@step("Navigate to login page")
def navigate_to_login():
    driver.get("http://localhost:3000/login")

@step("Enter email <email>")
def enter_email(email):
    driver.find_element_by_id("email").send_keys(email)

@step("Click login button")
def click_login():
    driver.find_element_by_css_selector("button[type='submit']").click()
Concepts (Reusable Step Groups — specs/concepts/login.cpt)
# Login as <email> with <password>
* Navigate to login page
* Enter email <email>
* Enter password <password>
* Click login button

Setup: gauge install java (or python, js, ruby)

Init: gauge init java

Run: gauge run specs/ or gauge run specs/login.spec

Cloud Execution on TestMu AI

Set environment variables: LT_USERNAME, LT_ACCESS_KEY

// StepImplementation.java
ChromeOptions browserOptions = new ChromeOptions();
HashMap<String, Object> ltOptions = new HashMap<>();
ltOptions.put("user", System.getenv("LT_USERNAME"));
ltOptions.put("accessKey", System.getenv("LT_ACCESS_KEY"));
ltOptions.put("build", "Gauge Build");
ltOptions.put("platformName", "Windows 11");
ltOptions.put("video", true);
ltOptions.put("console", true);
browserOptions.setCapability("LT:Options", ltOptions);
Driver.setWebDriver(new RemoteWebDriver(
    new URL("https://hub.lambdatest.com/wd/hub"), browserOptions));

Tags: gauge run --tags "smoke" (use Tags: smoke in spec)

Deep Patterns

See reference/playbook.md for production-grade patterns:

SectionWhat You Get
§1 Project SetupInstallation, project structure, environment properties
§2 Spec FilesMarkdown scenarios, data tables, concepts (.cpt)
§3 Step ImplementationsJava steps, table-driven steps, assertions
§4 Hooks & ExecutionBeforeSuite/Scenario/Step, screenshots, browser logs
§5 Page ObjectsBasePage, concrete pages, usage in steps
§6 Data ManagementScenarioDataStore, SpecDataStore, CSV data
§7 LambdaTest IntegrationRemote driver factory with LT:Options
§8 CI/CD IntegrationGitHub Actions with parallel execution, XML reports
§9 Debugging Table12 common problems with causes and fixes
§10 Best Practices14-item Gauge testing checklist

Comments

Markdown supported