惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
U
Unit 42
MyScale Blog
MyScale Blog
B
Blog
阮一峰的网络日志
阮一峰的网络日志
量子位
IT之家
IT之家
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
V
Visual Studio Blog
G
Google Developers Blog
Last Week in AI
Last Week in AI
雷峰网
雷峰网
博客园 - 聂微东
博客园 - 叶小钗
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
博客园 - 司徒正美
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
月光博客
月光博客
aimingoo的专栏
aimingoo的专栏

OpenAI Developers

API deployment checklist | OpenAI API Sora 2 Prompting Guide Codex Prompting Guide Docs MCP | OpenAI Developers Gpt-image-1.5 Prompting Guide GPT-5.2 Prompting Guide Transcribing User Audio with a Separate Realtime Request Modernizing your Codebase with Codex GitHub - openai/openai-sora-sample-app: Sample app to get started using the Video API with Sora GitHub - openai/openai-apps-sdk-examples: Example apps for the Apps SDK GitHub - openai/openai-chatkit-advanced-samples: Starter app to build with OpenAI ChatKit SDK GitHub - openai/openai-chatkit-starter-app: Starter app to build with OpenAI ChatKit + Agent Builder Rate limits | OpenAI API Web search | OpenAI API Getting started with datasets | OpenAI API Prompt optimizer | OpenAI API Verifying gpt-oss implementations How to run gpt-oss locally with LM Studio Fine-tuning with gpt-oss and Hugging Face Transformers How to run gpt-oss locally with Ollama Function calling | OpenAI API Models | OpenAI API Reasoning best practices | OpenAI API Reasoning models | OpenAI API Background mode | OpenAI API Batch API | OpenAI API Conversation state | OpenAI API File search | OpenAI API Flex processing | OpenAI API MCP and Connectors | OpenAI API
GitHub - openai/openai-testing-agent-demo: Demo of a UI t...
2025-07-18 · via OpenAI Developers

MIT License

This monorepo demonstrates how you can use OpenAI's CUA model and computer use tool to automate frontend testing. It uses Playwright to spin up a browser instance and navigate to the web app to be tested. The CUA model then follows the provided test case and executes actions on the interface until the test case is done.

The repo contains three applications that work together:

  • frontend – Next.js web interface used to configure tests and watch them run.
  • cua-server – Node service that communicates with the OpenAI CUA model and drives Playwright to interact in a browser with the sample app.
  • sample-test-app – Example e‑commerce site used as an example app to test by the agent.

screenshot

Caution

Computer use is in preview. Because the model is still in preview and may be susceptible to exploits and inadvertent mistakes, we discourage trusting it in authenticated environments or for high-stakes tasks.

How to use

  1. Clone the repository

    git clone https://github.com/openai/openai-testing-agent-demo
    cd openai-testing-agent-demo
  2. Prepare environment files

    If you haven't set your OPENAI_API_KEY environment variable on your terminal or globally on your machine (set up instructions here), edit each .env.development file and set OPENAI_API_KEY.

    cp frontend/.env.example frontend/.env.development
    cp cua-server/.env.example cua-server/.env.development
    cp sample-test-app/.env.example sample-test-app/.env.development

    The sample app also defines demo login credentials, which by default are:

    ADMIN_USERNAME=test_user_name
    ADMIN_PASSWORD=test_password

    Make sure you add a sample-test-app/.env.development file with the example credentials to run the demo.

  3. Install dependencies

    npm install
    npx playwright install
  4. Run all apps

    This will start all three apps:

    Navigate to localhost:3000 to see the frontend UI and run the demo.

For details on each app see their READMEs:

Customization

You can use this testing agent with any web app you choose, and update the test case and target URL either in the config UI or in the frontend/lib/constants.ts file (default values used in the UI).

sample-test-app is only provided as an example to try the demo, and frontend as a testing interface. The core logic of the testing agent is in cua-server, which is what you might want to bring into your own application.

Contributing

You are welcome to open issues or submit PRs to improve this app, however, please note that we may not review all suggestions.

Security Notes

  • This project is meant to be used on test environments only.
  • Do not use real user data in production.

License

This project is licensed under the MIT License. See the LICENSE file for details.