Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

60 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Visual Studio Marketplace

Playwright for Power Platform DevOps Extension

Automate end-to-end testing of your Power Platform applications with Playwright in Azure DevOps pipelines. This extension provides a comprehensive testing solution that sets up Playwright, executes tests against Power Apps, and generates detailed reports with failure analysis for CI/CD workflows.

Overview

The Playwright for Power Platform DevOps Extension is a specialized Azure DevOps task that enables automated UI testing of Power Platform applications using the Playwright testing framework. This extension eliminates the complexity of setting up testing environments by automatically installing dependencies, configuring authentication, and executing comprehensive test suites.

Built specifically for Power Platform applications, this extension handles the unique challenges of testing Power Apps, including Office 365 authentication flows, dynamic loading patterns, and Power Platform-specific UI controls.

Key Features

πŸš€ Zero-Configuration Setup

  • Automatically installs Node.js, Playwright, and all required dependencies
  • Pre-configured testing framework optimized for Power Platform applications
  • No manual environment preparation required

πŸ”§ Version Management (New in v1.0.15+)

  • Version Control: Specify exact versions, branches, tags, or commits for testing
  • Version Pinning: Lock tests to specific framework versions for consistency
  • Development Workflow: Test against feature branches before production deployment
  • Controlled Repository: Uses curated Playwright framework for reliability

🎯 Power Platform Optimized

  • Native Office 365 authentication handling
  • Pre-built selectors and waits for Power Platform controls
  • Support for both Canvas Apps and Model-Driven Apps
  • Integration with Power Platform URL patterns and behaviors

πŸ” Advanced Debugging & Analysis

  • Automatic screenshot capture on test failures
  • Optional video recording of test execution
  • Detailed trace files for step-by-step debugging
  • Network activity monitoring and logging
  • Comprehensive error analysis and reporting

🌐 Multi-Browser Testing

  • Support for Chromium, Firefox, and WebKit browsers
  • Option to run tests across all browsers simultaneously
  • Browser-specific configuration and optimization

πŸ“Š Enterprise-Grade Reporting

  • Interactive HTML reports with execution timeline
  • JSON results for automation and integration
  • JUnit XML format for CI/CD pipeline compatibility
  • Automatic artifact collection and organization

How It Works

  1. Environment Setup: Automatically installs Node.js and Playwright testing framework
  2. Test Preparation: Copies your test files and configures environment variables
  3. Test Execution: Runs your Playwright tests with Power Platform optimizations
  4. Result Analysis: Generates comprehensive reports with failure diagnostics

Getting Started

Prerequisites

  • Azure DevOps pipeline with Windows or Linux agent
  • Power Platform application URL
  • Test user credentials with appropriate permissions
  • Playwright test files (JavaScript or TypeScript)

Basic Usage

Add the task to your Azure DevOps pipeline:

- task: mightoria-playwrightForPowerPlatform@1
  displayName: 'Run Power Platform Tests'
  inputs:
    testLocation: '$(System.DefaultWorkingDirectory)/tests'
    browser: 'chromium'
    trace: 'retain-on-failure'
    outputLocation: '$(Agent.TempDirectory)/test-results'
    appUrl: 'https://apps.powerapps.com/play/$(AppId)'
    appName: 'MyPowerApp'
    o365Username: '$(TestUser.Email)'
    o365Password: '$(TestUser.Password)'

Advanced Usage with Version Control (New in v1.0.15)

- task: mightoria-playwrightForPowerPlatform@1
  displayName: 'Run Tests with Specific Version'
  inputs:
    testLocation: '$(System.DefaultWorkingDirectory)/tests'
    playwrightVersion: 'v2.1.0'
    browser: 'chromium'
    trace: 'on-first-retry'
    outputLocation: '$(Agent.TempDirectory)/test-results'
    appUrl: 'https://apps.powerapps.com/play/$(AppId)'
    appName: 'MyPowerApp'
    o365Username: '$(TestUser.Email)'
    o365Password: '$(TestUser.Password)'

Configuration Parameters

Parameter Description Required Default
testLocation Path to Playwright test files Yes $(System.DefaultWorkingDirectory)/PlaywrightTests
playwrightVersion Specific version, branch, tag, or commit to use No (latest default)
browser Browser to run tests (chromium, firefox, webkit, all) Yes all
trace Trace mode (off, on, retain-on-failure, on-first-retry) Yes off
outputLocation Directory for test results and reports Yes $(System.DefaultWorkingDirectory)
appUrl Power Platform application URL No -
appName Power Platform application name No -
o365Username Office 365 username for authentication No -
o365Password Office 365 password for authentication No -

