Playwright and Storybook Integration: Finally, a marriage between application and test code!

Playwright and Storybook Integration: Finally, a marriage between application and test code!

Before I completely close 2023, set the Jira tickets to done, push the code and approve all PRs, I would like to take another look back. 2023 was a very interesting year, especially on a personal level, but I would like to once again reflect on a moment that I found to be a real eye-opener for our beautiful industry . It was not a shocking moment, not a moment with much fuss or fireworks, but a moment whose impact only dawned on me later. A moment that showed me how far we have come with E2E test automation.

The moment in 2023 was (drum roll): Experiencing the integration between Playwright and Storybook!

“Two tools that work together, Mies. How long have you been working in this industry?” That may sound logical but hear me out.

It’s about the principles and functions of these two products. Storybook is a tool/workshop for building isolated UI components. And Playwright offers reliable end-to-end testing for modern web apps.

In my early years, Selenium and WebDriver were two different projects. WebDriver was seen as spyware by browsers and there was a significant gap between development and E2E testing. For years I have been emphasizing that test code and development code are equivalent, that we must meet the same standards and that we must be taken just as seriously. Unfortunately, I was not always appreciated for this…

That brings me back to the interaction between Storybook and Playwright. Storybook is located in the frontend repository and is part of the application code. Due to the integration of Playwright with Storybook, a Playwright code is now also available in the frontend repo.

An E2E library and associated code are part of the application code. And that has been one of the key points of recent years:

It is no longer necessary to keep application and test code separate.

Both fit well together in one repo and in some cases are even desirable! Thanks to the integration between Storybook and Playwright, this is even encouraged. In my early years it was unthinkable but look where we are now: application and test code together. It is possible, it is allowed, it is supported. And as I mentioned earlier, announced without much fuss or fireworks, but quietly rolled out so that we can all get used to it.

Thank you, Storybook and Playwright.

Recent news

Contact

Do you have a question, idea or comment? Feel free to contact us. We will respond within one working day.

"*" indicates required fields

Share

Let’s talk

Do you have a question, idea or comment? Feel free to contact us!