Shortest: AI-Powered Natural Language End-to-End Testing Framework
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
Shortest is an innovative AI-powered end-to-end testing framework that leverages natural language for test creation and execution. Built on Playwright and utilizing the Anthropic Claude API, it simplifies the QA process by allowing users to define tests in plain English. This tool integrates seamlessly into development workflows, offering features like GitHub 2FA support and email validation.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Shortest is an advanced AI-powered end-to-end testing framework designed to streamline quality assurance through natural language. It enables developers and QA engineers to write comprehensive tests using plain English, abstracting away complex automation details. Built on top of Playwright, Shortest provides robust browser automation capabilities, enhanced by the intelligence of the Anthropic Claude API for dynamic test execution.
Key features include:
- Natural language-driven E2E testing.
- AI-powered test execution using Anthropic Claude API.
- Foundation on Playwright for reliable browser interaction.
- Seamless GitHub integration, including 2FA support.
- Email validation capabilities with Mailosaur.
Installation
Getting started with Shortest is straightforward. Use the shortest init command to quickly set up the framework in your project.
npx @antiwork/shortest init
This command automates several steps:
- Installs the
@antiwork/shortestpackage as a dev dependency if not already present. - Creates a default
shortest.config.tsfile with boilerplate configuration. - Generates a
.env.localfile (if absent) with placeholders for essential environment variables, such asANTHROPIC_API_KEY. - Adds
.env.localand.shortest/to your.gitignorefile.
After installation, configure your shortest.config.ts file and provide your Anthropic API key.
import type { ShortestConfig } from "@antiwork/shortest";
export default {
headless: false,
baseUrl: "http://localhost:3000",
browser: {
contextOptions: {
ignoreHTTPSErrors: true
},
},
testPattern: "**/*.test.ts",
ai: {
provider: "anthropic",
},
} satisfies ShortestConfig;
Examples
Shortest offers a flexible and powerful way to define your tests.
Basic Test
Create test files following the pattern specified in your configuration, for example, app/login.test.ts:
import { shortest } from "@antiwork/shortest";
shortest("Login to the app using email and password", {
username: process.env.GITHUB_USERNAME,
password: process.env.GITHUB_PASSWORD,
});
Using Callback Functions
You can extend tests with callback functions for additional assertions or logic after the browser execution.
import { shortest } from "@antiwork/shortest";
import { db } from "@/lib/db/drizzle";
import { users } from "@/lib/db/schema";
import { eq } from "drizzle-orm";
shortest("Login to the app using username and password", {
username: process.env.USERNAME,
password: process.env.PASSWORD,
}).after(async ({ page }) => {
const clerkId = await page.evaluate(() => {
return window.localStorage.getItem("clerk-user");
});
if (!clerkId) {
throw new Error("User not found in database");
}
const [user] = await db
.select()
.from(users)
.where(eq(users.clerkId, clerkId))
.limit(1);
expect(user).toBeDefined();
});
Lifecycle Hooks
Execute code before and after test suites or individual tests using lifecycle hooks.
import { shortest } from "@antiwork/shortest";
shortest.beforeAll(async ({ page }) => {
// Setup before all tests
});
shortest.beforeEach(async ({ page }) => {
// Setup before each test
});
shortest.afterEach(async ({ page }) => {
await page.close();
});
shortest.afterAll(async ({ page }) => {
// Teardown after all tests
});
Chaining Tests
Shortest supports chaining tests for sequential execution or reusable test flows.
// Sequential test chain
shortest([
"user can login with email and password",
"user can modify their account-level refund policy",
]);
// Combine flows with spread operator
const loginAsLawyer = "login as lawyer with valid credentials";
const allAppActions = ["send invoice to company", "view invoices"];
shortest([loginAsLawyer, ...allAppActions]);
API Testing
Test API endpoints using natural language descriptions or explicit requests.
const req = new APIRequest({
baseURL: API_BASE_URI,
});
shortest(
"Ensure the response contains only active users",
req.fetch({
url: "/users",
method: "GET",
params: new URLSearchParams({
active: true,
}),
}),
);
Or a simpler natural language approach:
shortest(`
Test the API GET endpoint ${API_BASE_URI}/users with query parameter { "active": true }
Expect the response to contain only active users
`);
Why Use Shortest?
Shortest revolutionizes the testing process by making it more accessible and efficient. Its natural language interface allows non-technical team members to understand and even contribute to test definitions, fostering better collaboration. The integration of AI, specifically Anthropic Claude, enables more dynamic and intelligent test execution, adapting to UI changes and reducing maintenance overhead. With its Playwright foundation, Shortest ensures reliable and robust end-to-end testing across various browsers. Features like GitHub 2FA login and Mailosaur email validation address common real-world testing challenges, making it a comprehensive solution for modern web applications.
Links
- GitHub Repository: https://github.com/antiwork/shortest
- NPM Package: https://www.npmjs.com/package/@antiwork/shortest
- Video Tutorial: https://github.com/antiwork/shortest/issues/143#issuecomment-2564488173
- CI Setup Example: https://github.com/antiwork/shortest/blob/main/.github/workflows/shortest.yml
Related repositories
Similar repositories that may be relevant next.

open-slide: An AI-Native Slide Framework for React Presentations
September 9, 2026
open-slide is a powerful slide framework built for AI agents, enabling users to create presentations by describing them in natural language. Coding agents then generate the React components, while open-slide handles the canvas, scaling, navigation, and presentation modes. This allows agents to focus entirely on content, streamlining the creation of polished, agent-driven decks.

SandBase CLI: Connect Your AI Agent to 2,000+ Models and APIs
September 4, 2026
SandBase CLI is an open-source command-line interface and local MCP server that supercharges AI agents. It connects 25 popular AI clients, such as Claude Code, Cursor, and ChatGPT, to over 2,000 AI models and APIs, simplifying complex integrations. This powerful tool streamlines AI agent development by offering a unified gateway, removing the hassle of API key management and configuration.

Tessera: A Comprehensive Workspace for AI Coding Sessions and Agent Orchestration
September 4, 2026
Tessera is a powerful workspace for organizing AI coding sessions, acting as a local control room for agents like Claude Code, Codex, and OpenCode. It enables parallel sessions, isolated Git worktrees, and Kanban boards, streamlining complex AI development workflows. Developers can manage agents, track tasks, and complete Git operations all within one integrated environment.

OGAD: Private, On-Device AI with an OpenAI-Compatible Local Gateway
September 4, 2026
OGAD (Off Grid AI Desktop) is an open-source, AGPL-licensed application for private, on-device AI. It enables users to run various open models, including text, vision, image, and voice, entirely locally through a single OpenAI-compatible gateway. This ensures complete data privacy with no cloud dependencies, accounts, or API keys.
Source repository
Open the original repository on GitHub.
15 counted GitHub visits