Craft Conf 2022 and a life-changing discovery

Craft Conf 2022 and a life-changing discovery

Thanks to my dear friend, this year I was also able to participate in the 2022 Craft Conference, which was held in Budapest at the Hungarian Railway History Park. During my career as a software developer, I have already been to quite a few meetups and presentations, but I have never been to a developer conference of this size.

Due to the current pandemic period, I thought a lot whether to participate in the conference in person or online, because I haven't been around so many people in a long time, so I hesitated a lot. In the end, because of the life can't stop principle I decided to personally participate in this large-scale festival-like event.

I can say that I have not regretted my decision at all. During the two days, there were a total of more than 60 presentations to choose from, and the topics covered a wide spectrum.

Arriving at the venue on the first day, I was a little worried about how long we would have to stand in line for registration, but it shows the professionalism of the conference organization that it was done in a few minutes, despite the fact that there were already a lot of people. Coordinating, feeding and drinking all the people requires a lot of organization and hard work, but they managed to solve it without problems and any interruptions.

During the breaks of the presentations, it was possible to visit the sponsors' stands, where they provided all the necessary information about the given company and answered all your questions. I think it is an extremely good idea that all companies made smaller (or larger) games in which the participants could win different gifts.

There was a stand where a development task had to be solved, and another one, where the solution to a program code had to be thrown out with darts. I think the most imaginative task was put together by Craft Conf's diamond-level supporter, the Tesco Technology. After scanning the QR code, the applicant received a string from which GPS coordinates had to be decoded to obtain the prize. It caused me a headache for a few minutes, but fortunately I could solve the problem in the end. The GPS coordinates pointed to the Hungarian Railway History Park… Hehe, nice…

As developers, we must be aware of the importance of testing, nowadays it is a minimum requirement everywhere. I also make unit and integration tests on a daily basis, but E2E testing has so far only been on my long list of things to learn. Learning a new framework, syntax, or even a new language is a time-consuming and long-lasting process, not to mention the maintenance and development of the acquired knowledge, which is why I always pushed this item further on my list.

I thought that a presentation on this topic might make me want to start the learning process. That’s why I chose the presentation with the title Testing Web Applications with Playwright. Based on the title, I was sure that the presentation would be about testing.

Debbie O'Brien was the speaker, about whom was obvious from the first moment, that she is a very energetic lady who had already made many performances. She is working as a Senior Program Manager at Microsoft, she is also an international speaker, teacher, YouTuber, and open-source contributor.

debbie_obrien.jpg

First of all, she asked us who are the ones who always test all their applications. I wasn't surprised at all when only a few hands went up. Debbie listed the same reasons I didn't start E2E testing either. She believes Playwright can be the solution to all the problems that have arisen.

Playwright is a reliable end-to-end testing framework for modern web apps that runs in any browser, completely isolated and extremely fast. It supports several programming languages, including C#, which I also use on a daily basis, so I began to pay even more attention to the presentation.

Debbie didn't just want to introduce Playwright in general, she wanted to highlight its ease of use, for which she brought a website of her choice and presented the testing process from the beginning. The presentation focuses on Playwright's highly effective tools for demonstrating how easy it is to create a test.

The great advantage of Playwright is that, in addition to CLI commands, they also wrote a Visual Studio Code extension, so the test preparation and creation can be run directly from VS Code. The steps to install and add to a project are extremely simple and do not require too much pre-qualification.

playwright_install.png

I became very anxious when Debbie introduced CodeGen to the audience. CodeGen is an AI-based test generator that automatically creates tests following our actions on the website. Debbi's comment "even your mother can write tests now" brought a genuine smile to my face. Practically, all we have to do is to insert the automatically created tests into our project.

CodeGen.jpg

CodeGen uses css selectors, but we can use any other locators with which the given element can be accurately identified at any moment in time.

Another useful feature is the report creation, which practically creates a website for us with the most important data of the tests. The trace feature can also be turned on (not only in the event of an error), which shows us each step on a timeline. There is a complete DOM snapshot of each step, with all its advantages (inspect element), we can monitor the console, the network calls, it highlights all actions for us and shows a before-after state. To be honest, I liked this feature the most after CodeGen (obviously unbeatable), it is very spectacular, easy to use and can be shown to anyone if we want.

report.jpg

Of course, as soon as I got home, the first thing I did was to try out what was said at the presentation. After a little reading and playing, I tried it on a real project and I can honestly say, I was not disappointed.

The AI is not (yet) perfect, in some cases the locator choice is not always the best, but you can still write full-coverage tests in seconds. After that, I can no longer make excuses why I don't do E2E tests (or I’ll ask for my mom :D).

If you have the opportunity to attend such a large developer conference, don't hesitate. Playwright (CodeGen) alone made it worth for me to attend, but this was only one of many good performances. If I have a chance to go next year, I will go without hesitation.