Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation


Testing in general


Why do we test?


Not to slow things down...


But to speed up without damage


Finding Balance

We need balance between speed and quality

  • Pressure for quick delivery

  • Importance of quality

  • Effective testing processes


Types of testing

🧭 Usability test

🔁 Regression test

✅ User Acceptance test (UAT)

🔒 Security test

🧩 Unit test

🚀 Performance test

🏁 End-to-End testing (E2E)


Testing matters more today

  • AI behavior is dynamic and not always predictable

  • Small prompt changes can break your app

  • Less code ≠ less risk (often the opposite)

  • More integrations = more points of failure


Development process

  • Early integration of testing

  • Continuous testing practices

  • Alignment with development cycles


Testing isn’t a final phase;
it’s a mindset!


Testing is boring and time consuming!


Boring


We love automation


let's automate our testing

Happy


Monitoring


Power Apps Live monitor


What’s live monitor?

  • Live monitor your apps
  • Automated logging of actions and errors
  • Extend monitoring by using the Trace function
  • Share monitor session to collect session data
  • Application Insights

Where to find?

Open Live Monitor


How to use?

Use Live Monitor


More details

Use Live Monitor


Invite to monitor session

Use Live Monitor


Collect data from end users

Use Live Monitor


Extend live monitor


Extend with trace

  • Easy to use Power FX function

  • Can be used anywhere in your app (canvas or custom page)

  • Predefined severities

  • Add custom information to your monitor


How to use?

Use Live Monitor


Custom information

Use Live Monitor


Demo Time 👀


Automated testing


Why automate?

  • Faster execution of tests
  • Consistency & reliability
  • Faster detection of regressions
  • Integration into CI/CD pipelines
  • Less boring & time consuming

Power Apps Test Studio


Test Studio

  • Low-code solution for writing, organizing and automate your tests
  • Record your tests or write tests in Power Fx code
  • Integrated in Power Apps Studio
  • Automate your tests using Test Engine

Where to find?

Open Test Studio


Record new test

Record new test in Test Studio


However, there is a challenge 😩

Components & modern controls in Test Studio


Power FX

Components & modern controls in Test Studio


theme: light layout: intro-image transition: slideLeft

Validate Tests

Components & modern controls in Test Studio


theme: light layout: intro-image transition: slideLeft

Output options

Output options Test Studio


theme: light layout: two-columns transition: slideLeft

Pros

✅ Integrated in Power Apps Studio

✅ Easy to use

✅ Power FX on board

✅ ALM options with Test Engine

::right::

Cons

⚠️ Canvas Apps only

⛔ Modern controls & components

⚠️ Not much output and reporting

⚠️ In development ?!


Test engine (Deprecated)


Automate using Test Engine

  • Power Platform CLI component
  • Export your tests from Test Studio
  • Add a little bit of YAML magic
  • Add functions (like screenshots or assertions)
  • Automate via PAC CLI in your pipelines

Run your test

Run your Test Studio test using PAC CLI

pac test run 
    --provider canvas 
    --test-plan-file your-testplan.te.yaml 
    --tenant your-tenantid-guid-value 
    --environment-id your-environmentid-guid-value

Playwright


What's Playwright?

✅ Cross-browser, Cross-platform, Cross-language

✅ Easily record your tests with Codegen

✅ Automatic page inspection (DOM)

✅ Testrun information in the Trace Viewer, UI Mode and/or report function

✅ DevOps or GitHub integration

✅ For all modern web applications

💯 Open-source from Microsoft


Getting Started VS Code

1️⃣ Get the Visual Studio Code Extension

2️⃣ Initialize Playwright

3️⃣ Start recording your first test

4️⃣ Choose your browser(s) and play your test

5️⃣ Get your report


Getting started VS Code

Playwright - Extension


Initialize Playwright

Playwright - Extension


Record your test

Playwright - Recording


Run your test

Playwright - Run test


Get your report

Playwright - Get report


How does it work?

1️⃣ Record a test using Codegen

2️⃣ It generates a scripted test for you (live)

3️⃣ Add custom assertions (evaluate value)

