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.

background-agents: An Open-Source System for Background Coding Agents
August 10, 2026
background-agents is an open-source system designed for running background coding agents. It enables developers to automate tasks, collaborate in real-time, and integrate with various platforms like GitHub, Slack, and Linear. With support for multiple AI models and full development environments, it streamlines development workflows and enhances productivity.

Clowder AI: Orchestrating AI Teams for Collaborative Development
August 10, 2026
Clowder AI is an innovative platform designed to transform isolated AI agents into cohesive, collaborative teams. It emphasizes persistent identity, cross-model review, and shared memory, enabling AI models like Claude, GPT, and Gemini to work together seamlessly. This platform empowers users to orchestrate AI workflows, fostering a new paradigm for AI-driven development and co-creation.

LobeHub: Your Chief Agent Operator for AI Team Orchestration
August 8, 2026
LobeHub acts as a Chief Agent Operator, streamlining the management of your AI team. It enables hiring, scheduling, and reporting on agents for 24/7 operations, allowing users to maintain control without constant online presence. This platform transforms individual AI tools into a cohesive, productive team.

Memori: Agent-Native Memory Infrastructure for LLM Production Systems
August 6, 2026
Memori provides agent-native memory infrastructure, offering an LLM-agnostic layer that transforms agent execution and conversations into structured, persistent state. Designed for enterprise use, it seamlessly integrates with existing data infrastructure and supports various deployment environments, ensuring robust memory management for AI agents.
Source repository
Open the original repository on GitHub.
10 counted GitHub visits