Testing in 2026

 Recently, I had to run regression tests to keep a complex process running while I made changes and added features.

Regression testing helps ensure quality and build client trust when we run large/complex processes; it is crucial to make sure old features keep working as expected and to catch any overlap early.

I know this is common in our sector, and we don't want to break anything that is already done, so being meticulous is a must. As engineers, we try to make things as simple as possible for the next time we walk through the same path, so.. I found my dream team to accomplish this goal:



If this is your first time taking testing to the next level like me, welcome!

Playwright is an end-to-end test framework for modern web apps. It bundles a test runner; here are some of the most-used commands.

Install Playwright: npm i  -D playwright

Generate code through the steps you do in the browser:    npx playwright codegen [url]

Run your testing:  node .\hello-playwright.js

Some useful lines of code

Get a screenshot of the result:  

await page.screenshot({path: `UserStoryResult.png`});

Record Playwright Testing:

        const context = await browser.newContext({

                recordVideo: {

                        // where is going to be saved

                        dir: `videos`

                }

        });


We're in the AI era, so I found that Playwright has an MCP that makes this easier. You can install it from Visual Studio Code.


I emulate a test of  "Alpacka Raft", adding a product to the shopping cart and validating it was added.


After building the User Testing, I did some local runs before pushing it to the repository I will use later for the automated Pipeline; there are 2 ways to achieve the same result: YAML or the UI. 

I used YAML. You can take the template from my Repository pauZc/PlaywrightPipeline.

First, create your repository in Azure DevOps.


Edit the reporter property in your Playwright configuration file, and change it in the Pipeline.




Save and Run your Pipeline. You will find this tab with the test results.

Another challenge was authentication because of MFA, so I used a service account. I can write more about this in another post.

References

Thank you for sharing your knowledge!

These videos were pieces of the puzzle:

What is Playwright? (🎭 Playwright introduction tutorial, features & demo)

Why Do You Need (or NOT) the Playwright MCP Server?

#3 Playwright with Azure DevOps Pipeline Tutorial: Complete Guide

Comments

Popular posts from this blog

Using external Fonts in Power Pages

PCF Commands

Portal (Power Pages) WebAPI & forget about clearing cache