【问题标题】:Run UWP appium tests in azure pipeline在 Azure 管道中运行 UWP appium 测试
【发布时间】:2019-09-01 07:24:58
【问题描述】:

只是想知道是否可以在 Azure 管道中为 UWP 应用运行基于 Appium 的 UI 测试?

第一个挑战是,如何部署 UWP 以在管道内进行测试。

【问题讨论】:

    标签: uwp azure-devops azure-pipelines appium-desktop


    【解决方案1】:

    我设法弄明白了。

    1. 我们需要在构建之后安装应用程序,这可以通过运行构建工件中包含的 powershell 脚本来完成。但重要的是证书的安装,需要强制安装。
    - task: PowerShell@2
      displayName: 'Install app'
      inputs:
        filePath: '$(build.artifactstagingdirectory)\\AppxPackages\\MyApp_1.0.0.0_Test\\Add-AppDevPackage.ps1'
        arguments: '-Force'
    
    1. 要运行测试用例,需要安装 WinAppDriver。见WinAppDriver in CI with Azure Pipelines

    2.1 您还需要在测试前后启动和停止 win 应用驱动程序

    - task: Windows Application Driver@0
      displayName: Starting WinAppDriver
      inputs:
        OperationType: 'Start'
        AgentResolution: '1080p'
    
    - task: VSTest@2
      inputs:
        testSelector: 'testAssemblies'
        testAssemblyVer2: |
          **\*Test*.dll
          !**\*TestAdapter.dll
          !**\obj\**
        searchFolder: '$(System.DefaultWorkingDirectory)'
        uiTests: true
    
    - task: Windows Application Driver@0
      displayName: Stopping WinAppDriver
      inputs:
        OperationType: 'Stop'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-08
      • 2020-01-29
      • 1970-01-01
      • 2020-12-24
      • 1970-01-01
      相关资源
      最近更新 更多