TestCafe Studio Integration: Record, Edit, and Run Tests Without Code
TestCafe Studio is the visual IDE for TestCafe — a desktop application that lets you record browser interactions, generate tests without writing code, and run them against any browser. It's particularly valuable for QA teams who need to write tests but don't have JavaScript expertise, and for developers who want to bootstrap test skeletons before hardening them.
This guide covers the integration points between TestCafe Studio and code-based TestCafe projects, and how to use both together effectively.
What TestCafe Studio Is (and Isn't)
TestCafe Studio is a separate product from the open-source testcafe npm package. It requires a commercial license for teams, though individual use has a free tier.
Key capabilities:
- Visual test recorder — click through your app, Studio generates the test
- Test editor with element picker
- Run tests from the GUI or CLI
- Export tests as JavaScript for use with the npm package
It is not:
- A replacement for code-based tests in complex scenarios
- A way to run TestCafe npm package tests from within Studio without exporting
- A cloud runner (you run tests locally from Studio)
Setting Up TestCafe Studio
- Download from devexpress.com/testcafe-studio
- Install as a desktop app (Windows, macOS, Linux)
- Open an existing TestCafe project folder or create a new one
Studio recognizes .testcafe project files and existing testcafe test files in your project directory.
Recording Your First Test
- Click Record in Studio
- Enter the starting URL of your application
- A browser opens with the recording toolbar active
- Interact with the page — clicks, form fills, assertions all get captured
- Stop recording
Studio generates a visual test representation — a list of actions and assertions. You can view this as a step-based UI or switch to the Code Editor view to see the generated JavaScript.
What Gets Generated
A recorded login sequence might produce:
import { Selector } from 'testcafe';
fixture `Login`
.page `https://app.example.com/login`;
test('Login test', async t => {
await t
.typeText('#email', 'user@example.com')
.typeText('#password', 'password123')
.click('[data-testid="login-btn"]')
.expect(Selector('.dashboard-title').innerText).eql('Dashboard');
});Studio prefers data-testid attributes when available, falling back to CSS selectors.
Exporting Tests to Your Codebase
Studio tests can be exported as .js files compatible with the TestCafe npm package.
Export workflow:
- Right-click a test in the Studio tree → Export to JavaScript
- Choose destination — your project's
tests/folder - The file is now a standard TestCafe test file
From this point, you can run it with:
npx testcafe chrome tests/recorded-login.jsNo Studio dependency at runtime. The exported file is pure TestCafe npm package code.
Mixing Studio Tests with Coded Tests
You can have Studio-originated tests and hand-written tests in the same project. TestCafe treats them identically — they're all just .js files.
A practical workflow:
- Use Studio to record the happy path
- Export to
tests/feature.js - Edit the file manually to add:
- Error case assertions
- Data-driven test variations
- Role-based authentication (Studio's recording captures credentials literally — replace with
Role()) - Dynamic selectors
// Before (Studio-generated)
test('Login', async t => {
await t
.typeText('#email', 'admin@example.com')
.typeText('#password', 'secret123')
.click('#submit');
});
// After (hardened)
import { Role } from 'testcafe';
const adminRole = Role('https://app.example.com/login', async t => {
await t
.typeText('#email', process.env.ADMIN_EMAIL)
.typeText('#password', process.env.ADMIN_PASSWORD)
.click('#submit');
});
test('Admin reaches dashboard', async t => {
await t.useRole(adminRole);
await t.expect(Selector('.dashboard-title').exists).ok();
});Studio in CI/CD
TestCafe Studio has a CLI mode that can run tests in headless environments:
# Run a Studio test file in headless Chrome
testcafe-studio run tests/studio-test.testcafe --browser chrome:headlessNote: testcafe-studio CLI is part of the Studio product, separate from the testcafe CLI. If you've exported tests to .js, use the standard testcafe CLI instead.
For CI, export tests to JavaScript and run with testcafe. This avoids the Studio license requirement in CI:
# .github/workflows/test.yml
- name: Run tests
run: npx testcafe chrome:headless tests/
# Uses testcafe npm package, not StudioElement Picker Integration
Studio's element picker is useful even if you mostly write tests by hand. When you're stuck on a tricky selector:
- Open Studio, navigate to your app
- Use the element picker to hover over the target element
- Studio shows the generated selector
- Copy that selector into your code
This is faster than inspecting DevTools and constructing the selector manually, especially for elements with complex positioning or dynamic attributes.
Keeping Studio Tests in Sync
A common problem: Studio tests are recorded against a specific version of the UI. When the UI changes, selectors break.
Best practices to reduce maintenance:
- Re-record sparingly — recording a new test and comparing it to the old one helps spot what the UI change broke, but don't make re-recording your maintenance strategy.
Use parametrized selectors after export rather than relying on Studio to re-record:
// Fragile (recorded by Studio)
const btn = Selector('.btn.btn-primary.mt-2');
// Stable (post-export edit)
const btn = Selector('[data-testid="submit-order"]');Add data-testid attributes to your UI components during development. Studio and the npm package both prefer these. They're stable across visual redesigns.
<button data-testid="submit-order">Submit Order</button>Studio for Non-Technical QA Teams
Studio's primary value is enabling QA team members who don't write JavaScript to create tests that developers can then maintain. The workflow:
- QA records the test flow in Studio
- QA exports and submits the
.jsfile via PR or hands it to a developer - Developer adds roles, error cases, and CI integration
- Test lives in the main test suite going forward
This creates shared ownership without requiring QA to learn TestCafe's API.
Limitations to Know
Recording doesn't capture intent. Recorded selectors reflect the implementation, not the user's goal. A recorded test that clicks .card:nth-child(3) doesn't communicate that it's testing "the most recent article." Post-export editing to add semantic selectors and comments is always necessary.
Complex interactions need code. Drag-and-drop, file uploads, canvas interactions, and iframe content are difficult or impossible to record reliably. These need code.
Dynamic content trips up recording. If your app generates unique IDs or timestamps in selectors, Studio records those literal values. You'll need to replace them with dynamic selectors after export.
No built-in assertions editor in recording mode. Studio generates assertions based on what you interact with, but adding specific value assertions (expect(el.textContent).eql('...')) requires switching to code view.
Continuous Testing Beyond Studio
Studio is a great creation tool, but it doesn't run tests on a schedule, alert you to regressions, or track test history. For that, you need something like HelpMeTest, which runs your exported TestCafe tests continuously against your staging environment and alerts your team when something breaks — without requiring Studio or a local browser to be running.
Summary
TestCafe Studio accelerates test creation, especially for teams with mixed technical backgrounds. Export tests to JavaScript and maintain them in your standard codebase. Use Studio's element picker even for hand-written tests. Add data-testid attributes in your app to keep recorded tests stable. Run exported tests with the testcafe CLI in CI — no Studio license required at runtime.
The best workflow treats Studio as a test skeleton generator, not a long-term test maintenance tool.