4️⃣ Runs every single line of the generated code

5️⃣ Checks true or false (with await)


How does it look like


Assertion

Add additional assertions to your tests

await expect(
    page.getByTestId('status')
).toHaveText('Submitted');

Canvas app example

await expect(
    page.locator('iframe[name="fullscreen-app-host"]')
    .contentFrame().getByRole('spinbutton', { name: 'Hours' })
).toHaveValue("1");

Aria snapshot

Create snapshots to provide a YAML representation of a selection

await expect(page.locator('#content')).toMatchAriaSnapshot(
    - navigation:
      - list:
        - listitem:
          - link "Intro":
            - /url: /emea2025
        - listitem:
          - link "Speakers":
            - /url: /conferences-and-events/directions/emea2025/speakers
    );

Screenshots & screen recording


Screenshot

Create and save screenshot

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

Screen recording

Create and save screen recording

// Record video
await page.screencast.start();

await page.screencast.stop();

Screen recording

Add information to screen recording

await page.screencast.showChapter('Verifying checkout flow', {
  description: 'Navigating Canvas App',
});

Run & view your tests


View your tests

  • Headed browser
  • Trace Viewer
  • Reports
  • UI Mode

Show report

Get your report

npx playwright show-report

theme: light layout: intro-image transition: slideLeft

Show report

Playwright - UI Mode


theme: light layout: intro transition: slideLeft

UI Mode

Run your tests in UI mode

npx playwright test --ui

theme: light layout: intro-image transition: slideLeft

UI Mode

Playwright - UI Mode


There is so much more ...

✅ Emulation (viewports & devices)

✅ Parallelism

✅ Accessibility testing

✅ API Testing

✅ Mock API's

✅ Visual comparisons


AI & Playwright


Multiple Options

  • Agents
  • Playwright MCP
  • Playwright CLI & Skills

Playwright Agents


Three Playwright Test Agents

  • Planner
  • Generator
  • Healer

Getting Started

Start with adding Playwright Test Agent by using the initialize agents command

npx playwright init-agents --loop=vscode

Playwright MCP


Playwright MCP Server

A Model Context Protocol server that provides browser automation capabilities using Playright. Enables LLMs to interact with web pages through structured accessibility snapshots


Quick Start

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

Playwright CLI & Skills


Getting Started

Install CLI & Skills

npm install -g @playwright/cli@latest

playwright-cli install --skills

Playwright CLI

playwright-cli open [url]               # open browser, optionally navigate to url
playwright-cli goto <url>               # navigate to a url
playwright-cli close                    # close the page
playwright-cli type <text>              # type text into editable element
playwright-cli click <ref> [button]     # perform click on a web page
playwright-cli dblclick <ref> [button]  # perform double click on a web page
playwright-cli fill <ref> <text>        # fill text into editable element
playwright-cli fill <ref> <text> --submit # fill and press Enter
playwright-cli drag <startRef> <endRef> # perform drag and drop between two elements
playwright-cli hover <ref>              # hover over element on page
playwright-cli select <ref> <val>       # select an option in a dropdown
playwright-cli upload <file>            # upload one or multiple files
playwright-cli check <ref>              # check a checkbox or radio button
playwright-cli uncheck <ref>            # uncheck a checkbox or radio button
playwright-cli snapshot                 # capture page snapshot to obtain element ref

Playwright Skills

/playwright-cli Open learn.microsoft.com. Test the complete user journey. Report any failures with screenshots.

What about authentication?


Multiple Options

✅ Username & Password

✅ One Time Passwors (OTP)

✅ Save Authenticated State


Save Authenticated State

const authFile = path.join(__dirname, '../playwright/.auth/user.json');

setup('authenticate', async ({ page }) => {

    // login process

    await page.context().storageState({ path: authFile });

});

Continuous integration


Continuous integration

✅ GitHub Actions

✅ Azure DevOps Pipelines

✅ Docker

✅ Google Cloud Build

... and many more


GitHub Actions

During the installation of the Playwright extension, you get a GitHub workflow file!

See .github/workflows/playywright.yml

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages