Cypress vs Playwright Advent Calendar Day 4
Where do the end-to-end tests run?
There is a big big big difference between Cypress and Playwright: the Cypress tests execute in the browser, while Playwright runs the test itself in Node and only sending individual commands to the browser. You can see it yourself by simply doing console.log(‘hello’) command.
Playwright test runs in Node
const { test } = require(’@playwright/test’)
test(’prints hello’, async () => {
console.log(’hello’)
})You can see the “hello” string appear in the Node terminal
Cypress test runs in the browser
Let’s take the same test and see where the message appears
it(’prints hello’, () => {
console.log(’hello’)
})The message is shown in the browser DevTools console.
Having the test run inside the same browser context makes a huge difference in what the test can do. Spying and stubbing application code, direct object references, component testing - they all become possible in Cypress, while very hard to achieve in Playwright.
This advent calendar is based on my online course “Cypress vs Playwright“ and open-source workshop bahmutov/cypress-workshop-cy-vs-pw. You can find links to the previous advent calendar days in my blog post “Cypress vs Playwright Advent Calendar 2025“.



