vitest-dev / vitest

Next generation testing framework powered by Vite.
https://vitest.dev
MIT License
13.07k stars 1.17k forks source link

Playwright comparison #2196

Open sand4rt opened 2 years ago

sand4rt commented 2 years ago

Clear and concise description of the problem

As a developer using Vitest, I want to be able to read a Playwright comparison so that I understand which tool to use in which situation.

Suggested solution

Playwright is a fairly new testing and automation framework from Microsoft, developed by the same team that created Puppeteer. It supports various programming languages and testing types such as end-to-end, API, UI component and unit tests all within a single tool and a single API.

TODO: add comparison

Validations

madurapa commented 1 year ago

What is the status of this?

mekwall commented 8 months ago

I use Playwright for end-to-end testing and vitest for unit and integration testing. The reasoning here is that vitest is much better suited for unit and integration testing as it can leverage testing library to render ui components outside of a browser environment. It also features watch functionality which is essential when doing test-driven development. As a bonus it is much faster than Playwright.

cub commented 1 month ago

And now Vitest has "browser mode" which launches Playwright (or webdriverio). What are the interests of launching the tests via Vitest and not directly via Playwright ?