Skip to main content

Video · 5:07

Codex MCP for Testing: Add a Testing Agent

In this 5-minute walkthrough, OpenAI Codex connects to Wopee.io over MCP with one project file, .codex/config.toml, and the API key stays in the environment. Codex then lists the tests in the project, writes a new end-to-end test into an existing user story, dispatches the Wopee.io testing agent in the cloud and reads the result, without leaving the terminal. The video also covers how the Wopee.io MCP server differs from Playwright MCP and how to keep secrets out of the chat.

Chapters

  1. 0:00Codex and Wopee.io
  2. 0:10Browser MCP vs testing agent
  3. 0:39Get your API key and project
  4. 1:05Add Wopee.io to Codex
  5. 1:57Ask about your tests
  6. 2:15Write and run a new test
  7. 3:13What else it can do
  8. 4:23Next steps

Transcript

Cleaned from the video's captions.

0:00Codex and Wopee.io

Codex writes a new end-to-end test, runs it in the cloud, and reads the result, without leaving the terminal. And it passes.

0:10Browser MCP vs testing agent

Playwright MCP gives your agent a browser. The Wopee.io MCP server gives it a tester. With Playwright MCP, your agent drives a browser, click by click. It's free, it runs locally, and it can reach localhost, so it's great for quick checks. Wopee.io runs a testing agent in the cloud. It remembers your tests, your runs and your baselines, and it hands your agent a verdict it can act on. Many teams use both.

0:39Get your API key and project

You need two values from Commander. Open your project, then More, Settings, API Keys, and generate a new key. It's shown only once, so copy it right away. The same screen shows your project UUID. Your project repository already has a .env.example file, with the UUID filled in. Copy it to .env, paste the key, and keep that file out of git.

1:05Add Wopee.io to Codex

Codex keeps its MCP servers in a TOML file, config.toml. Your project repository has none yet, so add one: .codex/config.toml. The table is mcp_servers.wopee. The command is npx, with the args -y and wopee-mcp. And env_vars lists the two variable names. Codex forwards them from your shell, so the key never sits in the file. Here's the file in my project. I also pass the API address, because I record on our test instance. You don't need that. The last line lets the Wopee.io tools run without asking me every time. I load my .env file and start Codex. Then /mcp: wopee, connected, with fifteen tools.

1:57Ask about your tests

First question: how many tests do I have in Wopee.io, and which ones have never run? Codex calls the test inventory tool and answers with a table. Five tests. Two have never run, and the other three passed.

2:15Write and run a new test

Next: add a new Wopee.io test to the sorting user story. Sort the catalog by price from high to low, and check that the first product is the Sauce Labs Fleece Jacket. Sign in the same way the existing tests do. Then run it and wait for the result. Codex reads the existing tests first. Then it writes the new case into the user story, and dispatches the testing agent. The new case is US004:TC003. The password stays a project variable, TESTING_PASSWORD, just like in the existing tests. The run is asynchronous, so Codex waits, and checks again. I've cut the wait. About two minutes later: US004:TC003 passed. It signed in, selected Price, high to low, and the first product was the Sauce Labs Fleece Jacket. A new end-to-end test, written and run from the terminal.

3:13What else it can do

What else can it do? Generate tests from a spec: hand it a Jira epic or a README, and it builds a suite with test cases. File a failed run as a GitHub issue, with the failing step, a screenshot, and a link to the run. And point your tests at staging, by changing a project variable. A few tips. Keep the key in your environment, and commit the config with placeholders only. Each server entry works with one project, so a second project gets a second entry. And runs are asynchronous. If the result isn't there yet, just ask your agent to check again. One best practice. Keep secrets out of the chat. Your API key lives in your environment: the MCP server reads it, and your coding agent never sees it. For test logins, store the password as a Wopee.io project variable, and write the test with the variable, not the value. It's filled in only when the test runs. So never paste credentials into a prompt or a test step, and don't ask your agent to read your .env file either. Whatever it reads ends up in the model's context.

4:23Next steps

And if you'd rather not write tests at all, let our AI testing agent do the work. Describe in plain English what should work. It explores your app, turns your intent into tests, and runs them. Try it free at cmd.wopee.io, or book a demo at wopee.io/book-demo. The guide on docs.wopee.io has a page for each agent. And full walk-throughs for Claude Code, GitHub Copilot, Cursor and OpenCode are in the playlist. Thanks for watching. If this was useful, subscribe for more. Test better. Ship faster.

Try it yourself