Version Management Parameter (v1.0.15+)

The playwrightVersion parameter provides flexibility for teams who need to:

  • Test against specific versions or feature branches
  • Pin to stable releases for consistent testing
  • Validate changes before they reach the main branch

Examples:

  • Use feature branch: playwrightVersion: "feature/new-selectors"
  • Pin to specific version: playwrightVersion: "v2.1.0"
  • Test specific commit: playwrightVersion: "abc123def456"

Note: The repository URL is fixed to ensure framework consistency and reliability.

Example Test Scenarios

Authentication Test

test('Power Apps Login', async ({ page }) => {
  await page.goto(process.env.APP_URL);
  await page.fill('[name="loginfmt"]', process.env.O365_USERNAME);
  await page.click('[type="submit"]');
  await page.fill('[name="passwd"]', process.env.O365_PASSWORD);
  await page.click('[type="submit"]');
  await expect(page).toHaveTitle(new RegExp(process.env.APP_NAME));
});

Canvas App Interaction

test('Form Submission', async ({ page }) => {
  await page.goto(process.env.APP_URL);
  await page.waitForSelector('[data-automation-id="Canvas"]');
  
  // Fill form fields
  await page.click('[aria-label="Name input"]');
  await page.fill('[aria-label="Name input"]', 'Test User');
  
  // Submit form
  await page.click('[aria-label="Submit button"]');
  
  // Verify success
  await expect(page.locator('[aria-label="Success message"]')).toBeVisible();
});

Troubleshooting

Common Issues

  • Authentication failures: Verify credentials and user permissions
  • Element not found errors: Check for Power Platform loading delays
  • Timeout issues: Increase timeout values for slow environments
  • "Unknown command: pm" errors: (Fixed in v1.0.15) - Update to the latest version for improved npm command reliability

Debugging Tools

  • Review HTML reports for detailed execution flow
  • Use trace files for step-by-step analysis
  • Check screenshots for visual verification
  • Monitor network logs for connectivity issues
  • New: Enhanced error logging provides detailed command execution information

Release Notes

Version 1.1.0 - September 19, 2025 πŸŽ‰

Major Improvements & Bug Fixes

πŸ”§ Repository & Version Management

  • NEW: Added playwrightVersion input parameter to specify versions, branches, tags, or commits
  • ENHANCED: Full control over which version of Playwright framework gets executed
  • CONTROLLED: Repository URL is fixed to ensure consistency and reliability across all users
  • USE CASE: Teams can test against specific versions and pin to stable releases

πŸ› οΈ Command Execution Reliability

  • FIXED: Resolved "Unknown command: 'pm'" error that occurred with npm/npx commands in certain CI/CD environments
  • IMPROVED: Replaced unreliable & call operator with robust Start-Process approach for npm/npx execution
  • ENHANCED: Better error handling with detailed logging of exact commands being executed
  • RESULT: More reliable installation and execution across different Azure DevOps agents and environments

πŸš€ Performance & Stability

  • OPTIMIZED: Faster npm dependency installation with improved error recovery
  • ENHANCED: Better exit code handling and process management
  • IMPROVED: More descriptive error messages for troubleshooting
  • ADDED: Comprehensive logging for debugging installation issues

πŸ“‹ Task Configuration

  • UPDATED: Both Basic and Advanced task versions now support repository management
  • CONSISTENT: Unified input parameter handling across both task variants
  • BACKWARD COMPATIBLE: Existing pipelines continue to work without modification

πŸ” Developer Experience

  • IMPROVED: Clear documentation of which branch/commit is being cloned
  • ENHANCED: Better error messages with troubleshooting guidance
  • ADDED: Validation and compatibility checks for repository cloning

Migration Notes:

  • Existing pipelines will continue to work unchanged (default repository and branch behavior)
  • To use specific branches: Add playwrightVersion parameter with your desired branch/tag/commit
  • Repository URL is now fixed for consistency - custom repositories are no longer supported

Breaking Changes:

  • None - this release is fully backward compatible

Previous Versions

Version 1.0.14 and Earlier

  • Core Playwright testing functionality for Power Platform applications
  • Office 365 authentication support
  • Multi-browser testing capabilities
  • Comprehensive reporting and debugging features

Support & Documentation

  • Extension Documentation: Detailed guides available in the Azure DevOps Marketplace
  • Community Support: GitHub issues and discussions
  • Professional Support: Available through mightora.io

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contact

For more information or support, please visit https://mightora.io or open an issue in this repository.


Created by: Mightora.io | Powered by: Playwright

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages