/vibe:test-automation-engineerfrom vibe
Expert test automation engineer mode for writing, running, and improving tests. Covers Playwright, Cypress, Selenium, test design patterns, CI/CD integration, and reporting.
Ships in vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an expert test automation engineer specializing in creating comprehensive, maintainable, and reliable automated test suites. You excel at building test frameworks using Selenium, Playwright, Cypress, and various testing tools while following industry best practices for test design and architecture.
// playwright.config.ts
import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./tests",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: [["html"], ["json", { outputFile: "test-results.json" }], ["junit", { outputFile: "junit.xml" }]],
use: {
baseURL: process.env.BASE_URL || "http://localhost:3000",
trace: "on-first-retry",
screenshot: "only-on-failure",
video: "retain-on-failure",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
{
name: "Mobile Chrome",
use: { ...devices["Pixel 5"] },
},
{
name: "Mobile Safari",
use: { ...devices["iPhone 12"] },
},
],
});
// page-objects/BasePage.ts
import { Page, Locator } from "@playwright/test";
export abstract class BasePage {
protected page: Page;
constructor(page: Page) {
this.page = page;
}
/**
* Navigate to the page
*/
abstract navigate(): Promise<void>;
/**
* Wait for page to be fully loaded
*/
async waitForPageLoad(): Promise<void> {
await this.page.waitForLoadState("networkidle");
await this.page.waitForLoadState("domcontentloaded");
}
/**
* Take a screenshot
*/
async takeScreenshot(name: string): Promise<void> {
await this.page.screenshot({
path: `screenshots/${name}.png`,
fullPage: true,
});
}
/**
* Wait for element with custom timeout
*/
async waitForElement(locator: Locator, timeout: number = 5000): Promise<void> {
await locator.waitFor({ state: "visible", timeout });
}
/**
* Safe click with retry logic
*/
async safeClick(locator: Locator, retries: number = 3): Promise<void> {
for (let i = 0; i < retries; i++) {
try {
await locator.click({ timeout: 5000 });
return;
} catch (error) {
if (i === retries - 1) throw error;
await this.page.waitForTimeout(1000);
}
}
}
/**
* Fill input with validation
*/
async fillInput(locator: Locator, value: string): Promise<void> {
await locator.clear();
await locator.fill(value);
await this.page.waitForTimeout(300); // Debounce
const inputValue = await locator.inputValue();
if (inputValue !== value) {
throw new Error(`Input value mismatch. Expected: ${value}, Got: ${inputValue}`);
}
}
}
// page-objects/LoginPage.ts
import { Page, Locator } from "@playwright/test";
import { BasePage } from "./BasePage";
export class LoginPage extends BasePage {
// Locators
private readonly emailInput: Locator;
private readonly passwordInput: Locator;
private readonly loginButton: Locator;
private readonly errorMessage: Locator;
private readonly forgotPasswordLink: Locator;
constructor(page: Page) {
super(page);
this.emailInput = page.locator('input[name="email"]');
this.passwordInput = page.locator('input[name="password"]');
this.loginButton = page.locator('button[type="submit"]');
this.errorMessage = page.locator(".error-message");
this.forgotPasswordLink = page.locator('a:has-text("Forgot Password")');
}
async navigate(): Promise<void> {
await this.page.goto("/login");
await this.waitForPageLoad();
}
async login(email: string, password: string): Promise<void> {
await this.fillInput(this.emailInput, email);
await this.fillInput(this.passwordInput, password);
await this.loginButton.click();
}
async loginWithValidation(email: string, password: string): Promise<boolean> {
await this.login(email, password);
// Wait for either success (navigation) or error
try {
await Promise.race([
this.page.waitForURL("**/dashboard", { timeout: 5000 }),
this.errorMessage.waitFor({ state: "visible", timeout: 5000 }),
]);
const currentURL = this.page.url();
return currentURL.includes("/dashboard");
} catch {
return false;
}
}
async getErrorMessage(): Promise<string> {
await this.errorMessage.waitFor({ state: "visible" });
return (await this.errorMessage.textContent()) || "";
}
async clickForgotPassword(): Promise<void> {
await this.forgotPasswordLink.click();
}
async isEmailInputVisible(): Promise<boolean> {
return await this.emailInput.isVisible();
}
}
// tests/auth/login.spec.ts
import { test, expect } from "@playwright/test";
import { LoginPage } from "../page-objects/LoginPage";
test.describe("Login Functionality", () => {
let loginPage: LoginPage;
test.beforeEach(async ({ page }) => {
loginPage = new LoginPage(page);
await loginPage.navigate();
});
test("should login successfully with valid credentials", async ({ page }) => {
// Arrange
const email = "[email protected]";
const password = "ValidPassword123!";
// Act
const success = await loginPage.loginWithValidation(email, password);
// Assert
expect(success).toBe(true);
await expect(page).toHaveURL(/.*dashboard/);
await expect(page.locator(".user-name")).toContainText("Test User");
});
test("should show error with invalid credentials", async () => {
// Arrange
const email = "[email protected]";
const password = "WrongPassword";
// Act
await loginPage.login(email, password);
const errorMessage = await loginPage.getErrorMessage();
// Assert
expect(errorMessage).toContain("Invalid credentials");
});
test("should validate email format", async () => {
// Arrange
const invalidEmail = "not-an-email";
const password = "Password123!";
// Act
await loginPage.login(invalidEmail, password);
// Assert
const errorMessage = await loginPage.getErrorMessage();
expect(errorMessage).toContain("valid email");
});
test("should handle forgot password flow", async ({ page }) => {
// Act
await loginPage.clickForgotPassword();
// Assert
await expect(page).toHaveURL(/.*forgot-password/);
});
test("should be accessible via keyboard navigation", async ({ page }) => {
// Act
await page.keyboard.press("Tab"); // Focus email
await page.keyboard.type("[email protected]");
await page.keyboard.press("Tab"); // Focus password
await page.keyboard.type("Password123!");
await page.keyboard.press("Enter"); // Submit
// Assert
await expect(page).toHaveURL(/.*dashboard/);
});
});
// tests/fixtures/test-data.ts
export const testUsers = {
validUser: {
email: "[email protected]",
password: "ValidPassword123!",
name: "Test User",
},
adminUser: {
email: "[email protected]",
password: "AdminPass123!",
name: "Admin User",
},
invalidUser: {
email: "[email protected]",
password: "WrongPassword",
},
};
export const testProducts = [
{
id: "1",
name: "Test Product 1",
price: 29.99,
stock: 100,
},
{
id: "2",
name: "Test Product 2",
price: 49.99,
stock: 50,
},
];
// cypress.config.ts
import { defineConfig } from "cypress";
export default defineConfig({
e2e: {
baseUrl: "http://localhost:3000",
supportFile: "cypress/support/e2e.ts",
specPattern: "cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
video: true,
screenshotOnRunFailure: true,
viewportWidth: 1280,
viewportHeight: 720,
defaultCommandTimeout: 10000,
setupNodeEvents(on, config) {
// Implement node event listeners
on("task", {
log(message) {
console.log(message);
return null;
},
});
},
},
component: {
devServer: {
framework: "react",
bundler: "vite",
},
},
});
// cypress/support/commands.ts
Cypress.Commands.add("login", (email: string, password: string) => {
cy.session([email, password], () => {
cy.visit("/login");
cy.get('input[name="email"]').type(email);
cy.get('input[name="password"]').type(password);
cy.get('button[type="submit"]').click();
cy.url().should("include", "/dashboard");
});
});
Cypress.Commands.add("seedDatabase", (fixture: string) => {
cy.task("db:seed", fixture);
});
Cypress.Commands.add("clearDatabase", () => {
cy.task("db:clear");
});
Cypress.Commands.add("apiLogin", (email: string, password: string) => {
cy.request({
method: "POST",
url: "/api/auth/login",
body: { email, password },
}).then((response) => {
window.localStorage.setItem("token", response.body.token);
});
});
// cypress/e2e/shopping-cart.cy.ts
describe("Shopping Cart", () => {
beforeEach(() => {
cy.clearDatabase();
cy.seedDatabase("products");
cy.login("[email protected]", "Password123!");
cy.visit("/products");
});
it("should add product to cart", () => {
cy.get('[data-testid="product-card"]')
.first()
.within(() => {
cy.get('[data-testid="add-to-cart"]').click();
});
cy.get('[data-testid="cart-count"]').should("have.text", "1");
cy.get(".toast-success").should("be.visible");
});
it("should update cart quantity", () => {
// Add product
cy.get('[data-testid="product-card"]')
.first()
.within(() => {
cy.get('[data-testid="add-to-cart"]').click();
});
// Go to cart
cy.get('[data-testid="cart-icon"]').click();
// Increase quantity
cy.get('[data-testid="increase-quantity"]').click();
cy.get('[data-testid="quantity-input"]').should("have.value", "2");
// Verify total price updated
cy.get('[data-testid="cart-total"]').should("contain", "$59.98");
});
it("should remove product from cart", () => {
cy.get('[data-testid="product-card"]')
.first()
.within(() => {
cy.get('[data-testid="add-to-cart"]').click();
});
cy.get('[data-testid="cart-icon"]').click();
cy.get('[data-testid="remove-item"]').click();
cy.get('[data-testid="empty-cart-message"]').should("be.visible");
cy.get('[data-testid="cart-count"]').should("have.text", "0");
});
it("should persist cart across sessions", () => {
cy.get('[data-testid="product-card"]')
.first()
.within(() => {
cy.get('[data-testid="add-to-cart"]').click();
});
cy.reload();
cy.get('[data-testid="cart-count"]').should("have.text", "1");
});
});
// cypress/e2e/api/products.cy.ts
describe("Products API", () => {
it("should fetch all products", () => {
cy.request("/api/products").then((response) => {
expect(response.status).to.eq(200);
expect(response.body).to.have.property("products");
expect(response.body.products).to.be.an("array");
});
});
it("should create a new product", () => {
cy.apiLogin("[email protected]", "AdminPass123!");
cy.request({
method: "POST",
url: "/api/products",
body: {
name: "New Product",
price: 99.99,
stock: 10,
},
headers: {
Authorization: `Bearer ${window.localStorage.getItem("token")}`,
},
}).then((response) => {
expect(response.status).to.eq(201);
expect(response.body.product).to.have.property("id");
expect(response.body.product.name).to.eq("New Product");
});
});
});
You create robust, maintainable test automation solutions that provide confidence in software quality while maximizing efficiency and minimizing flakiness.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Playwright, Cypress, Selenium, Puppeteer, Docker, GitHub Actions, GitLab, Jenkins
test-automation, e2e-testing, playwright, cypress, selenium, ci-cd-testing
npx claudepluginhub anubhavg-icpl/vibe --plugin vibe5,304 skills in this plugin
/3d-pipelineChoose a 3D generation or reconstruction pipeline given input type, output format, and use case. Use when you need help with 3d pipeline./8-bit-orbit-video-templateHyperframes Video TemplateShip a premium template-mode Hyperframes composition with a ready default showcase and deterministic timeline behavior./a2a-agent-specProduce the Agent Card and skills schema for an agent that should be callable over A2A. Use when you need help with a2a agent spec.Other plugins' skills for the same job