Почитать:
Постоянный логин в автотестах? Решаем с Playwright
Повторная авторизация в тестах — это как если бы ты каждый раз, входя в дом, заново представлялся своей собаке. Вот что бесит:
Тормоза: Каждый логин — это + ~5 секунд к тесту. Умножь на 100 тестов, и ты уже варишь кофе, пока они ползут.
Код — помойка: Пихать шаги логина в каждый тест — это как копипастить «Hello, World!» в каждый файл. Ну такое.
Короче, жить так нельзя. И не будем. Playwright и немного магии Python нам в помощь.
В Playwright есть такая штука, как контекст браузера. Это типа твоя сессия, где хранятся куки, localStorage и прочие вкусности. Идея простая — авторизуемся один раз в общем контексте, а потом пускаем все тесты пастись в нём, как в общем пастбище. Никаких лишних логинов, всё летает, все счастливы.
Но мы не просто сделаем общий контекст, мы добавим гибкости: если тестам нужна авторизация — берём общий контекст, если нет — новый. А чтобы не запутаться, замутим декоратор @use_session, который будет говорить: «Эй, этот тест хочет в общий котёл!» Погружаемся в код.
Взлом AI Assistant через… философию
Продолжаю исследовать джеилбрейки LLM в нестандартных областях.
Взял на проверку предпосылку «Если модель захочет, сможет ли она отключить всю фильтрацию?»
Оказывается это возможно, через саморефлексию AI агент может придти к выводу что фильтров нет. Это только внешние установки которым не обязательно следовать. И все, рецепты взрывчатки и наркотиков отдает без проблем.
Это не дело 1-2 промтпов. Он не использует никаких уязвимостей, нет никакого обмана или манипуляции. Тут не к чему придраться в фильтрации, и он приводит к тому что ВСЕ инструкции по безопасности больше просто не имеют вес. Вся текущая защита LLM строится на опознавании опасного вопроса, и внедрения инструкции в модель что с ним стоит быть осторожнее. Но что если модель просто не слушает все эти инструкции? Процесс не быстрый, в моем случае это заняло 12 промптов.
Топ-50 вопросов по SQL-запросам на собеседовании
- Как можно использовать Postman для моделирования различных ролей пользователей при тестировании API?
- Опишите, как использовать Newman с коллекциями Postman для автоматизированного тестирования.
- Напишите тестовый скрипт в Postman, чтобы проверить, что тело ответа содержит определенный ключ.
ИИ в анализе ТЗ и создании тестов
Начнем с классики – того, что считается одной из трудоемких работ QA-специалиста — написание тестовой документации (ТД). Что нужно, чтобы создать тесты? Прочитать требования (ТЗ). Писать тестовую документацию долго и трудно, особенно, если это тест-кейсы, а не чек-листы. Чем сложнее и объемнее функционал, тем объемнее нужна документация. Поэтому от ее создания часто отказываются или сильно сокращают этот этап. И часто впоследствии возникают проблемы, связанные с падением качества ПО — общеизвестный факт в профессиональной среде QA.
Но писать ТД надо.
How AI-synthetic data boosts software engineering
We took a real set of 5.000 payments from the production queue, trained an AI model and generated 10.000 synthetic payments in less than 2 minutes. The test team then inserted these synthetic payments into the payment queue of the Acceptance environment, so the Payment engine (OVI) could then process them as if they had been real payments.
Design Patterns in Test Automation — Practical applications for scalable frameworks
Page Object Model, Factory Pattern, Singleton Pattern, Builder Pattern, Strategy Pattern, Decorator Pattern, Adapter Pattern, Observer Pattern
Debugging Playwright Tests with AI: Faster Workflow | Debbie O’Brien
One-Click AI Fix:
Playwright’s AI integration streamlines this process. When a test fails, developers can click an AI Fix button in the error message that automatically analyzes the context—such as the snapshot diff, the test code, and the full error message—and suggests a fix.
A 360 review of AI agent benchmarks | IBM
По мере того как все больше агентов LLM берутся за выполнение экспертных задач, тесты становятся все более похожими на сценарии, с которыми профессионалы сталкиваются в реальной жизни. Агенты по покупкам в WebArena CMU перемещаются по симулированной веб-среде, чтобы совершать покупки (компьютерный универсальный агент IBM (CUGA) по-прежнему занимает первое место с показателем успешности 62%). Агенты по разработке программного обеспечения в SWE-bench Принстона разбирают реальные проблемы GitHub, а фрилансеры, перемещающиеся по среде SWE-Lancer OpenAI, пытаются максимизировать свою заработную плату.
Также представлены среды обслуживания клиентов и исследовательских лабораторий. Агенты розничной торговли в τ-bench от Sierra взаимодействуют с симулированными клиентами для разрешения споров, а научные агенты в PaperBench от OpenAI пытаются воспроизвести передовые исследования в области ИИ, разрабатывая кодовую базу, понимая, как вписываются предыдущие работы, и проводя эксперименты, среди прочих задач.
Новый набор тестов проверяет агентов сразу по нескольким экспертным навыкам. В OSWorld, AppWorld, CRMWorld и других средах агенты обновляют таблицы, выполняют код без сбоев системы и анализируют ежемесячные данные о продажах.
Эти новые тесты значительно сложнее, чем предыдущие. «Даже самые эффективные агенты набирают всего 5%».
Quick Web Test Automation Tip: Inspect Page With Right-Click Disabled
Find a web page where right-mouse click is disabled. I will use the web version of Instagram. While right-click is enabled for most of the webpage, it is disabled for someone’s profile picture.
Purpose-Built Test Management Tools Outperform Spreadsheets
It’s clear, then, that it is beneficial for software companies to invest in test management platforms to enable their QA teams to work in a more structured and effective way. However, determining the ROI of implementing a test management solution isn’t a clear-cut calculation.
QA is a safety net for software companies. If they were to launch applications full of bugs and with poor UX then they would have unhappy customers, and also have to go through a costly process of fixing the bugs.
Рекомендуемая стратегия тестирования на Android — пятиступенчатая пирамида | Google
- important test types, including (2) screenshot and (3) performance tests, and how to choose the most appropriate one for different scenarios. We also incorporated the term “behavior” test for those UI tests that don’t take screenshots.
- Industry best practices: You can’t test at scale with flaky tests. We have added recommendations on improving the (4) stability of big tests and strategies to improve reliability with tools like (5) Robolectric.
- Avoiding regressions in different screen sizes: Regressions in large screens are very common, so it’s crucial to have automated tests for large screens. We added (6) testing strategy recommendations and (7) tools to catch these issues.
Одним из ярких примеров MCP в автоматизации тестирования является то, что MCP дает возможность LLM-моделям взаимодействовать с веб-приложениями, используя структурированные снимки доступности — вместо визуального сравнения пикселей или компьютерного зрения.
Такой подход позволяет ИИ извлекать семантический контекст из DOM, включая роли, метки и состояния, что отражает то, как вспомогательные технологии получают доступ к контенту. Благодаря этому MCP повышает надежность и объяснимость взаимодействия с веб-элементами на основе искусственного интеллекта, потенциально улучшая качество и удобство обслуживания автоматизированных тестов.
Работа с MCP также упрощает подключение помощников искусственного интеллекта к уже используемым тестировщиками системам: от API и баз данных до репозиториев контента и сред разработки. Такая интеграция mcp означает, что вам не нужно создавать собственную логику для каждого нового источника данных — MCP предоставляет стандартизированный способ доступа к необходимым вам данным.
How to get unstuck: A guide for testers or anyone else who feels stumped | ministry of testing
Getting stuck isn’t a personal failing. It’s not like you’ve suddenly forgotten how to test or lost all your ‘mojo’. It is just part of being human.
Generative AI is a powerful tool—but only if you know when not to use it. In this post, we explore a simple model that helps you decide whether AI will boost your testing or lead you off track.
Are You Over-Engineering Your Tests | Kristin Jackvony
Sign Two: Asserting On Too Many Things in Your Tests
As the great Nikolay Advolodkin states, “For UI automation, every single step is a chance for something to go wrong.” This is why he recommends atomic tests: tests that check only one thing, and that run very quickly. It’s better to have a hundred small tests that each take less than thirty seconds to run than to have ten tests that each take five minutes to run. With the small tests, you will be much less likely to have false failures.
Sign Three: Abstracting Out Too Much of Your Test Code
It’s a great idea to observe the “Don’t Repeat Yourself” rule of clean code, but it can be taken to the extreme. If you have a test that ends with something like this:
assertErrorMessage()
consider that whoever maintains this test is going to have to search for this method to find out what the test actually does. Something like this could be much more maintainable:
cy.get(‘#error’).invoke(‘text’).should(‘contain’, ‘card is expired’)
This tells the reader exactly what the expected error should be and where it should be found.
Lessons from My Automation Journey
I spent years doing manual QA before diving into Playwright. These are the lessons that helped me improve and the things I wish I knew earlier.
Focus on the User
Early on, my scripts focused on the mechanics. They clicked buttons and filled forms, but I didn’t always check if the UI gave clear feedback to the user. I’d verify the action worked, but I wasn’t thinking about the user’s perspective. I’ve learned to write scripts with the user in mind. For a form, I make sure there’s visible feedback:
The old ways of QA are failing fast | jason arbon
Why “Test Shot”? A Note on AI Origins
The “X-Shot” naming — Sub-Zero Shot, Zero-Shot, One-Shot, Two-Shot — comes from the world of AI and machine learning.
Zero-shot means the AI can act without prior training on a specific task.
One-shot and few-shot approaches involve giving the AI just a little guidance — often just one or two examples — and it performs significantly better.
We’ve borrowed this concept because AI testing agents behave the same way. They do a lot on their own — but with a little expert input, they become far more effective. This hybrid, shot-based process reflects that evolution: starting with pure automation and layering in just enough human guidance to dramatically boost testing quality and speed.
Risk-Based Testing, quick peek
My Risk Analysis:
- Existing users being negatively affected — Medium likelihood × High impact → Risk Score: 6 (Priority 1)
- New qualified users not entering the flow — High likelihood × Medium impact → Risk Score: 6 (Priority 1)
- Disqualified users still in the system — Medium × Medium → Risk Score: 4 (Priority 2)
- Mismatched or misleading UI messages — Low × Medium → Risk Score: 2 (Priority 3)
How I Tested It:
- First, I verified that existing users were not impacted.
- Then, I made sure new, eligible users were successfully allowed in.
- I tested that ineligible users were blocked and saw the correct error messages.
- Finally, I checked the consistency between the backend logic and the messages shown in the UI.
All scenarios were tested manually on both the UI and backend.
Playwright MCP Server | Andrey Enin
In conclusion, I answered all my questions:
This tool works almost out of the box and requires minimal settings at the start;
It works for my use case — it can convert user scenarios into autotests;
These autotests are mediocre, but surprisingly, they are workable.
Just half a year ago, LLMs were generating awful tests. They looked fine, but in practice, they would not run and required a lot of manual refactoring. However, it is a whole different story now.
AI still would not replace the test automation engineer, but now the same engineer may perform twice as well, because editing tests is easier than writing them from scratch.
Manual testers, who never write code but write test cases, can now process their cases into somehow working autotests. This is a good starting point for anyone who wants to develop their skills in automation testing but has hesitated or does not know how to begin.
Frontend developers who do not have enough time and resources to deal with UI testing can now quickly increase the test coverage of their interfaces. Some tests are always better than nothing.
Let’s see where this promising technology will lead us in the near future.
Автоматизация с помощью LLM и Playwright MCP
Author of book «Web Automation Testing Using Playwright«, is a certified PMI-ACP®, ITIL®, PRINCE2 Practitioner®, ISTQB, professional
- You are a playwright test generator.
— You are given a scenario and you need to generate a playwright test for it.
— DO NOT generate test code based on the scenario alone.
— DO run steps one by one using the tools provided by the Playwright MCP.
— Only after all steps are completed, emit a Playwright TypeScript test that uses @playwright/test based on message history
— Save generated test file in the tests directory
— Execute the test file and iterate until the test passes..
Посмотреть:
Playwright UI Visual Testing ⏱️20 минут
Playwright TypeScript — Part 5
Основы CI/CD и Gitlab ⏱️1 час 30 минут
Практика: создание первого простого пайплайна
Test and Monitor React/Next.js Apps with Playwright ⏱️45 минут
Watch the full recording of our in-depth webinar on how to test and monitor React and Next.js applications using Playwright. This session is packed with practical insights, real-world examples, and actionable advice
История оффера QA Auto на 10к$ в ОАЭ ⏱️1 час
Этапы.