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.

Voicebox: The Open-Source AI Voice Studio for Cloning and Dictation
June 25, 2026
Voicebox is an innovative open-source AI voice studio that allows users to clone voices, generate speech in multiple languages, and dictate into any application. It provides a comprehensive, local-first voice I/O stack, offering a powerful alternative to cloud-based solutions. This tool ensures complete privacy and control over your voice data, running entirely on your local machine.

EasyWhisperUI: A Cross-Platform Desktop App for Whisper Model Transcription
June 22, 2026
EasyWhisperUI is a fast, local desktop application designed for transcribing audio and video using the Whisper model. It offers GPU acceleration across Windows, macOS, and Linux, providing a user-friendly interface for various transcription tasks. The application supports features like live transcription, batch processing, and translation, making it a versatile tool for media processing.

Dexter: An Autonomous Agent for Deep Financial Research
June 22, 2026
Dexter is an autonomous financial research agent designed to think, plan, and learn while performing analysis. It leverages task planning, self-reflection, and real-time market data to tackle complex financial questions. This project provides a powerful tool for in-depth financial exploration, emphasizing its educational and informational purposes.

Piping Server: Infinite Data Transfer Over Pure HTTP
June 20, 2026
Piping Server is an innovative open-source project enabling infinite data transfer between any device over pure HTTP. It acts as a simple, storageless server, facilitating data streaming with just `curl` or a web browser. This makes it ideal for secure, real-time communication and large file transfers without requiring any installation.
Source repository
Open the original repository on GitHub.