Remove deprecated internal-only tests (#565)
This commit is contained in:
parent
2517854836
commit
02a3532442
@ -1,131 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{24767C43-CD5A-4DC9-8D6B-429F255524E5}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>Calculator.TestPackage</RootNamespace>
|
|
||||||
<AssemblyName>Calculator.TestPackage</AssemblyName>
|
|
||||||
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
|
|
||||||
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
|
|
||||||
<NuGetTargetMoniker>.NETCore,Version=v5.0</NuGetTargetMoniker>
|
|
||||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
|
||||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
|
|
||||||
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<!-- The app doesn't contain any tests so we don't generate a testmd -->
|
|
||||||
<NoTestMD>true</NoTestMD>
|
|
||||||
<NoPackage Condition="'$(IsTFSBuild)' != 'True'">True</NoPackage>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\x86</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\x86</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\x64</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\x64</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\arm</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\arm</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM64' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\ARM64\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM64' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\ARM64\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Calculator.TestPackage.wm.xml" />
|
|
||||||
<None Include="project.json" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\src\Calculator\Calculator.vcxproj">
|
|
||||||
<Project>{9447424a-0e05-4911-beb8-e0354405f39a}</Project>
|
|
||||||
<Name>Calculator</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0' ">
|
|
||||||
<VisualStudioVersion>15.0</VisualStudioVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<!-- Redefine build target as we don't want to build anything. -->
|
|
||||||
<Target Name="Build" />
|
|
||||||
<Target Name="Clean" />
|
|
||||||
<Target Name="Rebuild" />
|
|
||||||
<!-- Append the appx properties to the custom macros as we use this in the testmd.definition file. -->
|
|
||||||
<Target Name="AppendUniversalTestCustomMacros" BeforeTargets="BuildUniversalTest">
|
|
||||||
<ItemGroup>
|
|
||||||
<AppxBundleOutput Include="$(OutDir)..\Calculator\AppPackages\**\*.appxbundle" />
|
|
||||||
<AppxPackagePublicKeyFile Include="$(OutDir)..\Calculator\AppPackages\**\*.cer" />
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<AppxPackageTestDir>@(AppxBundleOutput->'%(RootDir)%(Directory)')</AppxPackageTestDir>
|
|
||||||
<UniversalTestCustomMacros Condition="'$(Configuration)'=='Debug'">$(UniversalTestCustomMacros)AppxPackageVCLibsDependency=$(AppxPackageTestDir)Dependencies\$(PlatformTarget)\Microsoft.VCLibs.$(PlatformTarget).Debug.14.00.appx;</UniversalTestCustomMacros>
|
|
||||||
<UniversalTestCustomMacros Condition="'$(Configuration)'=='Release'">$(UniversalTestCustomMacros)AppxPackageVCLibsDependency=$(AppxPackageTestDir)Dependencies\$(PlatformTarget)\Microsoft.VCLibs.$(PlatformTarget).14.00.appx;</UniversalTestCustomMacros>
|
|
||||||
<UniversalTestCustomMacros>$(UniversalTestCustomMacros)AppxPackageWinUIDependency=$(AppxPackageTestDir)Dependencies\$(PlatformTarget)\Microsoft.UI.Xaml.2.1.appx;</UniversalTestCustomMacros>
|
|
||||||
<UniversalTestCustomMacros>$(UniversalTestCustomMacros)AppxPackagePublicKeyFile=@(AppxPackagePublicKeyFile->'%(FullPath)');AppxBundleOutput=@(AppxBundleOutput->'%(FullPath)');</UniversalTestCustomMacros>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Target>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
|
@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--Copyright (c) Microsoft Corporation. All rights reserved.-->
|
|
||||||
<identity
|
|
||||||
xmlns="urn:Microsoft.CompPlat/ManifestSchema.v1.00"
|
|
||||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
name="App"
|
|
||||||
namespace="Calculator"
|
|
||||||
owner="Microsoft">
|
|
||||||
<files>
|
|
||||||
<file
|
|
||||||
source="$(AppxBundleOutput)"
|
|
||||||
destinationDir="$(runtime.testbin)"
|
|
||||||
name="Calculator.appxbundle" />
|
|
||||||
<file
|
|
||||||
source="$(AppxPackagePublicKeyFile)"
|
|
||||||
destinationDir="$(runtime.testbin)"
|
|
||||||
name="Calculator.cer" />
|
|
||||||
<file
|
|
||||||
source="$(AppxPackageVCLibsDependency)"
|
|
||||||
destinationDir="$(runtime.testbin)"
|
|
||||||
name="Microsoft.VCLibs.appx" />
|
|
||||||
<file
|
|
||||||
source="$(AppxPackageWinUIDependency)"
|
|
||||||
destinationDir="$(runtime.testbin)"
|
|
||||||
name="Microsoft.UI.Xaml.appx" />
|
|
||||||
</files>
|
|
||||||
</identity>
|
|
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.TestInfrastructure.UniversalTest": "1.0.20181107.1"
|
|
||||||
},
|
|
||||||
"frameworks": {
|
|
||||||
"netcore50": {}
|
|
||||||
},
|
|
||||||
"runtimes": {
|
|
||||||
"win10-arm": {},
|
|
||||||
"win10-x64": {},
|
|
||||||
"win10-x86": {}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,99 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{A43517B5-8BE3-4312-913F-004978C34444}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>Calculator.UIAutomationLibrary</RootNamespace>
|
|
||||||
<AssemblyName>Calculator.UIAutomationLibrary</AssemblyName>
|
|
||||||
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
|
|
||||||
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
|
|
||||||
<NuGetTargetMoniker>.NETCore,Version=v5.0</NuGetTargetMoniker>
|
|
||||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
|
||||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
|
|
||||||
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="CalculatorAppLauncher.cs" />
|
|
||||||
<Compile Include="Components\App\CalculatorAppLfm.cs" />
|
|
||||||
<Compile Include="Components\App\CalculatorAppPom.cs" />
|
|
||||||
<Compile Include="Components\ContentDialogLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\CalculatorBasePom.cs" />
|
|
||||||
<Compile Include="Components\Pages\AboutFlyoutLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\AboutFlyoutPom.cs" />
|
|
||||||
<Compile Include="Components\Pages\DateCalculatorLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\DateCalculatorPom.cs" />
|
|
||||||
<Compile Include="Components\Pages\UnitConverterLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\UnitConverterPom.cs" />
|
|
||||||
<Compile Include="Components\Shared\HistoryLfm.cs" />
|
|
||||||
<Compile Include="Components\Shared\HistoryPom.cs" />
|
|
||||||
<Compile Include="Components\Shared\ICanFocusWithClicks.cs" />
|
|
||||||
<Compile Include="Components\Shared\MemoryLfm.cs" />
|
|
||||||
<Compile Include="Components\Shared\MemoryPom.cs" />
|
|
||||||
<Compile Include="Components\Pages\NavBarLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\NavBarPom.cs" />
|
|
||||||
<Compile Include="Components\Shared\NumberPadPom.cs" />
|
|
||||||
<Compile Include="Components\Pages\ProgrammerCalculatorLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\ProgrammerCalculatorPom.cs" />
|
|
||||||
<Compile Include="Components\Pages\ScientificCalculatorLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\ScientificCalculatorPom.cs" />
|
|
||||||
<Compile Include="Components\Pages\StandardCalculatorLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\StandardCalculatorPom.cs" />
|
|
||||||
<Compile Include="Components\Pages\MainPageLfm.cs" />
|
|
||||||
<Compile Include="Components\Pages\MainPagePom.cs" />
|
|
||||||
<Compile Include="Utilities\Impersonator.cs" />
|
|
||||||
<Compile Include="Utilities\PerfTestConstants.cs" />
|
|
||||||
<Compile Include="Tests\BasicCalculationTest.cs" />
|
|
||||||
<Compile Include="Tests\ScientificCalculationTest.cs" />
|
|
||||||
<Compile Include="Utilities\EtwHelper.cs" />
|
|
||||||
<Compile Include="Utilities\InstallHelper.cs" />
|
|
||||||
<Compile Include="Components\ContentDialogPom.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Utilities\Constants.cs" />
|
|
||||||
<Compile Include="Utilities\NativeMethods.cs" />
|
|
||||||
<Compile Include="Utilities\ServiceHelper.cs" />
|
|
||||||
<Compile Include="Utilities\UIObjectExtensions.cs" />
|
|
||||||
<Compile Include="Utilities\Utilities.cs" />
|
|
||||||
<Compile Include="Utilities\WindowHelper.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="project.json" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup />
|
|
||||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0' ">
|
|
||||||
<VisualStudioVersion>15.0</VisualStudioVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
|
||||||
<!--additional imports-->
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
@ -1,63 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Etw.Managed;
|
|
||||||
using Microsoft.OneCoreUap.Test.AppModel;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using Calculator.UIAutomationLibrary.Components;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Class that can open and close the Calculator app.
|
|
||||||
/// </summary>
|
|
||||||
public static class CalculatorAppLauncher
|
|
||||||
{
|
|
||||||
public const string CoreWindowClassName = "Windows.UI.Core.CoreWindow";
|
|
||||||
|
|
||||||
// This doesn't actually work right now because popup will disappear
|
|
||||||
// Bug 13713223: ContentDialog/Popup does not show up in the UIA tree when Windows.Current.Content has an AutomationName set.
|
|
||||||
// public static readonly UICondition TopLevelWindowUICondition = UICondition.CreateFromId(Constants.TopLevelWindowAutomationId);
|
|
||||||
public static readonly UICondition CoreWindowUICondition = UICondition.CreateFromClassName(CoreWindowClassName)
|
|
||||||
.AndWith(UICondition.CreateFromName(Constants.AppWindowName));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Launch the app
|
|
||||||
/// </summary>
|
|
||||||
public static CalculatorAppLfm Launch()
|
|
||||||
{
|
|
||||||
Log.Comment("Launching Calculator and waiting for first page load...");
|
|
||||||
|
|
||||||
// Need to set this for the MITALite Tap~ methods to work on high DPI screens.
|
|
||||||
UAPApp.SetTestDPIAwareness();
|
|
||||||
|
|
||||||
// We want to be able to see any element in the tree
|
|
||||||
Context.RawContext.Activate();
|
|
||||||
|
|
||||||
// Set default wait timeout.
|
|
||||||
MS.Internal.Mita.Foundation.Waiters.Waiter.DefaultTimeout = TimeSpan.FromSeconds(30);
|
|
||||||
|
|
||||||
// Enable Mita internal logging.
|
|
||||||
MS.Internal.Mita.Foundation.Utilities.Log.OutImplementation = (s, a) => { Log.Comment($"- [MitaLite] { string.Format(s, a) }"); };
|
|
||||||
|
|
||||||
using (EtwWaiter appLaunchWaiter = new EtwWaiter(Constants.CalculatorETWProviderGUID, Constants.AppLaunchEndETWEventName))
|
|
||||||
{
|
|
||||||
var viewDescriptor = NavigationHelper.LaunchApplication(Constants.PackageAppUserModelId);
|
|
||||||
appLaunchWaiter.Wait(TimeSpan.FromSeconds(30));
|
|
||||||
|
|
||||||
Window calculatorWindow = new Window(UIObject.Root.Descendants.Find(CoreWindowUICondition));
|
|
||||||
Debug.Assert(calculatorWindow.ClassName == CoreWindowClassName);
|
|
||||||
|
|
||||||
// Move our window to the foreground.
|
|
||||||
WindowHelper.SetAsForeground(calculatorWindow.GetTopLevelWindow());
|
|
||||||
|
|
||||||
return new CalculatorAppLfm(new CalculatorAppPom(calculatorWindow), viewDescriptor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Microsoft.OneCoreUap.Test.AppModel;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class CalculatorAppLfm
|
|
||||||
{
|
|
||||||
private readonly IViewDescriptor viewDescriptor;
|
|
||||||
|
|
||||||
public CalculatorAppLfm(CalculatorAppPom objectModel, IViewDescriptor viewDescriptor)
|
|
||||||
{
|
|
||||||
this.ObjectModel = objectModel;
|
|
||||||
this.viewDescriptor = viewDescriptor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CalculatorAppPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public MainPageLfm MainPageLfm
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new MainPageLfm(this.ObjectModel.MainPagePom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
|
||||||
{
|
|
||||||
// ObjectModel is essentially the window ui object.
|
|
||||||
if (this.viewDescriptor != null)
|
|
||||||
{
|
|
||||||
NavigationHelper.CloseApplication(this.viewDescriptor.AUMID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class CalculatorAppPom : UIObject
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a new instance of the <see cref="CalculatorAppPom"/> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">UIObject for the calculator app window.</param>
|
|
||||||
public CalculatorAppPom(UIObject uiObject)
|
|
||||||
: base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
public MainPagePom MainPagePom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new MainPagePom(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class ContentDialogLfm
|
|
||||||
{
|
|
||||||
public ContentDialogLfm(ContentDialogPom objectModel)
|
|
||||||
{
|
|
||||||
this.ObjectModel = objectModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ContentDialogPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void InvokePrimary()
|
|
||||||
{
|
|
||||||
this.ObjectModel.PrimaryButton.Invoke();
|
|
||||||
}
|
|
||||||
public void InvokeSecondary()
|
|
||||||
{
|
|
||||||
this.ObjectModel.SecondaryButton.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InvokeClose()
|
|
||||||
{
|
|
||||||
this.ObjectModel.CloseButton.Invoke();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,62 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class ContentDialogPom : UIObject
|
|
||||||
{
|
|
||||||
private static readonly UICondition textScrollViewerCondition = UICondition.CreateFromId("ContentScrollViewer");
|
|
||||||
private static readonly UICondition titleTextBlockCondition = UICondition.CreateFromClassName("TextBlock");
|
|
||||||
|
|
||||||
private static readonly UICondition primaryButtonCondition =
|
|
||||||
UICondition.CreateFromClassName("Button")
|
|
||||||
.AndWith(UICondition.CreateFromId("PrimaryButton"));
|
|
||||||
private static readonly UICondition secondaryButtonCondition =
|
|
||||||
UICondition.CreateFromClassName("Button")
|
|
||||||
.AndWith(UICondition.CreateFromId("SecondaryButton"));
|
|
||||||
private static readonly UICondition closeButtonCondition =
|
|
||||||
UICondition.CreateFromClassName("Button")
|
|
||||||
.AndWith(UICondition.CreateFromId("CloseButton"));
|
|
||||||
|
|
||||||
public ContentDialogPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button PrimaryButton
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new Button(this.Children.Find(primaryButtonCondition));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button SecondaryButton
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new Button(this.Children.Find(secondaryButtonCondition));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button CloseButton
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new Button(this.Children.Find(closeButtonCondition));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Title
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
var scrollViewer = this.Children.Find(textScrollViewerCondition);
|
|
||||||
var textBlock = scrollViewer.Children.Find(titleTextBlockCondition);
|
|
||||||
return textBlock.Name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class AboutFlyoutLfm : ICanFocusWithClicks
|
|
||||||
{
|
|
||||||
private const string FlyoutId = "FlyoutNav";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="AboutFlyoutLfm" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="objectModel">The AboutFlyoutPom that represents the About flyout panel.</param>
|
|
||||||
public AboutFlyoutLfm(AboutFlyoutPom objectModel)
|
|
||||||
{
|
|
||||||
this.ObjectModel = objectModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AboutFlyoutPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void FocusWithClicks()
|
|
||||||
{
|
|
||||||
this.ObjectModel.Title.DoubleClick();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
|
||||||
{
|
|
||||||
this.ObjectModel.SendKeys("{ESC}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class AboutFlyoutPom : UIObject
|
|
||||||
{
|
|
||||||
private const string TitleId = "Header";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="AboutFlyoutPom" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">The UIObject that is the root of the navigation menu.</param>
|
|
||||||
public AboutFlyoutPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public UIObject Title
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new UIObject(this.Descendants.Find(TitleId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the Display section of the calculator modes.
|
|
||||||
/// </summary>
|
|
||||||
public class CalculatorBasePom : UIObject
|
|
||||||
{
|
|
||||||
private const string ExpressionContainerId = "CalculatorExpression";
|
|
||||||
private const string NormalOutputId = "normalOutput";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="StandardCalculatorPom" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">The UIObject that is the root of the standard calculator.</param>
|
|
||||||
public CalculatorBasePom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public TextBlock Expression
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new TextBlock(this.Descendants.Find(ExpressionContainerId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public UIEventWaiter GetExpressionChangedWaiter()
|
|
||||||
{
|
|
||||||
return new PropertyChangedEventWaiter(this.Expression, UIProperty.Get("Name"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public TextBlock Display
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new TextBlock(this.Descendants.Find(NormalOutputId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public UIEventWaiter GetDisplayChangedWaiter()
|
|
||||||
{
|
|
||||||
return new PropertyChangedEventWaiter(this.Display, UIProperty.Get("Name"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class DateCalculatorLfm
|
|
||||||
{
|
|
||||||
public DateCalculatorLfm(DateCalculatorPom dateCalculatorPom)
|
|
||||||
{
|
|
||||||
this.ObjectModel = dateCalculatorPom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateCalculatorPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void EnsureDateDifferenceMode()
|
|
||||||
{
|
|
||||||
this.OpenModeSelector();
|
|
||||||
this.ObjectModel.ModeSelector.AllItems[0].Select();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnsureAddSubtractMode()
|
|
||||||
{
|
|
||||||
this.OpenModeSelector();
|
|
||||||
this.ObjectModel.ModeSelector.AllItems[1].Select();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OpenModeSelector()
|
|
||||||
{
|
|
||||||
using (var waiter = this.ObjectModel.ModeSelector.GetExpandedWaiter())
|
|
||||||
{
|
|
||||||
this.ObjectModel.ModeSelector.Expand();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class DateCalculatorPom : UIObject
|
|
||||||
{
|
|
||||||
private const string ModeSelectorId = "DateCalculationOption";
|
|
||||||
|
|
||||||
public DateCalculatorPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public ComboBox ModeSelector
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return new ComboBox(this.Descendants.Find(ModeSelectorId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,255 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Etw.Managed;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class MainPageLfm : ICanFocusWithClicks
|
|
||||||
{
|
|
||||||
public MainPageLfm(MainPagePom objectModel)
|
|
||||||
{
|
|
||||||
this.ObjectModel = objectModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MainPagePom ObjectModel { get; }
|
|
||||||
|
|
||||||
public NavBarLfm OpenNavBar()
|
|
||||||
{
|
|
||||||
using (EtwWaiter waiter = this.ObjectModel.GetNavBarOpenedWaiter())
|
|
||||||
{
|
|
||||||
this.ObjectModel.NavButton.Invoke();
|
|
||||||
waiter.Wait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new NavBarLfm(this.ObjectModel.NavBarPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CloseNavBar()
|
|
||||||
{
|
|
||||||
this.ObjectModel.NavBarPom.CloseButton.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FocusWithClicks()
|
|
||||||
{
|
|
||||||
this.ObjectModel.Header.DoubleClick();
|
|
||||||
}
|
|
||||||
|
|
||||||
public StandardCalculatorLfm NavigateToStandardCalculator()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectStandard();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new StandardCalculatorLfm(this.ObjectModel.StandardCalculatorPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ScientificCalculatorLfm NavigateToScientificCalculator()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectScientific();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new ScientificCalculatorLfm(this.ObjectModel.ScientificCalculatorPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProgrammerCalculatorLfm NavigateToProgrammerCalculator()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectProgrammer();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new ProgrammerCalculatorLfm(this.ObjectModel.ProgrammerCalculatorPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateCalculatorLfm NavigateToDateCalculator()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectDate();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new DateCalculatorLfm(this.ObjectModel.DateCalculatorPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToCurrencyConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectCurrency();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToVolumeConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectVolume();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToLengthConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectLength();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToWeightConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectWeight();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToTemperatureConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectTemperature();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToEnergyConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectEnergy();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToAreaConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectArea();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToSpeedConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectSpeed();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToTimeConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectTime();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToPowerConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectPower();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToDataConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectData();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToPressureConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectPressure();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterLfm NavigateToAngleConverter()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (var waiter = this.ObjectModel.GetModeChangedWaiter())
|
|
||||||
{
|
|
||||||
navBar.SelectAngle();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new UnitConverterLfm(this.ObjectModel.UnitConverterPom);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AboutFlyoutLfm OpenAboutFlyout()
|
|
||||||
{
|
|
||||||
var navBar = this.OpenNavBar();
|
|
||||||
using (EtwWaiter waiter = new EtwWaiter(Constants.CalculatorETWProviderGUID, Constants.AboutFlyoutOpenedETWEventName))
|
|
||||||
{
|
|
||||||
navBar.SelectAbout();
|
|
||||||
waiter.Wait();
|
|
||||||
}
|
|
||||||
|
|
||||||
return new AboutFlyoutLfm(this.ObjectModel.AboutFlyoutPom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,51 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Etw.Managed;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Physical Object Model for the app window.
|
|
||||||
/// POM is the implementation model of the app.
|
|
||||||
/// See https://en.wikipedia.org/wiki/Model-based_testing for model-based testing.
|
|
||||||
/// </summary>
|
|
||||||
public class MainPagePom : UIObject
|
|
||||||
{
|
|
||||||
private const string NavButtonId = "TogglePaneButton";
|
|
||||||
private const string SplitViewPaneRootId = "PaneRoot";
|
|
||||||
private const string NavBarFlyoutId = "FlyoutNav";
|
|
||||||
private const string HeaderId = "Header";
|
|
||||||
private const string AboutPageFlyoutId = "AboutPageFlyout";
|
|
||||||
|
|
||||||
public MainPagePom(UIObject uiObject)
|
|
||||||
: base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button NavButton => new Button(this.Descendants.Find(UICondition.CreateFromId(NavButtonId)));
|
|
||||||
|
|
||||||
public UIObject Header => new UIObject(this.Descendants.Find(HeaderId));
|
|
||||||
|
|
||||||
public NavBarPom NavBarPom => new NavBarPom(this.Children.Find(SplitViewPaneRootId));
|
|
||||||
|
|
||||||
public EtwWaiter GetNavBarOpenedWaiter() => new EtwWaiter(Constants.CalculatorETWProviderGUID, Constants.NavBarOpenedETWEventName);
|
|
||||||
|
|
||||||
public StandardCalculatorPom StandardCalculatorPom => new StandardCalculatorPom(this);
|
|
||||||
|
|
||||||
public ScientificCalculatorPom ScientificCalculatorPom => new ScientificCalculatorPom(this);
|
|
||||||
|
|
||||||
public ProgrammerCalculatorPom ProgrammerCalculatorPom => new ProgrammerCalculatorPom(this);
|
|
||||||
|
|
||||||
public DateCalculatorPom DateCalculatorPom => new DateCalculatorPom(this);
|
|
||||||
|
|
||||||
public UnitConverterPom UnitConverterPom => new UnitConverterPom(this);
|
|
||||||
|
|
||||||
public AboutFlyoutPom AboutFlyoutPom => new AboutFlyoutPom(this.Descendants.Find(AboutPageFlyoutId));
|
|
||||||
|
|
||||||
public EtwWaiter GetModeChangedWaiter() => new EtwWaiter(Constants.CalculatorETWProviderGUID, Constants.AppModeChangeEndETWEventName);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,144 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Windows.Automation;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Patterns;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the NavBar of the Calculator app.
|
|
||||||
/// </summary>
|
|
||||||
public class NavBarLfm : ICanFocusWithClicks
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="NavBarLfm" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="objectModel">The NavBarPom that represents the NavBar.</param>
|
|
||||||
public NavBarLfm(NavBarPom objectModel)
|
|
||||||
{
|
|
||||||
this.ObjectModel = objectModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public NavBarPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void SelectStandard()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.StandardMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectScientific()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.ScientificMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectProgrammer()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.ProgrammerMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectDate()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.DateMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectCurrency()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.CurrencyMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectVolume()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.VolumeMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectLength()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.LengthMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectWeight()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.WeightMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectTemperature()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.TemperatureMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectEnergy()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.EnergyMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectArea()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.AreaMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectSpeed()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.SpeedMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectTime()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.TimeMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectPower()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.PowerMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectData()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.DataMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectPressure()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.PressureMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectAngle()
|
|
||||||
{
|
|
||||||
SelectItem(this.ObjectModel.AngleMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SelectAbout()
|
|
||||||
{
|
|
||||||
this.ObjectModel.AboutButton.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close()
|
|
||||||
{
|
|
||||||
this.ObjectModel.CloseButton.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FocusWithClicks()
|
|
||||||
{
|
|
||||||
// To focus (for AccSpot) without changing anything, click to the right of the close button.
|
|
||||||
Button button = this.ObjectModel.CloseButton;
|
|
||||||
int xPos = button.BoundingRectangle.Width + Constants.ClickMargin;
|
|
||||||
int yPos = button.BoundingRectangle.Height / 2;
|
|
||||||
button.DoubleClick(PointerButtons.Primary, xPos, yPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SelectItem(ListViewItem item)
|
|
||||||
{
|
|
||||||
if (item.IsSelected)
|
|
||||||
{
|
|
||||||
this.Close();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
item.Select();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,96 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System.Linq;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the navigation menu.
|
|
||||||
/// </summary>
|
|
||||||
public class NavBarPom : UIObject
|
|
||||||
{
|
|
||||||
private const string StandardId = "Standard";
|
|
||||||
private const string ScientificId = "Scientific";
|
|
||||||
private const string ProgrammerId = "Programmer";
|
|
||||||
private const string DateId = "Date";
|
|
||||||
private const string CurrencyId = "Currency";
|
|
||||||
private const string VolumeId = "Volume";
|
|
||||||
private const string LengthId = "Length";
|
|
||||||
private const string WeightId = "Weight";
|
|
||||||
private const string TemperatureId = "Temperature";
|
|
||||||
private const string EnergyId = "Energy";
|
|
||||||
private const string AreaId = "Area";
|
|
||||||
private const string SpeedId = "Speed";
|
|
||||||
private const string TimeId = "Time";
|
|
||||||
private const string PowerId = "Power";
|
|
||||||
private const string DataId = "Data";
|
|
||||||
private const string PressureId = "Pressure";
|
|
||||||
private const string AngleId = "Angle";
|
|
||||||
private const string AboutId = "AboutButton";
|
|
||||||
private const string CloseId = "TogglePaneButton";
|
|
||||||
private const string FlyoutListViewId = "MenuItemsHost";
|
|
||||||
private const string ConverterSectionId = "Converter";
|
|
||||||
private const string ConverterTextKey = "ConverterModeText";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="NavBarPom" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">The UIObject that is the root of the navigation menu.</param>
|
|
||||||
public NavBarPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public ListViewItem StandardMenuItem => ScrollAndGetItem(StandardId);
|
|
||||||
|
|
||||||
public ListViewItem ScientificMenuItem => ScrollAndGetItem(ScientificId);
|
|
||||||
|
|
||||||
public ListViewItem ProgrammerMenuItem => ScrollAndGetItem(ProgrammerId);
|
|
||||||
|
|
||||||
public ListViewItem DateMenuItem => ScrollAndGetItem(DateId);
|
|
||||||
|
|
||||||
public ListViewItem CurrencyMenuItem => ScrollAndGetItem(CurrencyId);
|
|
||||||
|
|
||||||
public ListViewItem VolumeMenuItem => ScrollAndGetItem(VolumeId);
|
|
||||||
|
|
||||||
public ListViewItem LengthMenuItem => ScrollAndGetItem(LengthId);
|
|
||||||
|
|
||||||
public ListViewItem WeightMenuItem => ScrollAndGetItem(WeightId);
|
|
||||||
|
|
||||||
public ListViewItem TemperatureMenuItem => ScrollAndGetItem(TemperatureId);
|
|
||||||
|
|
||||||
public ListViewItem EnergyMenuItem => ScrollAndGetItem(EnergyId);
|
|
||||||
|
|
||||||
public ListViewItem AreaMenuItem => ScrollAndGetItem(AreaId);
|
|
||||||
|
|
||||||
public ListViewItem SpeedMenuItem => ScrollAndGetItem(SpeedId);
|
|
||||||
|
|
||||||
public ListViewItem TimeMenuItem => ScrollAndGetItem(TimeId);
|
|
||||||
|
|
||||||
public ListViewItem PowerMenuItem => ScrollAndGetItem(PowerId);
|
|
||||||
|
|
||||||
public ListViewItem DataMenuItem => ScrollAndGetItem(DataId);
|
|
||||||
|
|
||||||
public ListViewItem PressureMenuItem => ScrollAndGetItem(PressureId);
|
|
||||||
|
|
||||||
public ListViewItem AngleMenuItem => ScrollAndGetItem(AngleId);
|
|
||||||
|
|
||||||
public Button AboutButton => new Button(this.Descendants.Find(AboutId));
|
|
||||||
|
|
||||||
public Button CloseButton => new Button(this.Parent.Children.Find(CloseId));
|
|
||||||
|
|
||||||
public ListView ModeListView => new ListView(this.Descendants.Find(FlyoutListViewId));
|
|
||||||
|
|
||||||
private ListViewItem ScrollAndGetItem(string id)
|
|
||||||
{
|
|
||||||
ListViewItem item;
|
|
||||||
var res = this.ModeListView.AllItems.TryFind(id, out item);
|
|
||||||
|
|
||||||
item.ScrollIntoView();
|
|
||||||
|
|
||||||
return item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class ProgrammerCalculatorLfm
|
|
||||||
{
|
|
||||||
public ProgrammerCalculatorLfm(ProgrammerCalculatorPom programmerCalculatorPom)
|
|
||||||
{
|
|
||||||
this.ObjectModel = programmerCalculatorPom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProgrammerCalculatorPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void EnsureFullKeypad()
|
|
||||||
{
|
|
||||||
if (!this.ObjectModel.FullKeypadButton.IsSelected)
|
|
||||||
{
|
|
||||||
this.ObjectModel.FullKeypadButton.Select();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void EnsureBitTogglingKeypad()
|
|
||||||
{
|
|
||||||
if (!this.ObjectModel.BitFlipKeypadButton.IsSelected)
|
|
||||||
{
|
|
||||||
this.ObjectModel.BitFlipKeypadButton.Select();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ChangeBitLength()
|
|
||||||
{
|
|
||||||
this.ObjectModel.GetCurrentBitLengthButton().Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemoryLfm OpenMemory()
|
|
||||||
{
|
|
||||||
MemoryLfm lfm = new MemoryLfm(this.ObjectModel.MemoryControls);
|
|
||||||
lfm.OpenBody();
|
|
||||||
return lfm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FiveMemorySet()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
this.ObjectModel.NumberPad.FiveButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ObjectModel.MemoryControls.SetButton.Invoke();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class ProgrammerCalculatorPom : UIObject
|
|
||||||
{
|
|
||||||
private const string FullKeypadButtonId = "fullKeypad";
|
|
||||||
private const string BitFlipKeypadButtonId = "bitFlip";
|
|
||||||
private const string CalculatorResultsId = "CalculatorResults";
|
|
||||||
private const string NumberPadId = "NumberPad";
|
|
||||||
|
|
||||||
private readonly string[] BitLengthButtonIds =
|
|
||||||
{
|
|
||||||
"qwordButton",
|
|
||||||
"dwordButton",
|
|
||||||
"wordButton",
|
|
||||||
"byteButton"
|
|
||||||
};
|
|
||||||
|
|
||||||
public ProgrammerCalculatorPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public NumberPadPom NumberPad => new NumberPadPom(this.Descendants.Find(NumberPadId));
|
|
||||||
|
|
||||||
public MemoryPom MemoryControls => new MemoryPom(this);
|
|
||||||
|
|
||||||
public RadioButton FullKeypadButton => new RadioButton(this.Descendants.Find(FullKeypadButtonId));
|
|
||||||
|
|
||||||
public RadioButton BitFlipKeypadButton => new RadioButton(this.Descendants.Find(BitFlipKeypadButtonId));
|
|
||||||
|
|
||||||
public TextBlock Display => new TextBlock(this.Descendants.Find(CalculatorResultsId));
|
|
||||||
|
|
||||||
public UIEventWaiter GetDisplayChangedWaiter() => this.Display.GetNameChangedWaiter();
|
|
||||||
|
|
||||||
public Button GetCurrentBitLengthButton()
|
|
||||||
{
|
|
||||||
// There are four bit length buttons, with only one visible at a time.
|
|
||||||
UIObject button = null;
|
|
||||||
foreach (var buttonId in this.BitLengthButtonIds)
|
|
||||||
{
|
|
||||||
if (this.Descendants.TryFind(buttonId, out button))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Button(button);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,138 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the Standard calculator view.
|
|
||||||
/// </summary>
|
|
||||||
public class ScientificCalculatorLfm
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="ScientificCalculatorLfm" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">The UIObject that is the root of the scientific Calculator.</param>
|
|
||||||
public ScientificCalculatorLfm(ScientificCalculatorPom objectModel)
|
|
||||||
{
|
|
||||||
this.ObjectModel = objectModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ScientificCalculatorPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void Press1()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking 1");
|
|
||||||
this.ObjectModel.OneButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Press2()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking 2");
|
|
||||||
this.ObjectModel.NumberPad.TwoButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Press3()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking 3");
|
|
||||||
this.ObjectModel.ThreeButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Press4()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking 4");
|
|
||||||
this.ObjectModel.FourButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PressSqrt()
|
|
||||||
{
|
|
||||||
// When invoking sqrt, both the expression changes.
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetExpressionChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking sqrt");
|
|
||||||
this.ObjectModel.SqrtButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PressMinus()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetExpressionChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking minus");
|
|
||||||
this.ObjectModel.MinusButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PressPlus()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetExpressionChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking plus");
|
|
||||||
this.ObjectModel.PlusButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PressEquals()
|
|
||||||
{
|
|
||||||
// When invoking equals, both the display and the expression change.
|
|
||||||
using (UIEventWaiter expressionWaiter = this.ObjectModel.GetExpressionChangedWaiter())
|
|
||||||
using (UIEventWaiter displayWaiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking equals");
|
|
||||||
this.ObjectModel.EqualButton.Invoke();
|
|
||||||
expressionWaiter.TryWait();
|
|
||||||
displayWaiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnePlusTwoEnter()
|
|
||||||
{
|
|
||||||
Press1();
|
|
||||||
PressPlus();
|
|
||||||
Press2();
|
|
||||||
PressEquals();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MemorySet() => this.ObjectModel.MemoryControls.SetButton.Invoke();
|
|
||||||
|
|
||||||
public MemoryLfm OpenMemory()
|
|
||||||
{
|
|
||||||
MemoryLfm lfm = new MemoryLfm(this.ObjectModel.MemoryControls);
|
|
||||||
lfm.OpenBody();
|
|
||||||
return lfm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HistoryLfm OpenHistory()
|
|
||||||
{
|
|
||||||
HistoryLfm lfm = new HistoryLfm(this.ObjectModel.HistoryControls);
|
|
||||||
lfm.OpenBody();
|
|
||||||
return lfm;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the Scientific Calculator
|
|
||||||
/// </summary>
|
|
||||||
public class ScientificCalculatorPom : CalculatorBasePom
|
|
||||||
{
|
|
||||||
private const string NumberPadId = "NumberPad";
|
|
||||||
private const string StandardOperatorsId = "StandardOperators";
|
|
||||||
private const string DisplayControlsId = "DisplayControls";
|
|
||||||
private const string ScientificFunctionsId = "ScientificFunctions";
|
|
||||||
private const string OneButtonId = "num1Button";
|
|
||||||
private const string ThreeButtonId = "num3Button";
|
|
||||||
private const string FourButtonId = "num4Button";
|
|
||||||
private const string SqrtButtonId = "squareRootButton";
|
|
||||||
private const string MinusButtonId = "minusButton";
|
|
||||||
private const string PlusButtonId = "plusButton";
|
|
||||||
private const string EqualButtonId = "equalButton";
|
|
||||||
private const string ClearButtonId = "clearButton";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="ScientificCalculatorPom" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">The UIObject that is the root of the scientific calculator.</param>
|
|
||||||
public ScientificCalculatorPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public UIObject StandardOperatorsGroup => this.Descendants.Find(StandardOperatorsId);
|
|
||||||
|
|
||||||
public UIObject DisplayControlsGroup => this.Descendants.Find(DisplayControlsId);
|
|
||||||
|
|
||||||
public UIObject ScientificFunctionsGroup => this.Descendants.Find(ScientificFunctionsId);
|
|
||||||
|
|
||||||
public Button OneButton => this.NumberPad.OneButton;
|
|
||||||
|
|
||||||
public Button ThreeButton => this.NumberPad.ThreeButton;
|
|
||||||
|
|
||||||
public Button FourButton => this.NumberPad.FourButton;
|
|
||||||
|
|
||||||
public Button SqrtButton => new Button(this.ScientificFunctionsGroup.Children.Find(SqrtButtonId));
|
|
||||||
|
|
||||||
public Button MinusButton => new Button(this.StandardOperatorsGroup.Children.Find(MinusButtonId));
|
|
||||||
|
|
||||||
public Button PlusButton => new Button(this.StandardOperatorsGroup.Children.Find(PlusButtonId));
|
|
||||||
|
|
||||||
public Button EqualButton => new Button(this.StandardOperatorsGroup.Children.Find(EqualButtonId));
|
|
||||||
|
|
||||||
public Button ClearButton => new Button(this.DisplayControlsGroup.Children.Find(ClearButtonId));
|
|
||||||
|
|
||||||
public NumberPadPom NumberPad => new NumberPadPom(this.Descendants.Find(NumberPadId));
|
|
||||||
|
|
||||||
public HistoryPom HistoryControls => new HistoryPom(this);
|
|
||||||
|
|
||||||
public MemoryPom MemoryControls => new MemoryPom(this);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,94 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the Standard calculator view.
|
|
||||||
/// </summary>
|
|
||||||
public class StandardCalculatorLfm
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="StandardCalculatorLfm" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">The UIObject that is the root of the Standard Calculator.</param>
|
|
||||||
public StandardCalculatorLfm(StandardCalculatorPom objectModel)
|
|
||||||
{
|
|
||||||
this.ObjectModel = objectModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public StandardCalculatorPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void OnePlusTwoEnter()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking 1");
|
|
||||||
this.ObjectModel.NumPad.OneButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetExpressionChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Pressing +");
|
|
||||||
this.ObjectModel.SendKeys("{ADD}");
|
|
||||||
// PropertyChangeWaiter is unreliable for the first name changed notification
|
|
||||||
// Bug 17624996: PropertyChanged event not fired when Name is updated for the first time for a control with custom automation peer.
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Pressing 2");
|
|
||||||
this.ObjectModel.SendKeys("2");
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
// When pressing enter, both the display and the expression change.
|
|
||||||
using (UIEventWaiter expressionWaiter = this.ObjectModel.GetExpressionChangedWaiter())
|
|
||||||
using (UIEventWaiter displayWaiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Invoking equals");
|
|
||||||
this.ObjectModel.EqualButton.Invoke();
|
|
||||||
expressionWaiter.TryWait();
|
|
||||||
displayWaiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
Log.Comment("Pressing escape");
|
|
||||||
this.ObjectModel.ClearButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ClearFiveMemorySet()
|
|
||||||
{
|
|
||||||
this.Clear();
|
|
||||||
using (UIEventWaiter waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
this.ObjectModel.NumPad.FiveButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ObjectModel.MemoryControls.SetButton.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemoryLfm OpenMemory()
|
|
||||||
{
|
|
||||||
MemoryLfm lfm = new MemoryLfm(this.ObjectModel.MemoryControls);
|
|
||||||
lfm.OpenBody();
|
|
||||||
return lfm;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HistoryLfm OpenHistory()
|
|
||||||
{
|
|
||||||
HistoryLfm lfm = new HistoryLfm(this.ObjectModel.HistoryControls);
|
|
||||||
lfm.OpenBody();
|
|
||||||
return lfm;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Represents the Standard Calculator
|
|
||||||
/// </summary>
|
|
||||||
public class StandardCalculatorPom : CalculatorBasePom
|
|
||||||
{
|
|
||||||
private const string CalculatorResultsId = "CalculatorResults";
|
|
||||||
private const string ExpressionContainerId = "CalculatorExpression";
|
|
||||||
private const string NumberPadId = "NumberPad";
|
|
||||||
private const string StandardOperatorsId = "StandardOperators";
|
|
||||||
private const string DisplayControlsId = "DisplayControls";
|
|
||||||
private const string EqualButtonId = "equalButton";
|
|
||||||
private const string ClearButtonId = "clearButton";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="StandardCalculatorPom" /> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="uiObject">The UIObject that is the root of the standard calculator.</param>
|
|
||||||
public StandardCalculatorPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public NumberPadPom NumPad => new NumberPadPom(this.Descendants.Find(NumberPadId));
|
|
||||||
|
|
||||||
public MemoryPom MemoryControls => new MemoryPom(this);
|
|
||||||
|
|
||||||
public HistoryPom HistoryControls => new HistoryPom(this);
|
|
||||||
|
|
||||||
public UIObject StandardOperatorsGroup => this.Descendants.Find(StandardOperatorsId);
|
|
||||||
|
|
||||||
public UIObject DisplayControlsGroup => this.Descendants.Find(DisplayControlsId);
|
|
||||||
|
|
||||||
public Button EqualButton => new Button(this.StandardOperatorsGroup.Children.Find(EqualButtonId));
|
|
||||||
|
|
||||||
public Button ClearButton => new Button(this.DisplayControlsGroup.Children.Find(ClearButtonId));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class UnitConverterLfm
|
|
||||||
{
|
|
||||||
public UnitConverterLfm(UnitConverterPom unitConverterPom)
|
|
||||||
{
|
|
||||||
this.ObjectModel = unitConverterPom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UnitConverterPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void Eight()
|
|
||||||
{
|
|
||||||
using (var waiter = this.ObjectModel.GetDisplayChangedWaiter())
|
|
||||||
{
|
|
||||||
this.ObjectModel.NumberPad.EightButton.Invoke();
|
|
||||||
waiter.TryWait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class UnitConverterPom : UIObject
|
|
||||||
{
|
|
||||||
private const string DisplayId = "Value1";
|
|
||||||
private const string NumberPadId = "numberPad";
|
|
||||||
|
|
||||||
public UnitConverterPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public NumberPadPom NumberPad => new NumberPadPom(this.Descendants.Find(NumberPadId));
|
|
||||||
|
|
||||||
public TextBlock Display => new TextBlock(this.Descendants.Find(DisplayId));
|
|
||||||
|
|
||||||
public PropertyChangedEventWaiter GetDisplayChangedWaiter() => this.Display.GetNameChangedWaiter();
|
|
||||||
|
|
||||||
public ElementAddedWaiter GetDisplayElementAddedWaiter() => new ElementAddedWaiter(this, Scope.Descendants, DisplayId);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Etw.Managed;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class HistoryLfm : ICanFocusWithClicks
|
|
||||||
{
|
|
||||||
public HistoryLfm(HistoryPom historyPom)
|
|
||||||
{
|
|
||||||
this.ObjectModel = historyPom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HistoryPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void FocusWithClicks()
|
|
||||||
{
|
|
||||||
// On the Programming calc, the default click location can land on the first memory item, dismissing the flyout.
|
|
||||||
// Instead, click just below, in the gutter to the left of the trash can.
|
|
||||||
var body = this.ObjectModel.Body;
|
|
||||||
int height = body.BoundingRectangle.Height;
|
|
||||||
body.DoubleClick(PointerButtons.Primary, Constants.ClickMargin, height + Constants.ClickMargin);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OpenBody()
|
|
||||||
{
|
|
||||||
using (EtwWaiter waiter = new EtwWaiter(Constants.CalculatorETWProviderGUID, Constants.HistoryBodyOpenedETWEventName))
|
|
||||||
{
|
|
||||||
// Only one exists at a given time.
|
|
||||||
if (this.ObjectModel.IsHistoryButtonVisible)
|
|
||||||
{
|
|
||||||
if (!this.ObjectModel.IsBodyOpen)
|
|
||||||
{
|
|
||||||
this.ObjectModel.HistoryButton.Invoke();
|
|
||||||
waiter.Wait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!this.ObjectModel.HistoryPivot.IsSelected)
|
|
||||||
{
|
|
||||||
this.ObjectModel.HistoryPivot.Click();
|
|
||||||
waiter.Wait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class HistoryPom : UIObject
|
|
||||||
{
|
|
||||||
private const string HistoryButtonId = "HistoryButton";
|
|
||||||
private const string HistoryPivotId = "HistoryLabel";
|
|
||||||
private const string BodyId = "HistoryListView";
|
|
||||||
|
|
||||||
public HistoryPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button HistoryButton => new Button(this.Descendants.Find(HistoryButtonId));
|
|
||||||
|
|
||||||
public bool IsHistoryButtonVisible => this.DoesDescendantExist(HistoryButtonId);
|
|
||||||
|
|
||||||
public TabItem HistoryPivot => new TabItem(this.Descendants.Find(HistoryPivotId));
|
|
||||||
|
|
||||||
public UIObject Body => this.Descendants.Find(BodyId);
|
|
||||||
|
|
||||||
public bool IsBodyOpen => this.DoesDescendantExist(BodyId);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public interface ICanFocusWithClicks
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Sets focus on an object by clicking on it, without causing further action.
|
|
||||||
/// Supports AccSpot scans by raising click events.
|
|
||||||
/// </summary>
|
|
||||||
void FocusWithClicks();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using Etw.Managed;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class MemoryLfm : ICanFocusWithClicks
|
|
||||||
{
|
|
||||||
public MemoryLfm(MemoryPom memoryPom)
|
|
||||||
{
|
|
||||||
this.ObjectModel = memoryPom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MemoryPom ObjectModel { get; }
|
|
||||||
|
|
||||||
public void FocusWithClicks()
|
|
||||||
{
|
|
||||||
// On the Programming calc, the default click location can land on the first memory item, dismissing the flyout.
|
|
||||||
// Instead, click just below, in the gutter to the left of the trash can.
|
|
||||||
var body = this.ObjectModel.Body;
|
|
||||||
int height = body.BoundingRectangle.Height;
|
|
||||||
body.DoubleClick(PointerButtons.Primary, Constants.ClickMargin, height + Constants.ClickMargin);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OpenBody()
|
|
||||||
{
|
|
||||||
using (EtwWaiter waiter = new EtwWaiter(Constants.CalculatorETWProviderGUID, Constants.MemoryBodyOpenedETWEventName))
|
|
||||||
{
|
|
||||||
// Only one exists at a given time
|
|
||||||
if (this.ObjectModel.IsMemoryButtonVisible)
|
|
||||||
{
|
|
||||||
if (!this.ObjectModel.IsBodyOpen)
|
|
||||||
{
|
|
||||||
this.ObjectModel.MemoryButton.Invoke();
|
|
||||||
waiter.Wait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!this.ObjectModel.MemoryPivot.IsSelected)
|
|
||||||
{
|
|
||||||
this.ObjectModel.MemoryPivot.Click();
|
|
||||||
waiter.Wait();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class MemoryPom : UIObject
|
|
||||||
{
|
|
||||||
private const string ClearMemoryButtonId = "ClearMemoryButton";
|
|
||||||
private const string RecallButtonId = "MemRecall";
|
|
||||||
private const string PlusButtonId = "MemPlus";
|
|
||||||
private const string MinusButtonId = "MemMinus";
|
|
||||||
private const string SetButtonId = "memButton";
|
|
||||||
private const string MemoryButtonId = "MemoryButton";
|
|
||||||
private const string MemoryPivotId = "MemoryLabel";
|
|
||||||
private const string BodyId = "MemoryListView";
|
|
||||||
|
|
||||||
public MemoryPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button ClearButton => new Button(this.Descendants.Find(ClearMemoryButtonId));
|
|
||||||
|
|
||||||
public Button RecallButton => new Button(this.Descendants.Find(RecallButtonId));
|
|
||||||
|
|
||||||
public Button PlusButton => new Button(this.Descendants.Find(PlusButtonId));
|
|
||||||
|
|
||||||
public Button MinusButton => new Button(this.Descendants.Find(MinusButtonId));
|
|
||||||
|
|
||||||
public Button SetButton => new Button(this.Descendants.Find(SetButtonId));
|
|
||||||
|
|
||||||
public Button MemoryButton => new Button(this.Descendants.Find(MemoryButtonId));
|
|
||||||
|
|
||||||
public bool IsMemoryButtonVisible => this.DoesDescendantExist(MemoryButtonId);
|
|
||||||
|
|
||||||
public TabItem MemoryPivot => new TabItem(this.Descendants.Find(MemoryPivotId));
|
|
||||||
|
|
||||||
public UIObject Body => this.Descendants.Find(BodyId);
|
|
||||||
|
|
||||||
public bool IsBodyOpen => this.DoesDescendantExist(BodyId);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Components
|
|
||||||
{
|
|
||||||
public class NumberPadPom : UIObject
|
|
||||||
{
|
|
||||||
private const string OneButtonId = "num1Button";
|
|
||||||
private const string TwoButtonId = "num2Button";
|
|
||||||
private const string ThreeButtonId = "num3Button";
|
|
||||||
private const string FourButtonId = "num4Button";
|
|
||||||
private const string FiveButtonId = "num5Button";
|
|
||||||
private const string SixButtonId = "num6Button";
|
|
||||||
private const string SevenButtonId = "num7Button";
|
|
||||||
private const string EightButtonId = "num8Button";
|
|
||||||
private const string NineButtonId = "num9Button";
|
|
||||||
private const string ZeroButtonId = "num0Button";
|
|
||||||
private const string DecimalButtonId = "decimalSeparatorButton";
|
|
||||||
|
|
||||||
public NumberPadPom(UIObject uiObject) : base(uiObject)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public Button ZeroButton => new Button(this.Children.Find(ZeroButtonId));
|
|
||||||
|
|
||||||
public Button OneButton => new Button(this.Children.Find(OneButtonId));
|
|
||||||
|
|
||||||
public Button TwoButton => new Button(this.Children.Find(TwoButtonId));
|
|
||||||
|
|
||||||
public Button ThreeButton => new Button(this.Children.Find(ThreeButtonId));
|
|
||||||
|
|
||||||
public Button FourButton => new Button(this.Children.Find(FourButtonId));
|
|
||||||
|
|
||||||
public Button FiveButton => new Button(this.Children.Find(FiveButtonId));
|
|
||||||
|
|
||||||
public Button SixButton => new Button(this.Children.Find(SixButtonId));
|
|
||||||
|
|
||||||
public Button SevenButton => new Button(this.Children.Find(SevenButtonId));
|
|
||||||
|
|
||||||
public Button EightButton => new Button(this.Children.Find(EightButtonId));
|
|
||||||
|
|
||||||
public Button NineButton => new Button(this.Children.Find(NineButtonId));
|
|
||||||
|
|
||||||
public Button DecimalButton => new Button(this.Children.Find(DecimalButtonId));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("Calculator.UIAutomationLibrary")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("D6913DAD-1C3B-4229-915F-8301A57970FC")]
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Etw.Managed;
|
|
||||||
using Calculator.UIAutomationLibrary.Components;
|
|
||||||
using WEX.TestExecution;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Tests
|
|
||||||
{
|
|
||||||
public static class BasicCalculationTest
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This test uses LFMs to add and then delete an alarm.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="calculatorAppLfm">The LFM for the alarms app window.</param>
|
|
||||||
public static void CalculateOnePlusTwo(this CalculatorAppLfm calculatorAppLfm)
|
|
||||||
{
|
|
||||||
var mainPage = calculatorAppLfm.MainPageLfm;
|
|
||||||
|
|
||||||
var standardCalculator = mainPage.NavigateToStandardCalculator();
|
|
||||||
|
|
||||||
standardCalculator.OnePlusTwoEnter();
|
|
||||||
|
|
||||||
Verify.AreEqual("\u202D3\u202C", standardCalculator.ObjectModel.Display.Name, "Ensure display value is 3");
|
|
||||||
|
|
||||||
standardCalculator.Clear();
|
|
||||||
|
|
||||||
Verify.AreEqual("\u202D0\u202C", standardCalculator.ObjectModel.Display.Name, "Ensure display value is 0");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Calculator.UIAutomationLibrary.Components;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using WEX.TestExecution;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary.Tests
|
|
||||||
{
|
|
||||||
public static class ScientificCalculationTest
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// This test uses LFMs to calculate the sqrt(4) - 2.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="calculatorAppLfm">The LFM for the calculator app window.</param>
|
|
||||||
public static void CalculateSqrt4Minus2(this CalculatorAppLfm calculatorAppLfm)
|
|
||||||
{
|
|
||||||
var mainPage = calculatorAppLfm.MainPageLfm;
|
|
||||||
|
|
||||||
var scientificCalculator = mainPage.NavigateToScientificCalculator();
|
|
||||||
|
|
||||||
scientificCalculator.Press4();
|
|
||||||
scientificCalculator.PressSqrt();
|
|
||||||
scientificCalculator.PressMinus();
|
|
||||||
scientificCalculator.Press3();
|
|
||||||
scientificCalculator.PressPlus();
|
|
||||||
scientificCalculator.Press1();
|
|
||||||
scientificCalculator.PressEquals();
|
|
||||||
|
|
||||||
Verify.AreEqual("\u202D0\u202C", scientificCalculator.ObjectModel.Display.Name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public class Constants
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// The path to the certificate file.
|
|
||||||
/// </summary>
|
|
||||||
public const string CertificateFileName = @"Calculator.cer";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The path to the appxbundle file.
|
|
||||||
/// </summary>
|
|
||||||
public const string PackageFileName = @"Calculator.appxbundle";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The path to the appxbundle file.
|
|
||||||
/// </summary>
|
|
||||||
public const string VCLibsPackageFileName = @"Microsoft.VCLibs.appx";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The path to the appxbundle file.
|
|
||||||
/// </summary>
|
|
||||||
public const string WinUIPackageFileName = @"Microsoft.UI.Xaml.appx";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Name of the CoreWindow.
|
|
||||||
/// </summary>
|
|
||||||
public const string AppWindowName = "Calculator";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Name of the process executable.
|
|
||||||
/// </summary>
|
|
||||||
public const string ProcessName = "Calculator.exe";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The package name.
|
|
||||||
/// </summary>
|
|
||||||
public const string PackageName = "Microsoft.WindowsCalculator";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The package family name for the app to test.
|
|
||||||
/// </summary>
|
|
||||||
public const string PackageFamilyName = PackageName + "_8wekyb3d8bbwe";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The package App User Model Id.
|
|
||||||
/// </summary>
|
|
||||||
public const string PackageAppUserModelId = PackageFamilyName + "!App";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// AutomationId for the top level UI element.
|
|
||||||
/// </summary>
|
|
||||||
public const string TopLevelWindowAutomationId = "CalculatorWindow";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event fired when the first page is loaded.
|
|
||||||
/// </summary>
|
|
||||||
public const string AppLaunchEndETWEventName = "AppLaunchEnd";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// App Provider GUID for ETW Events
|
|
||||||
/// </summary>
|
|
||||||
public static readonly Guid CalculatorETWProviderGUID = new Guid("0905CA09-610E-401E-B650-2F212980B9E0");
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event fired when a calculator mode change is complete.
|
|
||||||
/// </summary>
|
|
||||||
public const string AppModeChangeEndETWEventName = "ModeChangeEnd";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event fired when the History panel is opened by flyout or by changing pivot tabs.
|
|
||||||
/// </summary>
|
|
||||||
public const string HistoryBodyOpenedETWEventName = "HistoryBodyOpened";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event fired when the Memory panel is opened by flyout or by changing pivot tabs.
|
|
||||||
/// </summary>
|
|
||||||
public const string MemoryBodyOpenedETWEventName = "MemoryBodyOpened";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event fired when the About flyout control is loaded.
|
|
||||||
/// </summary>
|
|
||||||
public const string AboutFlyoutOpenedETWEventName = "AboutFlyoutOpened";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Event fired when the Nav Bar control is opened.
|
|
||||||
/// </summary>
|
|
||||||
public const string NavBarOpenedETWEventName = "NavBarOpened";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Margin used to click in the gutter beneath the History and Memory lists
|
|
||||||
/// </summary>
|
|
||||||
public const int ClickMargin = 10;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,101 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.OneCoreUap.Test.AppModel;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public class EtwHelper
|
|
||||||
{
|
|
||||||
private static bool etwServiceWasInstalled = false;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Installs and starts the Etw.Service so that Tests may utilize Etw Waiters.
|
|
||||||
/// Wex.Services.exe is part of TAEF.
|
|
||||||
/// </summary>
|
|
||||||
public static void InstallAndStartETWService()
|
|
||||||
{
|
|
||||||
etwServiceWasInstalled = ServiceHelper.IsInstalled("Etw.Service");
|
|
||||||
if (!etwServiceWasInstalled)
|
|
||||||
{
|
|
||||||
string wexServices = Path.Combine(TAEFHelper.GetTestDeploymentDirectory(), "Wex.Services.exe");
|
|
||||||
if (!File.Exists(wexServices))
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException(wexServices);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.Comment("Attempting to install Etw.Service...");
|
|
||||||
var startInfo = new ProcessStartInfo();
|
|
||||||
startInfo.FileName = wexServices;
|
|
||||||
startInfo.Arguments = "/install:Etw.Service";
|
|
||||||
|
|
||||||
var process = new Process();
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
if (process.Start())
|
|
||||||
{
|
|
||||||
process.WaitForExit();
|
|
||||||
Log.Comment("Completed installation of Etw.Service");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new Exception("ETW service was not able to be installed. Process didn't start.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.Comment("Attempting to start Etw.Service...");
|
|
||||||
ServiceHelper.Start("Etw.Service");
|
|
||||||
Log.Comment("Etw.Service started");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Stops the Etw.Service.
|
|
||||||
/// </summary>
|
|
||||||
public static void StopAndRemoveETWService()
|
|
||||||
{
|
|
||||||
if (ServiceHelper.IsInstalled("Etw.Service"))
|
|
||||||
{
|
|
||||||
Log.Comment("Attempting to stop Etw.Service...");
|
|
||||||
ServiceHelper.Stop("Etw.Service");
|
|
||||||
Log.Comment("Etw.Service stopped");
|
|
||||||
|
|
||||||
// if we installed the Etw.Service as part of this test we should also remove it.
|
|
||||||
// This prevents cases where TDP is upgraded but the service tregistration is referencing the old
|
|
||||||
// location that no longer exists.
|
|
||||||
if (!etwServiceWasInstalled)
|
|
||||||
{
|
|
||||||
|
|
||||||
string wexServices = Path.Combine(TAEFHelper.GetTestDeploymentDirectory(), "Wex.Services.exe");
|
|
||||||
if (!File.Exists(wexServices))
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException(wexServices);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.Comment("Attempting to remove Etw.Service...");
|
|
||||||
var startInfo = new ProcessStartInfo();
|
|
||||||
startInfo.FileName = wexServices;
|
|
||||||
startInfo.Arguments = "/remove:Etw.Service";
|
|
||||||
|
|
||||||
var process = new Process();
|
|
||||||
process.StartInfo = startInfo;
|
|
||||||
if (process.Start())
|
|
||||||
{
|
|
||||||
process.WaitForExit();
|
|
||||||
Log.Comment("Completed removal of Etw.Service");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new Exception("ETW service could not be removed. Process didn't start.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,100 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Microsoft.Win32.SafeHandles;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Security.Principal;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public static class Impersonater
|
|
||||||
{
|
|
||||||
public static void RunAs(RunAsUser user, Action action)
|
|
||||||
{
|
|
||||||
IntPtr errorInfo;
|
|
||||||
SafeAccessTokenHandle restrictedToken;
|
|
||||||
GetRunAsUserToken getRunAsUserToken = ResolveGetRunAsUserTokenMethod();
|
|
||||||
Marshal.ThrowExceptionForHR(getRunAsUserToken(user, out restrictedToken, out errorInfo), errorInfo);
|
|
||||||
|
|
||||||
WindowsIdentity.RunImpersonated(restrictedToken, action);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void RunAs<T>(RunAsUser user, Func<T> function)
|
|
||||||
{
|
|
||||||
IntPtr errorInfo;
|
|
||||||
SafeAccessTokenHandle restrictedToken;
|
|
||||||
GetRunAsUserToken getRunAsUserToken = ResolveGetRunAsUserTokenMethod();
|
|
||||||
Marshal.ThrowExceptionForHR(getRunAsUserToken(user, out restrictedToken, out errorInfo), errorInfo);
|
|
||||||
|
|
||||||
WindowsIdentity.RunImpersonated(restrictedToken, function);
|
|
||||||
}
|
|
||||||
|
|
||||||
// From: https://microsoft.visualstudio.com/EngSys/_git/validation.taef?path=%2Fsrc%2FTAEF%2FCommon%2FPublished%2FRunAsFromSystem.h&version=GBdevelop
|
|
||||||
public enum RunAsUser
|
|
||||||
{
|
|
||||||
ElevatedUser,
|
|
||||||
User,
|
|
||||||
RestrictedUser,
|
|
||||||
LowIL,
|
|
||||||
InteractiveUser,
|
|
||||||
};
|
|
||||||
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
||||||
private delegate int GetRunAsUserToken(RunAsUser user, out SafeAccessTokenHandle token, out IntPtr errorInfo);
|
|
||||||
|
|
||||||
// GetRunAsUserToken is defined in a namespace so we have to do some tricks to use P/Invoke.
|
|
||||||
// We got the actual exported method name by running dumpbin /exports TE.Common.dll
|
|
||||||
private static GetRunAsUserToken ResolveGetRunAsUserTokenMethod()
|
|
||||||
{
|
|
||||||
IntPtr teCommonDll = IntPtr.Zero;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
teCommonDll = LoadLibrary(@"TE.Common.dll");
|
|
||||||
|
|
||||||
IntPtr x64GetRunAsUserToken = GetProcAddress(teCommonDll, "?GetRunAsUserToken@TestExecution@WEX@@YAJW4RunAsUser@12@PEAPEAXPEAPEAUIErrorInfo@@@Z");
|
|
||||||
if (x64GetRunAsUserToken != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
return Marshal.GetDelegateForFunctionPointer<GetRunAsUserToken>(x64GetRunAsUserToken);
|
|
||||||
}
|
|
||||||
IntPtr x86GetRunAsUserToken = GetProcAddress(teCommonDll, "?GetRunAsUserToken@TestExecution@WEX@@YGJW4RunAsUser@12@PAPAXPAPAUIErrorInfo@@@Z");
|
|
||||||
if (x86GetRunAsUserToken != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
return Marshal.GetDelegateForFunctionPointer<GetRunAsUserToken>(x86GetRunAsUserToken);
|
|
||||||
}
|
|
||||||
IntPtr armGetRunAsUserToken = GetProcAddress(teCommonDll, "?GetRunAsUserToken@TestExecution@WEX@@YAJW4RunAsUser@12@PAPAXPAPAUIErrorInfo@@@Z");
|
|
||||||
if (armGetRunAsUserToken != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
return Marshal.GetDelegateForFunctionPointer<GetRunAsUserToken>(armGetRunAsUserToken);
|
|
||||||
}
|
|
||||||
IntPtr arm64GetRunAsUserToken = GetProcAddress(teCommonDll, "?GetRunAsUserToken@TestExecution@WEX@@YAJW4RunAsUser@12@PEAPEAXPEAPEAUIErrorInfo@@@Z");
|
|
||||||
if (arm64GetRunAsUserToken != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
return Marshal.GetDelegateForFunctionPointer<GetRunAsUserToken>(arm64GetRunAsUserToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new Exception("Unable to find the GetRunAsUserToken function in DLL 'TE.Common.dll'");
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (teCommonDll != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
FreeLibrary(teCommonDll);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[DllImport("kernel32.dll")]
|
|
||||||
public static extern IntPtr LoadLibrary(string dllToLoad);
|
|
||||||
|
|
||||||
[DllImport("kernel32.dll")]
|
|
||||||
public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);
|
|
||||||
|
|
||||||
[DllImport("kernel32.dll")]
|
|
||||||
public static extern bool FreeLibrary(IntPtr hModule);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using System.Threading;
|
|
||||||
using Microsoft.OneCoreUap.Test.AppModel;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
using Windows.Foundation;
|
|
||||||
using Windows.Management.Deployment;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public class InstallHelper
|
|
||||||
{
|
|
||||||
public static void InstallCertFile(string certFilePath)
|
|
||||||
{
|
|
||||||
// Ensure cert exists.
|
|
||||||
if (!File.Exists(certFilePath))
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException(certFilePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
// For some reason, attempting to use CertificateHelper.InstallFromSignedPackage() to install
|
|
||||||
// the certificate associated with the appx package fails with the error:
|
|
||||||
// "A certificate chain could not be built to a trusted root authority."
|
|
||||||
// The reason is that the cert needs to be installed in 'StoreName.TrustedPeople',
|
|
||||||
// but DeploymentHelper.AddPackage() attempts to install it in 'StoreName.Root'.
|
|
||||||
// Therefore, the cert has been installed manually beforehand.
|
|
||||||
Log.Comment($"Starting install of certificate at {certFilePath}");
|
|
||||||
|
|
||||||
X509Certificate2 certificate = new X509Certificate2(certFilePath);
|
|
||||||
X509Store trustedPeopleStore = new X509Store(StoreName.TrustedPeople, StoreLocation.LocalMachine);
|
|
||||||
trustedPeopleStore.Open(OpenFlags.MaxAllowed);
|
|
||||||
trustedPeopleStore.Add(certificate);
|
|
||||||
|
|
||||||
Log.Comment($"Completed install of certificate");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Upgrades the appx/appxbundle from the path if needed.
|
|
||||||
/// </summary>
|
|
||||||
public static void InstallPackage(string appxFilePath, params string[] dependencyAppxFilePaths)
|
|
||||||
{
|
|
||||||
// Ensure the files exist.
|
|
||||||
if (!File.Exists(appxFilePath))
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException(appxFilePath);
|
|
||||||
}
|
|
||||||
foreach (var path in dependencyAppxFilePaths.Where(p => !File.Exists(p)))
|
|
||||||
{
|
|
||||||
throw new FileNotFoundException(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.Comment($"Starting install of app package at {appxFilePath}");
|
|
||||||
|
|
||||||
PackageManager packageManager = new PackageManager();
|
|
||||||
var deploymentOperation = packageManager.AddPackageAsync(
|
|
||||||
new Uri(appxFilePath),
|
|
||||||
dependencyAppxFilePaths.Select(d => new Uri(d)),
|
|
||||||
DeploymentOptions.ForceApplicationShutdown | DeploymentOptions.ForceTargetApplicationShutdown | DeploymentOptions.ForceUpdateFromAnyVersion);
|
|
||||||
|
|
||||||
WaitForDeploymentOperation(deploymentOperation);
|
|
||||||
|
|
||||||
Log.Comment("Completed install of app package");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Waits for a deployment operation to complete
|
|
||||||
/// </summary>
|
|
||||||
private static void WaitForDeploymentOperation(IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> operation)
|
|
||||||
{
|
|
||||||
ManualResetEvent isCompletedEvent = new ManualResetEvent(false);
|
|
||||||
operation.Completed = (IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> asyncInfo, AsyncStatus asyncStatus) =>
|
|
||||||
{
|
|
||||||
isCompletedEvent.Set();
|
|
||||||
};
|
|
||||||
|
|
||||||
isCompletedEvent.WaitOne();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,139 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
internal static class NativeMethods
|
|
||||||
{
|
|
||||||
internal const int GW_OWNER = 4;
|
|
||||||
|
|
||||||
internal delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern bool EnumWindows(EnumThreadWindowsCallback callback, IntPtr extraData);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern int GetWindowThreadProcessId(IntPtr handle, out int processId);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern int GetWindowTextLength(IntPtr hWnd);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern bool IsWindowVisible(IntPtr hWnd);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern int GetWindowLong(IntPtr hWnd, int nIndex);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern IntPtr GetWindow(IntPtr hWnd, int uCmd);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-ntuser-ie-window-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern bool SetForegroundWindow(IntPtr hWnd);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-service-management-l1-1-0.dll", SetLastError = true)]
|
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
|
||||||
internal static extern bool StartService(IntPtr hService, int dwNumServiceArgs, string[] lpServiceArgVectors);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-service-management-l1-1-0.dll", SetLastError = true)]
|
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
|
||||||
internal static extern bool ControlService(IntPtr hService, SERVICE_CONTROL dwControl, ref SERVICE_STATUS lpServiceStatus);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-service-management-l1-1-0.dll")]
|
|
||||||
internal static extern IntPtr OpenSCManager(string machineName, string databaseName, uint dwAccess);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-service-management-l1-1-0.dll", SetLastError = true)]
|
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
|
||||||
internal static extern bool CloseServiceHandle(IntPtr hSCObject);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-service-management-l1-1-0.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
|
||||||
internal static extern IntPtr OpenService(IntPtr hSCManager, string lpServiceName, uint dwDesiredAccess);
|
|
||||||
|
|
||||||
[DllImport("api-ms-win-service-management-l1-1-0.dll", SetLastError = true)]
|
|
||||||
internal static extern bool QueryServiceStatus(IntPtr hService, ref SERVICE_STATUS dwServiceStatus);
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
||||||
internal struct SERVICE_STATUS
|
|
||||||
{
|
|
||||||
public int dwServiceType;
|
|
||||||
public int dwCurrentState;
|
|
||||||
public int dwControlsAccepted;
|
|
||||||
public int dwWin32ExitCode;
|
|
||||||
public int dwServiceSpecificExitCode;
|
|
||||||
public int dwCheckPoint;
|
|
||||||
public int dwWaitHint;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static uint STANDARD_RIGHTS_REQUIRED = 0xF0000;
|
|
||||||
|
|
||||||
internal static uint SC_MANAGER_CONNECT = 0x0001;
|
|
||||||
internal static uint SC_MANAGER_CREATE_SERVICE = 0x0002;
|
|
||||||
internal static uint SC_MANAGER_ENUMERATE_SERVICE = 0x0004;
|
|
||||||
internal static uint SC_MANAGER_LOCK = 0x0008;
|
|
||||||
internal static uint SC_MANAGER_QUERY_LOCK_STATUS = 0x0010;
|
|
||||||
internal static uint SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020;
|
|
||||||
internal static uint SC_MANAGER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED |
|
|
||||||
SC_MANAGER_CONNECT |
|
|
||||||
SC_MANAGER_CREATE_SERVICE |
|
|
||||||
SC_MANAGER_ENUMERATE_SERVICE |
|
|
||||||
SC_MANAGER_LOCK |
|
|
||||||
SC_MANAGER_QUERY_LOCK_STATUS |
|
|
||||||
SC_MANAGER_MODIFY_BOOT_CONFIG);
|
|
||||||
|
|
||||||
internal static uint SERVICE_QUERY_CONFIG = 0x0001;
|
|
||||||
internal static uint SERVICE_CHANGE_CONFIG = 0x0002;
|
|
||||||
internal static uint SERVICE_QUERY_STATUS = 0x0004;
|
|
||||||
internal static uint SERVICE_ENUMERATE_DEPENDENTS = 0x0008;
|
|
||||||
internal static uint SERVICE_START = 0x0010;
|
|
||||||
internal static uint SERVICE_STOP = 0x0020;
|
|
||||||
internal static uint SERVICE_PAUSE_CONTINUE = 0x0040;
|
|
||||||
internal static uint SERVICE_INTERROGATE = 0x0080;
|
|
||||||
internal static uint SERVICE_USER_DEFINED_CONTROL = 0x0100;
|
|
||||||
internal static uint SERVICE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED |
|
|
||||||
SERVICE_QUERY_CONFIG |
|
|
||||||
SERVICE_CHANGE_CONFIG |
|
|
||||||
SERVICE_QUERY_STATUS |
|
|
||||||
SERVICE_ENUMERATE_DEPENDENTS |
|
|
||||||
SERVICE_START |
|
|
||||||
SERVICE_STOP |
|
|
||||||
SERVICE_PAUSE_CONTINUE |
|
|
||||||
SERVICE_INTERROGATE |
|
|
||||||
SERVICE_USER_DEFINED_CONTROL);
|
|
||||||
|
|
||||||
[Flags]
|
|
||||||
internal enum SERVICE_CONTROL : uint
|
|
||||||
{
|
|
||||||
STOP = 0x00000001,
|
|
||||||
PAUSE = 0x00000002,
|
|
||||||
CONTINUE = 0x00000003,
|
|
||||||
INTERROGATE = 0x00000004,
|
|
||||||
SHUTDOWN = 0x00000005,
|
|
||||||
PARAMCHANGE = 0x00000006,
|
|
||||||
NETBINDADD = 0x00000007,
|
|
||||||
NETBINDREMOVE = 0x00000008,
|
|
||||||
NETBINDENABLE = 0x00000009,
|
|
||||||
NETBINDDISABLE = 0x0000000A,
|
|
||||||
DEVICEEVENT = 0x0000000B,
|
|
||||||
HARDWAREPROFILECHANGE = 0x0000000C,
|
|
||||||
POWEREVENT = 0x0000000D,
|
|
||||||
SESSIONCHANGE = 0x0000000E
|
|
||||||
}
|
|
||||||
|
|
||||||
internal enum SERVICE_STATE : int
|
|
||||||
{
|
|
||||||
SERVICE_STOPPED = 0x00000001,
|
|
||||||
SERVICE_START_PENDING = 0x00000002,
|
|
||||||
SERVICE_STOP_PENDING = 0x00000003,
|
|
||||||
SERVICE_RUNNING = 0x00000004,
|
|
||||||
SERVICE_CONTINUE_PENDING = 0x00000005,
|
|
||||||
SERVICE_PAUSE_PENDING = 0x00000006,
|
|
||||||
SERVICE_PAUSED = 0x00000007
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public class PerfConstants
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Path where the regions, wprprofiles and wpaprofiles will be deployed to by the spkg.
|
|
||||||
/// </summary>
|
|
||||||
public const string ConfigDirectory = @"Config\";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Our FunGates source, where we can view test results.
|
|
||||||
/// </summary>
|
|
||||||
public const string FunGatesSource =
|
|
||||||
#if DEBUG
|
|
||||||
"TestSite";
|
|
||||||
#else
|
|
||||||
"Utility Apps Performance Tests";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The Windows Performance Recorder profile. These strings must have the config directory prefix.
|
|
||||||
/// For use with the WPRProfileFile test attribute.
|
|
||||||
/// </summary>
|
|
||||||
public const string AppLifecycleWPRProfile = ConfigDirectory + "AppLifecycle.Profile.wprp";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The regions of interest file that contains the events we are interested in measuring.
|
|
||||||
/// </summary>
|
|
||||||
public const string AppLifecycleRegions = ConfigDirectory + "AppLifecycle.regions.xml";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// These are uses with the DataSource test property to specify iteration info.
|
|
||||||
/// </summary>
|
|
||||||
public const string AppLifecycleIterationsSource = "Table:" + ConfigDirectory + "AppLifecycle.Iterations.xml#PerformanceConfigurations";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,156 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public class ServiceHelper
|
|
||||||
{
|
|
||||||
public static void Start(string serviceName, int timeoutInMilliSeconds = 30000)
|
|
||||||
{
|
|
||||||
IntPtr hService = IntPtr.Zero;
|
|
||||||
IntPtr hSCManager = IntPtr.Zero;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
hSCManager = NativeMethods.OpenSCManager(null, null, NativeMethods.SC_MANAGER_ALL_ACCESS);
|
|
||||||
if (IntPtr.Zero == hSCManager)
|
|
||||||
{
|
|
||||||
throw new Exception($"Start: Cannot Open OpenSCManager, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
|
|
||||||
hService = NativeMethods.OpenService(hSCManager, serviceName, NativeMethods.SERVICE_ALL_ACCESS);
|
|
||||||
if (IntPtr.Zero == hService)
|
|
||||||
{
|
|
||||||
throw new Exception($"Start: Cannot Open Service, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
|
|
||||||
NativeMethods.SERVICE_STATUS serviceStatus = new NativeMethods.SERVICE_STATUS();
|
|
||||||
if (!NativeMethods.QueryServiceStatus(hService, ref serviceStatus))
|
|
||||||
{
|
|
||||||
throw new Exception($"Start: Unable to query status of Service, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (serviceStatus.dwCurrentState != (int)NativeMethods.SERVICE_STATE.SERVICE_RUNNING &&
|
|
||||||
serviceStatus.dwCurrentState != (int)NativeMethods.SERVICE_STATE.SERVICE_START_PENDING)
|
|
||||||
{
|
|
||||||
if (!NativeMethods.StartService(hService, 0, null))
|
|
||||||
{
|
|
||||||
throw new Exception($"Start: Service cannot be started, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
WaitForStatus(hService, NativeMethods.SERVICE_STATE.SERVICE_RUNNING, TimeSpan.FromMilliseconds(timeoutInMilliSeconds));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (IntPtr.Zero != hService)
|
|
||||||
{
|
|
||||||
NativeMethods.CloseServiceHandle(hService);
|
|
||||||
}
|
|
||||||
if (IntPtr.Zero != hSCManager)
|
|
||||||
{
|
|
||||||
NativeMethods.CloseServiceHandle(hSCManager);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Stop(string serviceName, int timeoutInMilliSeconds = 30000)
|
|
||||||
{
|
|
||||||
IntPtr hSCManager = IntPtr.Zero;
|
|
||||||
IntPtr hService = IntPtr.Zero;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
hSCManager = NativeMethods.OpenSCManager(null, null, NativeMethods.SC_MANAGER_ALL_ACCESS);
|
|
||||||
if (IntPtr.Zero == hSCManager)
|
|
||||||
{
|
|
||||||
throw new Exception($"Stop: Cannot Open OpenSCManager, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
|
|
||||||
hService = NativeMethods.OpenService(hSCManager, serviceName, NativeMethods.SERVICE_ALL_ACCESS);
|
|
||||||
if (IntPtr.Zero == hService)
|
|
||||||
{
|
|
||||||
throw new Exception($"Stop: Cannot Open Service, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
|
|
||||||
NativeMethods.SERVICE_STATUS serviceStatus = new NativeMethods.SERVICE_STATUS();
|
|
||||||
if (!NativeMethods.QueryServiceStatus(hService, ref serviceStatus))
|
|
||||||
{
|
|
||||||
throw new Exception($"Stop: Unable to query status of Service, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (serviceStatus.dwCurrentState != (int)NativeMethods.SERVICE_STATE.SERVICE_STOPPED &&
|
|
||||||
serviceStatus.dwCurrentState != (int)NativeMethods.SERVICE_STATE.SERVICE_STOP_PENDING)
|
|
||||||
{
|
|
||||||
if (!NativeMethods.ControlService(hService, NativeMethods.SERVICE_CONTROL.STOP, ref serviceStatus))
|
|
||||||
{
|
|
||||||
throw new Exception($"Stop: Service cannot be stopped, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
WaitForStatus(hService, NativeMethods.SERVICE_STATE.SERVICE_STOPPED, TimeSpan.FromMilliseconds(timeoutInMilliSeconds));
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if (IntPtr.Zero != hService)
|
|
||||||
{
|
|
||||||
NativeMethods.CloseServiceHandle(hService);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IntPtr.Zero != hSCManager)
|
|
||||||
{
|
|
||||||
NativeMethods.CloseServiceHandle(hSCManager);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsInstalled(string svcName)
|
|
||||||
{
|
|
||||||
IntPtr sc_handle = NativeMethods.OpenSCManager(null, null, NativeMethods.SC_MANAGER_ALL_ACCESS);
|
|
||||||
if (sc_handle == IntPtr.Zero)
|
|
||||||
{
|
|
||||||
throw new Exception($"IsInstalled: Cannot open service manager, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool bResult = false;
|
|
||||||
IntPtr sv_handle = NativeMethods.OpenService(sc_handle, svcName, NativeMethods.SERVICE_QUERY_CONFIG);
|
|
||||||
if (sv_handle.ToInt64() != 0)
|
|
||||||
{
|
|
||||||
bResult = true;
|
|
||||||
NativeMethods.CloseServiceHandle(sv_handle);
|
|
||||||
}
|
|
||||||
NativeMethods.CloseServiceHandle(sc_handle);
|
|
||||||
return bResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void WaitForStatus(IntPtr hService, NativeMethods.SERVICE_STATE desiredStatus, TimeSpan timeout)
|
|
||||||
{
|
|
||||||
Stopwatch swLoop = new Stopwatch();
|
|
||||||
swLoop.Start();
|
|
||||||
|
|
||||||
NativeMethods.SERVICE_STATUS serviceStatus = new NativeMethods.SERVICE_STATUS();
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
Thread.Sleep(500);
|
|
||||||
if (!NativeMethods.QueryServiceStatus(hService, ref serviceStatus))
|
|
||||||
{
|
|
||||||
throw new Exception($"WaitForStatus: Unable to query status of service, {Marshal.GetLastWin32Error()}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (serviceStatus.dwCurrentState != (int)desiredStatus && (swLoop.ElapsedMilliseconds <= timeout.TotalMilliseconds));
|
|
||||||
|
|
||||||
if (serviceStatus.dwCurrentState != (int)desiredStatus)
|
|
||||||
{
|
|
||||||
throw new Exception($"WaitForStatus: Service failed to reach desired state: {desiredStatus}, current state: {serviceStatus.dwCurrentState}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Automation;
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public static class UIObjectExtensions
|
|
||||||
{
|
|
||||||
private const string NamePropertyName = "Name";
|
|
||||||
private static UICondition CoreWindowCondition = UICondition.CreateFromClassName("Windows.UI.Core.CoreWindow");
|
|
||||||
|
|
||||||
public static Window GetParentCoreWindow(this UIObject uiObject)
|
|
||||||
{
|
|
||||||
if (uiObject.Matches(CoreWindowCondition))
|
|
||||||
{
|
|
||||||
return new Window(uiObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Window(uiObject.Ancestors.Find(CoreWindowCondition));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Window GetTopLevelWindow(this Window window)
|
|
||||||
{
|
|
||||||
var node = window;
|
|
||||||
while (node != null && node.Parent != null && node.Parent.ControlType == ControlType.Window)
|
|
||||||
{
|
|
||||||
node = new Window(node.Parent);
|
|
||||||
}
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void VerifyParentTreeStructure(this UIObject uiObject)
|
|
||||||
{
|
|
||||||
var node = uiObject;
|
|
||||||
while (node != null && node.Parent != null)
|
|
||||||
{
|
|
||||||
if (!node.Parent.Children.Contains(node))
|
|
||||||
{
|
|
||||||
Log.Comment($"- [VerifyingTree] {node} specifies {node.Parent} as parent but is not part of its children.");
|
|
||||||
}
|
|
||||||
if (!node.Parent.Descendants.Contains(node))
|
|
||||||
{
|
|
||||||
Log.Comment($"- [VerifyingTree] {node} specifies {node.Parent} as parent but is not part of its descendants.");
|
|
||||||
}
|
|
||||||
node = node.Parent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool DoesDescendantExist(this UIObject uiObject, string automationId)
|
|
||||||
{
|
|
||||||
UIObject temp;
|
|
||||||
return uiObject.Descendants.TryFind(automationId, out temp);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static PropertyChangedEventWaiter GetNameChangedWaiter(this TextBlock textBlock)
|
|
||||||
{
|
|
||||||
return new PropertyChangedEventWaiter(textBlock, UIProperty.Get(NamePropertyName));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public class Utilities
|
|
||||||
{
|
|
||||||
public static void KillExistingCalculatorProcesses()
|
|
||||||
{
|
|
||||||
Log.Comment("Killing any existing Calculator processes");
|
|
||||||
|
|
||||||
foreach (var process in Process.GetProcessesByName(Path.GetFileNameWithoutExtension(Constants.ProcessName)))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
process.Kill();
|
|
||||||
Log.Comment($"Killed {process.ProcessName}, Id: {process.Id}");
|
|
||||||
}
|
|
||||||
catch (Exception) when (process.HasExited)
|
|
||||||
{
|
|
||||||
Log.Comment($"{process.ProcessName}, Id: {process.Id} already exited.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
|
|
||||||
namespace Calculator.UIAutomationLibrary
|
|
||||||
{
|
|
||||||
public class WindowHelper
|
|
||||||
{
|
|
||||||
public static void SetAsForeground(Window window)
|
|
||||||
{
|
|
||||||
Log.Comment($"Set window {window.NativeWindowHandle} as the foreground window.");
|
|
||||||
|
|
||||||
NativeMethods.SetForegroundWindow(window.NativeWindowHandle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"AppModel.TestHelper": "2018.3.22",
|
|
||||||
"EtwProcessor.Managed": "10.34.181220007",
|
|
||||||
"MITALite": "1.0.180128001",
|
|
||||||
"Taef.Managed": "10.34.181220007",
|
|
||||||
"Test.Net.Redist": "2.0.1"
|
|
||||||
},
|
|
||||||
"frameworks": {
|
|
||||||
"netcore50": {}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,145 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
|
||||||
<ProjectGuid>{0224A709-0C48-4C4F-BA17-843A49842C15}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>Calculator.UITests</RootNamespace>
|
|
||||||
<AssemblyName>Calculator.UITests</AssemblyName>
|
|
||||||
<TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
|
|
||||||
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
|
|
||||||
<NuGetTargetMoniker>.NETCore,Version=v5.0</NuGetTargetMoniker>
|
|
||||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
|
||||||
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
|
|
||||||
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<CopyNuGetImplementations>true</CopyNuGetImplementations>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\x86</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\x86</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\x64</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\x64</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\arm</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\arm</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM64' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug\ARM64\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM64' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release\ARM64\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<PlatformTarget>ARM64</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Initialization.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Tests\AppLifecycleTests.cs" />
|
|
||||||
<Compile Include="Tests\CalculatorTests.cs" />
|
|
||||||
<Compile Include="Tests\LaunchTests.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Config\AppLifecycle.Profile.wprp">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Config\AppLifecycle.Regions.tt">
|
|
||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
|
||||||
<LastGenOutput>AppLifecycle.Regions.xml</LastGenOutput>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Config\AppLifecycle.Regions.xml">
|
|
||||||
<DependentUpon>AppLifecycle.Regions.tt</DependentUpon>
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
</Content>
|
|
||||||
<None Include="project.json" />
|
|
||||||
<None Include="testmd.definition" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Calculator.UIAutomationLibrary\Calculator.UIAutomationLibrary.csproj">
|
|
||||||
<Project>{a43517b5-8be3-4312-913f-004978c34444}</Project>
|
|
||||||
<Name>Calculator.UIAutomationLibrary</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Config\AppLifecycle.Iterations.xml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0' ">
|
|
||||||
<VisualStudioVersion>15.0</VisualStudioVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
@ -1,40 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
This file defines a table of performance configuration for use with
|
|
||||||
TAEF Table Based Data-driven Testing.
|
|
||||||
|
|
||||||
This table specifies we will run the test three times (each iteration has a
|
|
||||||
unique name to identify the scenario) with different parameters each time.
|
|
||||||
We use the same region file for WinPerf but we specify different WPR profiles
|
|
||||||
to capture ETW events from different providers, focusing on responsiveness for
|
|
||||||
launch runs and on memory for one diagnostic memory run.
|
|
||||||
|
|
||||||
The warm run is the one we are primarily interested in for startup performance.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<Data>
|
|
||||||
<Table Id="PerformanceConfigurations">
|
|
||||||
<Row Name="Cold"
|
|
||||||
WinPerf.FriendlyAutomationName="AppLifecycle_Responsiveness_Cold"
|
|
||||||
WinPerf.Iterations="1"
|
|
||||||
WinPerf.WPRProfile="Config\AppLifecycle.Profile.wprp"
|
|
||||||
WinPerf.WPRProfileId="AppLifecycle.Responsiveness.Diagnostic.Verbose.File"
|
|
||||||
WinPerf.Regions="Config\AppLifecycle.Regions.xml">
|
|
||||||
</Row>
|
|
||||||
<Row Name="Warm"
|
|
||||||
WinPerf.FriendlyAutomationName="AppLifecycle_Responsiveness_Warm"
|
|
||||||
WinPerf.Iterations="10"
|
|
||||||
WinPerf.WPRProfile="Config\AppLifecycle.Profile.wprp"
|
|
||||||
WinPerf.WPRProfileId="AppLifecycle.Responsiveness.Diagnostic.Verbose.Memory"
|
|
||||||
WinPerf.Regions="Config\AppLifecycle.Regions.xml">
|
|
||||||
</Row>
|
|
||||||
<Row Name="Memory"
|
|
||||||
WinPerf.FriendlyAutomationName="AppLifecycle_Memory"
|
|
||||||
WinPerf.Iterations="1"
|
|
||||||
WinPerf.WPRProfile="Config\AppLifecycle.Profile.wprp"
|
|
||||||
WinPerf.WPRProfileId="AppLifecycle.Memory.Diagnostic.Verbose.File"
|
|
||||||
WinPerf.Regions="Config\AppLifecycle.Regions.xml">
|
|
||||||
</Row>
|
|
||||||
</Table>
|
|
||||||
</Data>
|
|
@ -1,526 +0,0 @@
|
|||||||
<!--
|
|
||||||
|
|
||||||
This WPRP (WPR profile) contains the App Life Cycle settings for Mobile and Client Performance Gates (MPG and CPG).
|
|
||||||
Since the appcycle automations are currently still separate, any changes here should be made in two places to keep these wprp's in sync.
|
|
||||||
CPG: base\PerfTest\MemRe\AppLifecycle\Common\AppLifeCycle.wprp
|
|
||||||
MPG: wm\src\tools\Product\DH\Test\PerfWorkloads\AppLifeCycle\AppLifeCycle.wprp
|
|
||||||
|
|
||||||
Prefixes in the WPRP:
|
|
||||||
SC_ - System Collector controlling kernel event tracing
|
|
||||||
EC_ - Event Collector controlling user mode event tracing
|
|
||||||
|
|
||||||
SP_ - System Provider
|
|
||||||
|
|
||||||
EP_ - Event Provider
|
|
||||||
|
|
||||||
There are two separate traces - Responsiveness and Memory.
|
|
||||||
Within that, we have Light tracing which is for official gating metrics/traces, and we have Verbose tracing, which is for Diagnostic metrics\traces.
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
<WindowsPerformanceRecorder Version="1.0" Comments="Test" Company="Microsoft Corporation" Copyright="Microsoft Corporation">
|
|
||||||
<Profiles>
|
|
||||||
<!-- BufferSizes are in KB in WPRP -->
|
|
||||||
|
|
||||||
<!-- System Collectors -->
|
|
||||||
<SystemCollector Id="SC_Responsiveness.LowCost.Light" Name="NT Kernel Resposiveness Logger LowCost Light">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="3" PercentageOfTotalMemory="true" MaximumBufferSpace="30" />
|
|
||||||
</SystemCollector>
|
|
||||||
|
|
||||||
<SystemCollector Id="SC_Responsiveness.LowCost" Name="NT Kernel Resposiveness Logger LowCost">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="35" />
|
|
||||||
</SystemCollector>
|
|
||||||
|
|
||||||
<SystemCollector Id="SC_Responsiveness.HighCost.Verbose" Name="NT Kernel Resposiveness Logger HighCost Verbose">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="7" PercentageOfTotalMemory="true" MaximumBufferSpace="140" />
|
|
||||||
</SystemCollector>
|
|
||||||
|
|
||||||
<SystemCollector Id="SC_Memory.LowCost.Light" Name="NT Kernel Memory Logger LowCost Light">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="35" />
|
|
||||||
</SystemCollector>
|
|
||||||
|
|
||||||
<SystemCollector Id="SC_Memory.HighCost.Verbose" Name="NT Kernel Memory Logger LowCost Light">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="75" />
|
|
||||||
</SystemCollector>
|
|
||||||
|
|
||||||
<!-- Event Collectors -->
|
|
||||||
<EventCollector Id="EC_Responsiveness.LowCost.Light" Name="User Session Logger LowCost Light">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="2" PercentageOfTotalMemory="true" MaximumBufferSpace="20"/>
|
|
||||||
</EventCollector>
|
|
||||||
|
|
||||||
<EventCollector Id="EC_Responsiveness.LowCost.Light.UTC" Name="User Session Logger LowCost Light UTC">
|
|
||||||
<BufferSize Value="1024"/>
|
|
||||||
<Buffers Value="5"/>
|
|
||||||
</EventCollector>
|
|
||||||
|
|
||||||
<EventCollector Id="EC_Responsiveness.LowCost" Name="User Session Logger LowCost">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="15" />
|
|
||||||
</EventCollector>
|
|
||||||
|
|
||||||
<EventCollector Id="EC_Responsiveness.HighCost.Verbose" Name="User Session Logger HighCost Verbose">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="3" PercentageOfTotalMemory="true" MaximumBufferSpace="60" />
|
|
||||||
</EventCollector>
|
|
||||||
|
|
||||||
<EventCollector Id="EC_Memory.LowCost.Light" Name="User Session Logger LowCost Light">
|
|
||||||
<BufferSize Value="1024" />
|
|
||||||
<Buffers Value="30" />
|
|
||||||
</EventCollector>
|
|
||||||
|
|
||||||
<!-- System Providers for collecting kernel events. -->
|
|
||||||
<SystemProvider Id="SP_Responsiveness.Light">
|
|
||||||
<Keywords Operation="Add">
|
|
||||||
<Keyword Value="CompactCSwitch"/>
|
|
||||||
<Keyword Value="CSwitch"/>
|
|
||||||
<Keyword Value="DiskIO"/>
|
|
||||||
<Keyword Value="ProcessThread"/>
|
|
||||||
<Keyword Value="Loader"/>
|
|
||||||
</Keywords>
|
|
||||||
</SystemProvider>
|
|
||||||
<SystemProvider Id="SP_Responsiveness" Base="SP_Responsiveness.Light">
|
|
||||||
<Keywords Operation="Add">
|
|
||||||
<Keyword Value="HardFaults"/>
|
|
||||||
<Keyword Value="MemoryInfo"/>
|
|
||||||
<Keyword Value="ReadyThread"/>
|
|
||||||
<Keyword Value="SampledProfile"/>
|
|
||||||
<Keyword Value="Session"/>
|
|
||||||
<Keyword Value="VAMap"/>
|
|
||||||
<Keyword Value="DPC"/>
|
|
||||||
<Keyword Value="Power"/>
|
|
||||||
</Keywords>
|
|
||||||
<Stacks Operation="Add">
|
|
||||||
<Stack Value="CSwitch"/>
|
|
||||||
<Stack Value="ReadyThread"/>
|
|
||||||
<Stack Value="SampledProfile"/>
|
|
||||||
</Stacks>
|
|
||||||
</SystemProvider>
|
|
||||||
<SystemProvider Id="SP_Memory.Light" Base="SP_Responsiveness.Light" >
|
|
||||||
<Keywords Operation="Add">
|
|
||||||
<Keyword Value="Memory"/>
|
|
||||||
<Keyword Value="MemoryInfo"/>
|
|
||||||
<Keyword Value="HardFaults"/>
|
|
||||||
<Keyword Value="ReferenceSet"/>
|
|
||||||
<Keyword Value="VirtualAllocation"/>
|
|
||||||
</Keywords>
|
|
||||||
</SystemProvider>
|
|
||||||
<SystemProvider Id="SP_Memory" Base="SP_Responsiveness" >
|
|
||||||
<Keywords Operation="Add">
|
|
||||||
<Keyword Value="FootPrint"/>
|
|
||||||
<Keyword Value="Memory"/>
|
|
||||||
<Keyword Value="MemoryInfoWS"/>
|
|
||||||
<Keyword Value="ReferenceSet"/>
|
|
||||||
<Keyword Value="VirtualAllocation"/>
|
|
||||||
</Keywords>
|
|
||||||
<Stacks Operation="Add">
|
|
||||||
<Stack Value="HeapCreate" />
|
|
||||||
<Stack Value="ImageLoad" />
|
|
||||||
<Stack Value="PageAccess" />
|
|
||||||
<Stack Value="PageAccessEx" />
|
|
||||||
<Stack Value="PagefileMappedSectionCreate" />
|
|
||||||
<Stack Value="PagefileMappedSectionDelete" />
|
|
||||||
<Stack Value="PageRangeAccess" />
|
|
||||||
<Stack Value="PageRangeRelease" />
|
|
||||||
<Stack Value="PageRelease" />
|
|
||||||
<Stack Value="PageRemovedfromWorkingSet" />
|
|
||||||
<Stack Value="VirtualAllocation" />
|
|
||||||
<Stack Value="VirtualFree" />
|
|
||||||
</Stacks>
|
|
||||||
</SystemProvider>
|
|
||||||
<!-- Start - AppLaunch.wprp -->
|
|
||||||
<EventProvider Id="EP_UTC" Name="UTC" NonPagedMemory="true" Level="4" />
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsPhone-AppPlatProvider" Name="3C42000F-CC27-48C3-A005-48F6E38B131F" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_XNA" Name="CD698436-A3E3-4607-BB60-0BAC4D765B59" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_TaskHost" Name="5CBDF2A5-7290-4ACC-B8A7-9BA285BEBC39" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsPhone-Silverlight" Name="AA087E0E-0B35-4e28-8F3A-440C3F51EEF1" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Device-Health-Etw" Name="F7A8FD9F-8FFD-482f-86C0-4C19240F334C" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsMobile-Compositor" Name="85FFFBA1-CF12-402c-B9B3-29A3217BB007" Level="5">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0xfffffff" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsMobile-Splash" Name="872c8950-0def-4d5b-83f6-57dd027f88ce" Level="4">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0xfffffff" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsMobile-UIXMobile" Name="0C0FFEE0-F4B1-4F4D-B591-FB3175B13413">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0xE" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsMobile-StartMenu" Name="BECF83FD-D220-4b19-B7C1-C9127307F6B1" Level="5">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0xfffffff" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Kernel-EventTracing" Name="b675ec37-bdb6-4648-bc92-f3fdc74d3ca2" Level="5">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x50" />
|
|
||||||
</Keywords>
|
|
||||||
<CaptureStateOnSave>
|
|
||||||
<Keyword Value="0x50" />
|
|
||||||
</CaptureStateOnSave>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsPhone-MobileUI" Name="F243DC34-205E-4d34-94CA-36E8C0859787" Level="5">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0xfffffff" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Kernel-Process" Name="2839ff94-8f12-4e1b-82e3-af7af77a450f" NonPagedMemory="true" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-TestExecution" Name="Microsoft-Windows-TestExecution" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft.Windows.WinPerf" Name="BE6F04EA-3488-4543-8082-24843EAEC303" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Shell-Launcher" Name="*Microsoft-Windows-Shell-Launcher" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Immersive-Shell" Name="315A8872-923E-4EA2-9889-33CD4754BF64" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-XAML-Light" Name="531A35AB-63CE-4BCF-AA98-F88C7A89E455" Level="4" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-XAML-Verbose" Name="531A35AB-63CE-4BCF-AA98-F88C7A89E455" Level="5" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-ProcessLifetimeManager" Name="*Microsoft.Windows.ProcessLifetimeManager" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Desktop-ApplicationFrame" Name="678e492b-5de1-50c5-7219-ae4aa7d6a141" Level="5" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Microsoft-Phone-AppLifecycle" Name="f623a8ef-84da-4640-8917-fd5b0f847f28" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsPhone-CoreUIComponents" Name="a0b7550f-4e9a-4f03-ad41-b8042d06a2f7" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-AppModel-Exec" Name="EB65A492-86C0-406A-BACE-9912D595BD69" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft.Windows.ActivationManager" Name="cf7f94b3-08dc-5257-422f-497d7dc86ab3">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-WindowsMobile-ExecManLogPublisher" Name="82c8ad90-5f3c-11be-bd9a-85bb5f50dfa4" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Shell-CortanaSearch" Name="E34441D9-5BCF-4958-B787-3BF824F362D7" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Dwm-Core" Name="9e9bba3c-2e38-40cb-99f4-9e8281425164" Level="4" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x2000C"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-ImageLoad" Name="2cb15d1d-5fc1-11d2-abe1-00a0c911f518" >
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x10"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-AppLifeCycle-UI" Name="ee97cdc4-b095-5c70-6e37-a541eb74c2b5" Level="5">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x400000000000"/>
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-AppLifeCycle" Name="ef00584a-2655-462c-bc24-e7de630e7fbf">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0000000000000"/>
|
|
||||||
</Keywords>
|
|
||||||
<CaptureStateOnSave>
|
|
||||||
<Keyword Value="0x0000000000000"/>
|
|
||||||
</CaptureStateOnSave>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Kernel-Power" Name="331C3B3A-2005-44C2-AC5E-77220C37D6B4" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0xA4"/>
|
|
||||||
</Keywords>
|
|
||||||
<CaptureStateOnSave Timeout="0">
|
|
||||||
<Keyword Value="0xA4"/>
|
|
||||||
</CaptureStateOnSave>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Kernel-Processor-Power" Name="0f67e49f-fe51-4e9f-b490-6f2948cc6027" NonPagedMemory="true" EventKey="true" Level="4">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0xC2"/>
|
|
||||||
</Keywords>
|
|
||||||
<CaptureStateOnSave Timeout="0">
|
|
||||||
<Keyword Value="0xC2"/>
|
|
||||||
</CaptureStateOnSave>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Kernel-Pep" Name="5412704E-B2E1-4624-8FFD-55777B8F7373" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
<CaptureStateOnSave Timeout="0">
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</CaptureStateOnSave>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Kernel-Acpi" Name="C514638F-7723-485B-BCFC-96565D735D4A" Level="5" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
<CaptureStateOnSave>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</CaptureStateOnSave>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-UserModePowerService" Name="CE8DEE0B-D539-4000-B0F8-77BED049C590" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</Keywords>
|
|
||||||
<CaptureStateOnSave Timeout="0">
|
|
||||||
<Keyword Value="0x0"/>
|
|
||||||
</CaptureStateOnSave>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft.ClipC" Level="0" Name="ed0c10a5-5396-4a96-9ee3-6f4aa0d1120d" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x200000000000" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft.ClipSp" Level="0" Name="b4b126de-32fe-4591-9ac5-b0778d79a0e7" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x200000000000" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft.ClipSvc" Level="0" Name="b94d76c5-9d56-454a-8d1b-6ca30898160e" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x200000000000" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft.Windows.LicenseManager.Telemetry" Level="0" Name="af9f58ec-0c04-4be9-9eb5-55ff6dbe72d7" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x200000000000" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Win32k" Level="0" Name="8c416c79-d49b-4f01-a467-e56d3aa8234c" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x26A000" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<EventProvider Id="EP_Microsoft-Windows-Kernel-Prefetch" Level="0" Name="Microsoft-Windows-Kernel-Prefetch" NonPagedMemory="true" EventKey="true">
|
|
||||||
<Keywords>
|
|
||||||
<Keyword Value="0x0" />
|
|
||||||
</Keywords>
|
|
||||||
</EventProvider>
|
|
||||||
<!-- End - AppLaunch.wprp -->
|
|
||||||
<Profile Id="AppLifecycle.Responsiveness.Light.File" LoggingMode="File" Name="AppLifecycle.Responsiveness" DetailLevel="Light" Description="App lifecycle responsiveness light to file">
|
|
||||||
<Collectors>
|
|
||||||
<SystemCollectorId Value="SC_Responsiveness.LowCost.Light">
|
|
||||||
<SystemProviderId Value="SP_Responsiveness.Light" />
|
|
||||||
</SystemCollectorId>
|
|
||||||
<EventCollectorId Value="EC_Responsiveness.LowCost.Light">
|
|
||||||
<EventProviders>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-TestExecution" />
|
|
||||||
<EventProviderId Value="EP_Microsoft.Windows.WinPerf" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Immersive-Shell"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-AppLifeCycle" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Shell-Launcher" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-XAML-Light" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-AppLifeCycle-UI" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Process" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Shell-CortanaSearch"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-AppModel-Exec"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft.Windows.ActivationManager" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-EventTracing" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Desktop-ApplicationFrame" />
|
|
||||||
<EventProviderId Value="EP_XNA" />
|
|
||||||
<EventProviderId Value="EP_TaskHost" />
|
|
||||||
<EventProviderId Value="EP_Device-Health-Etw" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Microsoft-Phone-AppLifecycle"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-CoreUIComponents"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-AppPlatProvider" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-Silverlight" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-Splash" />
|
|
||||||
</EventProviders>
|
|
||||||
</EventCollectorId>
|
|
||||||
<EventCollectorId Value="EC_Responsiveness.LowCost.Light.UTC">
|
|
||||||
<EventProviders>
|
|
||||||
<EventProviderId Value="EP_UTC"/>
|
|
||||||
</EventProviders>
|
|
||||||
</EventCollectorId>
|
|
||||||
</Collectors>
|
|
||||||
</Profile>
|
|
||||||
<Profile Id="AppLifecycle.Responsiveness.Diagnostic.Verbose.File" Base="AppLifecycle.Responsiveness.Light.File" LoggingMode="File" Name="AppLifecycle.Responsiveness.Diagnostic" DetailLevel="Verbose" Description="App lifecycle responsiveness verbose to file">
|
|
||||||
<Collectors Operation="Add">
|
|
||||||
<SystemCollectorId Value="SC_Responsiveness.LowCost">
|
|
||||||
<SystemProviderId Value="SP_Responsiveness" />
|
|
||||||
</SystemCollectorId>
|
|
||||||
<EventCollectorId Value="EC_Responsiveness.LowCost">
|
|
||||||
<EventProviders>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-XAML-Verbose" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-ExecManLogPublisher"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-Compositor" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-UIXMobile" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-StartMenu" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-MobileUI" />
|
|
||||||
</EventProviders>
|
|
||||||
</EventCollectorId>
|
|
||||||
</Collectors>
|
|
||||||
</Profile>
|
|
||||||
<Profile Id="AppLifecycle.Responsiveness.Diagnostic.Verbose.Memory" Base="AppLifecycle.Responsiveness.Light.File" LoggingMode="Memory" Name="AppLifecycle.Responsiveness.Diagnostic" DetailLevel="Verbose" Description="App life cycle responsiveness verbose to memory">
|
|
||||||
<Collectors>
|
|
||||||
<SystemCollectorId Value="SC_Responsiveness.HighCost.Verbose">
|
|
||||||
<SystemProviderId Value="SP_Responsiveness"/>
|
|
||||||
</SystemCollectorId>
|
|
||||||
<EventCollectorId Value="EC_Responsiveness.HighCost.Verbose">
|
|
||||||
<EventProviders>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-ProcessLifetimeManager" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Shell-CortanaSearch"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-ExecManLogPublisher"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-Compositor" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-UIXMobile" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-StartMenu" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-MobileUI" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Power" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Processor-Power" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Pep" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Acpi" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-UserModePowerService" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Dwm-Core" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-ImageLoad" />
|
|
||||||
<EventProviderId Value="EP_Microsoft.ClipC" />
|
|
||||||
<EventProviderId Value="EP_Microsoft.ClipSp" />
|
|
||||||
<EventProviderId Value="EP_Microsoft.ClipSvc" />
|
|
||||||
<EventProviderId Value="EP_Microsoft.Windows.LicenseManager.Telemetry" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Win32k" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Prefetch" />
|
|
||||||
</EventProviders>
|
|
||||||
</EventCollectorId>
|
|
||||||
</Collectors>
|
|
||||||
</Profile>
|
|
||||||
<Profile Id="AppLifecycle.Memory.Light.File" LoggingMode="File" Name="AppLifecycle.Memory" DetailLevel="Light" Description="App lifecycle memory light to file">
|
|
||||||
<Collectors>
|
|
||||||
<SystemCollectorId Value="SC_Memory.LowCost.Light">
|
|
||||||
<SystemProviderId Value="SP_Memory.Light" />
|
|
||||||
</SystemCollectorId>
|
|
||||||
<EventCollectorId Value="EC_Memory.LowCost.Light">
|
|
||||||
<EventProviders>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-TestExecution" />
|
|
||||||
<EventProviderId Value="EP_Microsoft.Windows.WinPerf" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Immersive-Shell"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-AppModel-Exec"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft.Windows.ActivationManager" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-AppLifeCycle" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-AppLifeCycle-UI" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-EventTracing" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Desktop-ApplicationFrame" />
|
|
||||||
<EventProviderId Value="EP_XNA" />
|
|
||||||
<EventProviderId Value="EP_TaskHost" />
|
|
||||||
<EventProviderId Value="EP_Device-Health-Etw" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-ExecManLogPublisher"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Microsoft-Phone-AppLifecycle"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-CoreUIComponents"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-AppPlatProvider" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-Silverlight" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-XAML-Light" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-Splash" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Prefetch" />
|
|
||||||
</EventProviders>
|
|
||||||
</EventCollectorId>
|
|
||||||
<EventCollectorId Value="EC_Responsiveness.LowCost.Light.UTC">
|
|
||||||
<EventProviders>
|
|
||||||
<EventProviderId Value="EP_UTC"/>
|
|
||||||
</EventProviders>
|
|
||||||
</EventCollectorId>
|
|
||||||
</Collectors>
|
|
||||||
</Profile>
|
|
||||||
<Profile Id="AppLifecycle.Memory.Diagnostic.Verbose.File" Base="AppLifecycle.Memory.Light.File" LoggingMode="File" Name="AppLifecycle.Memory.Diagnostic" DetailLevel="Verbose" Description="App lifecycle memory verbose to file">
|
|
||||||
<Collectors Operation="Add">
|
|
||||||
<SystemCollectorId Value="SC_Memory.HighCost.Verbose">
|
|
||||||
<SystemProviderId Value="SP_Memory" />
|
|
||||||
</SystemCollectorId>
|
|
||||||
<EventCollectorId Value="EC_Memory.LowCost.Light">
|
|
||||||
<EventProviders>
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Shell-Launcher" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-XAML-Verbose" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Power" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Processor-Power" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Pep" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Dwm-Core" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-ImageLoad" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Kernel-Process" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-Shell-CortanaSearch"/>
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-Compositor" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-UIXMobile" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsMobile-StartMenu" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-WindowsPhone-MobileUI" />
|
|
||||||
<EventProviderId Value="EP_Microsoft-Windows-ProcessLifetimeManager" />
|
|
||||||
</EventProviders>
|
|
||||||
</EventCollectorId>
|
|
||||||
</Collectors>
|
|
||||||
</Profile>
|
|
||||||
</Profiles>
|
|
||||||
<TraceMergeProperties>
|
|
||||||
<TraceMergeProperty Id="TraceMerge_Default" Name="TraceMerge_Default" Base="">
|
|
||||||
<DeletePreMergedTraceFiles Value="true"/>
|
|
||||||
<CustomEvents>
|
|
||||||
<CustomEvent Value="ImageId"/>
|
|
||||||
<CustomEvent Value="BuildInfo"/>
|
|
||||||
<CustomEvent Value="VolumeMapping"/>
|
|
||||||
<CustomEvent Value="EventMetadata"/>
|
|
||||||
<CustomEvent Value="PerfTrackMetadata"/>
|
|
||||||
<CustomEvent Value="WinSAT"/>
|
|
||||||
<CustomEvent Value="NetworkInterface"/>
|
|
||||||
</CustomEvents>
|
|
||||||
</TraceMergeProperty>
|
|
||||||
</TraceMergeProperties>
|
|
||||||
</WindowsPerformanceRecorder>
|
|
@ -1,364 +0,0 @@
|
|||||||
<# // Copyright (c) Microsoft Corporation. All rights reserved. #>
|
|
||||||
<#@ template language="C#" hostspecific="True" #>
|
|
||||||
<#@ output extension=".xml" #>
|
|
||||||
<# // Set options specific to your app here
|
|
||||||
var options = new {
|
|
||||||
RegionPrefix = "Calculator",
|
|
||||||
ImageFileName = "Calculator.exe",
|
|
||||||
PackageFamilyName = "Microsoft.WindowsCalculator",
|
|
||||||
FirstView = "ms-resource:///Files/Views/MainPage.xbf"
|
|
||||||
};
|
|
||||||
#>
|
|
||||||
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Based on:
|
|
||||||
\base\PerfTest\MemRe\AppLifecycle\Common\Regions\Regions_Calculator.xml Regions_Calculator.xml
|
|
||||||
|
|
||||||
This is a regions of interest file that can be used by WPA to get a quick overview of the time
|
|
||||||
spent on a set of operations called "regions".
|
|
||||||
|
|
||||||
A region is defined as the combination of a Start and a Stop event.
|
|
||||||
|
|
||||||
This file contains regions that are of interest for the startup of a UWP app.
|
|
||||||
The first region "<#= options.RegionPrefix #>_AppLifecycle" is defined by the Start and Stop event of the test.
|
|
||||||
Subsequent regions are defined as children of this region to make sure we are only tracking
|
|
||||||
events that occurred during the test.
|
|
||||||
|
|
||||||
The events that are defined as Start and Stop events must come from an event provider that is enabled for the
|
|
||||||
trace that is being analyzed. For WinPerf, that means that the WPR Profile must have these providers enabled.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?Copyright (c) Microsoft Corporation. All rights reserved.?>
|
|
||||||
<InstrumentationManifest>
|
|
||||||
<Instrumentation>
|
|
||||||
<Regions>
|
|
||||||
<RegionRoot Guid="{7e8672b5-efe5-4862-90f3-944f136d6c75}"
|
|
||||||
Name="<#= options.RegionPrefix #>_AppLifeCycle Region Root"
|
|
||||||
FriendlyName="Root">
|
|
||||||
<Region Guid="{cf6c4996-1dc8-4fc5-b275-7a7051376f77}"
|
|
||||||
Name="<#= options.RegionPrefix #>_AppLifeCycle"
|
|
||||||
FriendlyName="Application Life Cycle Test">
|
|
||||||
<Start>
|
|
||||||
<!-- Microsoft-Windows-TestExecution\RunTest_TestRunScope\win:Start -->
|
|
||||||
<Event Provider="{70d27130-f2f3-4365-b790-d31223254ef4}" Name="RunTest_TestRunScope" Opcode="1"/>
|
|
||||||
<!-- Match the name of the test we are running. -->
|
|
||||||
<PayloadIdentifier FieldName="Name" FieldValue="Calculator.PerfTests.AppLifecycleTests.*" FieldValueRelationship="RegEx"/>
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Microsoft-Windows-TestExecution\RunTest_TestRunScope\win:Stop -->
|
|
||||||
<Event Provider="{70d27130-f2f3-4365-b790-d31223254ef4}" Name="RunTest_TestRunScope" Opcode="2"/>
|
|
||||||
<!-- Match the name of the test we are running. -->
|
|
||||||
<PayloadIdentifier FieldName="Name" FieldValue="Calculator.PerfTests.AppLifecycleTests.*" FieldValueRelationship="RegEx"/>
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PayloadBased NameField="Name"/>
|
|
||||||
</Naming>
|
|
||||||
<Region Guid="{b18b32ec-6796-43e1-802f-aec9aea5eb28}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_ProcessStart"
|
|
||||||
FriendlyName="Process Started">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="<#= options.PackageFamilyName #>.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{2839ff94-8f12-4e1b-82e3-af7af77a450f}" Name="ProcessStarted" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="ImageFileName" FieldValue=".*<#= options.ImageFileName #>" FieldValueRelationship="RegEx" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{b1e4255d-131c-4ea8-899d-30b7345bf7d3}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_UIThreadStart"
|
|
||||||
FriendlyName="UI Thread Started">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="<#= options.PackageFamilyName #>.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Ideally use actual thread start event, for now it's just close, using InitializeCore -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="31" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{38084b96-d955-4603-a2c7-2720195ce160}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_InitializeCore"
|
|
||||||
FriendlyName="Create XAML Core">
|
|
||||||
<Start>
|
|
||||||
<!-- Initialize Core Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="31" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Initialize Core Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="32" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{cc909ec4-17c0-4cd9-9a83-293e06e0dc72}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_CreateDevice"
|
|
||||||
FriendlyName="Create Graphics Device">
|
|
||||||
<Start>
|
|
||||||
<!-- Create Device Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="76" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Create Device Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="77" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{0ed49a01-2604-499e-8003-0878b3b3c61e}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_CreateResourceManager"
|
|
||||||
FriendlyName="Create Resource Manager">
|
|
||||||
<Start>
|
|
||||||
<!-- Create Resource Manager Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="463" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Create Resource Manager Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="464" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{365920df-10e7-4b6e-8dcb-e769844ac11f}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_CreateWindow"
|
|
||||||
FriendlyName="Create Window">
|
|
||||||
<Start>
|
|
||||||
<!-- Create Window Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="29" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Create Window Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="30" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{09995446-0266-4a34-aa39-d99467dfe85d}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_InitializeTheme"
|
|
||||||
FriendlyName="Initialize Theme Resources">
|
|
||||||
<Start>
|
|
||||||
<!-- Theme Changed Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="457" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Theme Changed Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="458" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{a2fdff0b-75c8-440d-bb55-b87a3c60d55f}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_NavToFirstFrame"
|
|
||||||
FriendlyName="XAML Navigate To First Frame Drawn">
|
|
||||||
<Start>
|
|
||||||
<!-- Parse XAML -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="1" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="URI" FieldValue="<#= options.FirstView #>" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Frame Drawn -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="65" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
<Match>
|
|
||||||
<Event PID="true"/>
|
|
||||||
</Match>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{ffc47f79-2d90-470a-bfde-0d075972f23b}"
|
|
||||||
Name="<#= options.RegionPrefix #>_ApplicationActivate"
|
|
||||||
FriendlyName="Application Activate">
|
|
||||||
<Start>
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="5901" Version="1" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="5902" Version="1" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{b0c74cf1-16fc-4a33-ba7e-2169727a08d7}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_SplashScreen"
|
|
||||||
FriendlyName="Splash Screen Dismissed">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="<#= options.PackageFamilyName #>.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- NavigationServerTask_SplashScreenDismissed -->
|
|
||||||
<Event Provider="{a0b7550f-4e9a-4f03-ad41-b8042d06a2f7}" Id="1572" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{a1648637-d5ec-46d2-9655-a26d00a35764}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_UIResponsive"
|
|
||||||
FriendlyName="UI Responsive">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="<#= options.PackageFamilyName #>.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{EF00584A-2655-462C-BC24-E7DE630E7FBF}" Name="ModernAppLaunch_UIResponsive" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{74d63c4e-7dd7-4ff6-9ee8-adb462c1c101}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Launch_VisibleComplete"
|
|
||||||
FriendlyName="Visible Complete">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="<#= options.PackageFamilyName #>.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{EF00584A-2655-462C-BC24-E7DE630E7FBF}" Name="ModernAppLaunch_VisibleComplete" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{ec31fb10-992b-438b-8c9e-42454f4b2e5a}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Suspend"
|
|
||||||
FriendlyName="Suspended">
|
|
||||||
<Start>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_SuspendApplication\win:Start -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="2450" Version="1" />
|
|
||||||
<PayloadIdentifier FieldName="PsmKey" FieldValueRelationship="RegEx" FieldValue="<#= options.PackageFamilyName #>.*" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_SuspendApplication\win:Stop -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="2451" Version="1" />
|
|
||||||
<PayloadIdentifier FieldName="AppUserModelId" FieldValue="<#= options.PackageFamilyName #>.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{83735b08-b17e-48cf-82f1-02cb08e45597}"
|
|
||||||
Name="<#= options.RegionPrefix #>_Resume"
|
|
||||||
FriendlyName="Resumed">
|
|
||||||
<Start>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_ResumeApplication_EndToEnd\win:Start -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="11118" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="PsmKey" FieldValueRelationship="RegEx" FieldValue="<#= options.PackageFamilyName #>.*" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_ResumeApplication_EndToEnd\win:Stop -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="11119" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="AppUserModelId" FieldValue="<#= options.PackageFamilyName #>.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName><#= options.ImageFileName #></WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
</Region>
|
|
||||||
</RegionRoot>
|
|
||||||
</Regions>
|
|
||||||
</Instrumentation>
|
|
||||||
</InstrumentationManifest>
|
|
@ -1,353 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Based on:
|
|
||||||
\base\PerfTest\MemRe\AppLifecycle\Common\Regions\Regions_Calculator.xml Regions_Calculator.xml
|
|
||||||
|
|
||||||
This is a regions of interest file that can be used by WPA to get a quick overview of the time
|
|
||||||
spent on a set of operations called "regions".
|
|
||||||
|
|
||||||
A region is defined as the combination of a Start and a Stop event.
|
|
||||||
|
|
||||||
This file contains regions that are of interest for the startup of a UWP app.
|
|
||||||
The first region "Calculator_AppLifecycle" is defined by the Start and Stop event of the test.
|
|
||||||
Subsequent regions are defined as children of this region to make sure we are only tracking
|
|
||||||
events that occurred during the test.
|
|
||||||
|
|
||||||
The events that are defined as Start and Stop events must come from an event provider that is enabled for the
|
|
||||||
trace that is being analyzed. For WinPerf, that means that the WPR Profile must have these providers enabled.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<?Copyright (c) Microsoft Corporation. All rights reserved.?>
|
|
||||||
<InstrumentationManifest>
|
|
||||||
<Instrumentation>
|
|
||||||
<Regions>
|
|
||||||
<RegionRoot Guid="{7e8672b5-efe5-4862-90f3-944f136d6c75}"
|
|
||||||
Name="Calculator_AppLifeCycle Region Root"
|
|
||||||
FriendlyName="Root">
|
|
||||||
<Region Guid="{cf6c4996-1dc8-4fc5-b275-7a7051376f77}"
|
|
||||||
Name="Calculator_AppLifeCycle"
|
|
||||||
FriendlyName="Application Life Cycle Test">
|
|
||||||
<Start>
|
|
||||||
<!-- Microsoft-Windows-TestExecution\TE_TestRun\win:Start -->
|
|
||||||
<Event Provider="{065903c1-4883-4fb8-b163-d02bd5efc74c}" Id="7" Version="0" />
|
|
||||||
<!-- Match the name of the test we are running. -->
|
|
||||||
<PayloadIdentifier FieldName="Name" FieldValue="Calculator.PerfTests.AppLifecycleTests.*" FieldValueRelationship="RegEx"/>
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Microsoft-Windows-TestExecution\TE_TestRun\win:Stop -->
|
|
||||||
<Event Provider="{065903c1-4883-4fb8-b163-d02bd5efc74c}" Id="8" Version="0" />
|
|
||||||
<!-- Match the name of the test we are running. -->
|
|
||||||
<PayloadIdentifier FieldName="Name" FieldValue="Calculator.PerfTests.AppLifecycleTests.*" FieldValueRelationship="RegEx"/>
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PayloadBased NameField="Name"/>
|
|
||||||
</Naming>
|
|
||||||
<Region Guid="{b18b32ec-6796-43e1-802f-aec9aea5eb28}"
|
|
||||||
Name="Calculator_Launch_ProcessStart"
|
|
||||||
FriendlyName="Process Started">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="Microsoft.WindowsCalculator.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{2839ff94-8f12-4e1b-82e3-af7af77a450f}" Name="ProcessStarted" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="ImageFileName" FieldValue=".*Calculator.exe" FieldValueRelationship="RegEx" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{b1e4255d-131c-4ea8-899d-30b7345bf7d3}"
|
|
||||||
Name="Calculator_Launch_UIThreadStart"
|
|
||||||
FriendlyName="UI Thread Started">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="Microsoft.WindowsCalculator.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Ideally use actual thread start event, for now it's just close, using InitializeCore -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="31" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{38084b96-d955-4603-a2c7-2720195ce160}"
|
|
||||||
Name="Calculator_Launch_InitializeCore"
|
|
||||||
FriendlyName="Create XAML Core">
|
|
||||||
<Start>
|
|
||||||
<!-- Initialize Core Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="31" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Initialize Core Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="32" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{cc909ec4-17c0-4cd9-9a83-293e06e0dc72}"
|
|
||||||
Name="Calculator_Launch_CreateDevice"
|
|
||||||
FriendlyName="Create Graphics Device">
|
|
||||||
<Start>
|
|
||||||
<!-- Create Device Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="76" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Create Device Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="77" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{0ed49a01-2604-499e-8003-0878b3b3c61e}"
|
|
||||||
Name="Calculator_Launch_CreateResourceManager"
|
|
||||||
FriendlyName="Create Resource Manager">
|
|
||||||
<Start>
|
|
||||||
<!-- Create Resource Manager Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="463" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Create Resource Manager Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="464" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{365920df-10e7-4b6e-8dcb-e769844ac11f}"
|
|
||||||
Name="Calculator_Launch_CreateWindow"
|
|
||||||
FriendlyName="Create Window">
|
|
||||||
<Start>
|
|
||||||
<!-- Create Window Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="29" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Create Window Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="30" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{09995446-0266-4a34-aa39-d99467dfe85d}"
|
|
||||||
Name="Calculator_Launch_InitializeTheme"
|
|
||||||
FriendlyName="Initialize Theme Resources">
|
|
||||||
<Start>
|
|
||||||
<!-- Theme Changed Start -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="457" Version="0" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Theme Changed Stop -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="458" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{a2fdff0b-75c8-440d-bb55-b87a3c60d55f}"
|
|
||||||
Name="Calculator_Launch_NavToFirstFrame"
|
|
||||||
FriendlyName="XAML Navigate To First Frame Drawn">
|
|
||||||
<Start>
|
|
||||||
<!-- Parse XAML -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="1" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="URI" FieldValue="ms-resource:///Files/Views/MainPage.xbf" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Frame Drawn -->
|
|
||||||
<Event Provider="{531A35AB-63CE-4BCF-AA98-F88C7A89E455}" Id="65" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
<Match>
|
|
||||||
<Event PID="true"/>
|
|
||||||
</Match>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{ffc47f79-2d90-470a-bfde-0d075972f23b}"
|
|
||||||
Name="Calculator_ApplicationActivate"
|
|
||||||
FriendlyName="Application Activate">
|
|
||||||
<Start>
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="5901" Version="1" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="5902" Version="1" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{b0c74cf1-16fc-4a33-ba7e-2169727a08d7}"
|
|
||||||
Name="Calculator_Launch_SplashScreen"
|
|
||||||
FriendlyName="Splash Screen Dismissed">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="Microsoft.WindowsCalculator.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- NavigationServerTask_SplashScreenDismissed -->
|
|
||||||
<Event Provider="{a0b7550f-4e9a-4f03-ad41-b8042d06a2f7}" Id="1572" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{a1648637-d5ec-46d2-9655-a26d00a35764}"
|
|
||||||
Name="Calculator_Launch_UIResponsive"
|
|
||||||
FriendlyName="UI Responsive">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="Microsoft.WindowsCalculator.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{EF00584A-2655-462C-BC24-E7DE630E7FBF}" Name="ModernAppLaunch_UIResponsive" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{74d63c4e-7dd7-4ff6-9ee8-adb462c1c101}"
|
|
||||||
Name="Calculator_Launch_VisibleComplete"
|
|
||||||
FriendlyName="Visible Complete">
|
|
||||||
<Start>
|
|
||||||
<!-- Use AAMShim_ActivationStart instead of AppLaunch_UserClick as we don't lanch from Start -->
|
|
||||||
<Event Provider="{cf7f94b3-08dc-5257-422f-497d7dc86ab3}" Name="AAMShim_ActivationStart" />
|
|
||||||
<PayloadIdentifier FieldName="AppId" FieldValue="Microsoft.WindowsCalculator.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<Event Provider="{EF00584A-2655-462C-BC24-E7DE630E7FBF}" Name="ModernAppLaunch_VisibleComplete" Version="0" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{ec31fb10-992b-438b-8c9e-42454f4b2e5a}"
|
|
||||||
Name="Calculator_Suspend"
|
|
||||||
FriendlyName="Suspended">
|
|
||||||
<Start>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_SuspendApplication\win:Start -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="2450" Version="1" />
|
|
||||||
<PayloadIdentifier FieldName="PsmKey" FieldValueRelationship="RegEx" FieldValue="Microsoft.WindowsCalculator.*" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_SuspendApplication\win:Stop -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="2451" Version="1" />
|
|
||||||
<PayloadIdentifier FieldName="AppUserModelId" FieldValue="Microsoft.WindowsCalculator.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
<Region Guid="{83735b08-b17e-48cf-82f1-02cb08e45597}"
|
|
||||||
Name="Calculator_Resume"
|
|
||||||
FriendlyName="Resumed">
|
|
||||||
<Start>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_ResumeApplication_EndToEnd\win:Start -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="11118" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="PsmKey" FieldValueRelationship="RegEx" FieldValue="Microsoft.WindowsCalculator.*" />
|
|
||||||
</Start>
|
|
||||||
<Stop>
|
|
||||||
<!-- Microsoft-Windows-Immersive-Shell\PerfTrack_PLM_ResumeApplication_EndToEnd\win:Stop -->
|
|
||||||
<Event Provider="{315a8872-923e-4ea2-9889-33cd4754bf64}" Id="11119" Version="0" />
|
|
||||||
<PayloadIdentifier FieldName="AppUserModelId" FieldValue="Microsoft.WindowsCalculator.*" FieldValueRelationship="RegEx" />
|
|
||||||
</Stop>
|
|
||||||
<Naming>
|
|
||||||
<PrependParentName />
|
|
||||||
</Naming>
|
|
||||||
<Metadata>
|
|
||||||
<WinperfWPAPreset.1>CPU</WinperfWPAPreset.1>
|
|
||||||
<WinperfWPAPreset.1.ProcessName>Calculator.exe</WinperfWPAPreset.1.ProcessName>
|
|
||||||
<WinperfWPAPreset.2>Commit</WinperfWPAPreset.2>
|
|
||||||
<WinperfWPAPreset.2.ProcessName>Calculator.exe</WinperfWPAPreset.2.ProcessName>
|
|
||||||
</Metadata>
|
|
||||||
</Region>
|
|
||||||
</Region>
|
|
||||||
</RegionRoot>
|
|
||||||
</Regions>
|
|
||||||
</Instrumentation>
|
|
||||||
</InstrumentationManifest>
|
|
@ -1,54 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using Calculator.UIAutomationLibrary;
|
|
||||||
using Microsoft.OneCoreUap.Test.AppModel;
|
|
||||||
using WEX.TestExecution;
|
|
||||||
using WEX.TestExecution.Markup;
|
|
||||||
|
|
||||||
namespace Calculator.UITests
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class Initialization
|
|
||||||
{
|
|
||||||
[DllImport("AppModel.TestHelper.dll")]
|
|
||||||
private static extern Int32 WinRTHelper_Register();
|
|
||||||
|
|
||||||
[AssemblyInitialize]
|
|
||||||
[TestProperty("CoreClrProfile", "TestNetv2.0")]
|
|
||||||
[TestProperty("RunFixtureAs:Assembly", "System")]
|
|
||||||
public static void AssemblySetup(TestContext context)
|
|
||||||
{
|
|
||||||
Verify.AreEqual(0, WinRTHelper_Register());
|
|
||||||
TestHelper.Initialize();
|
|
||||||
|
|
||||||
// Install and Start the Etw.Service service to enable the use of EtwWaiter.
|
|
||||||
EtwHelper.InstallAndStartETWService();
|
|
||||||
|
|
||||||
bool installApp = false;
|
|
||||||
if (context.Properties.Contains("InstallApp") && (bool.TryParse(context.Properties["InstallApp"].ToString(), out installApp)) && installApp)
|
|
||||||
{
|
|
||||||
string certToDeploy = Path.Combine(TAEFHelper.GetTestDeploymentDirectory(), Constants.CertificateFileName);
|
|
||||||
InstallHelper.InstallCertFile(certToDeploy);
|
|
||||||
|
|
||||||
string vcLibsToDeploy = Path.Combine(TAEFHelper.GetTestDeploymentDirectory(), Constants.VCLibsPackageFileName);
|
|
||||||
string winUIToDeploy = Path.Combine(TAEFHelper.GetTestDeploymentDirectory(), Constants.WinUIPackageFileName);
|
|
||||||
string appxToDeploy = Path.Combine(TAEFHelper.GetTestDeploymentDirectory(), Constants.PackageFileName);
|
|
||||||
Impersonater.RunAs(Impersonater.RunAsUser.RestrictedUser, () => InstallHelper.InstallPackage(appxToDeploy, vcLibsToDeploy, winUIToDeploy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[AssemblyCleanup]
|
|
||||||
[TestProperty("RunFixtureAs:Assembly", "System")]
|
|
||||||
public static void AssemblyCleanup()
|
|
||||||
{
|
|
||||||
// Stop and remove the Etw.Service service.
|
|
||||||
EtwHelper.StopAndRemoveETWService();
|
|
||||||
|
|
||||||
TestHelper.Uninitialize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("UIAutomationTests")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("f5e8f9b8-f7f1-4300-a5cb-35bfab83f51e")]
|
|
||||||
// The following was autogenerated by UpdateVersion.ps1
|
|
||||||
[assembly: AssemblyProduct(@"10.16.1128.1252")]
|
|
@ -1,51 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Linq;
|
|
||||||
using Etw.Managed;
|
|
||||||
using Microsoft.Windows.Apps.Performance;
|
|
||||||
using WEX.Logging.Interop;
|
|
||||||
using WEX.TestExecution;
|
|
||||||
using WEX.TestExecution.Markup;
|
|
||||||
using Calculator.UIAutomationLibrary;
|
|
||||||
|
|
||||||
namespace Calculator.PerfTests
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class AppLifecycleTests
|
|
||||||
{
|
|
||||||
[TestInitialize]
|
|
||||||
[TestProperty("RunAs", "ElevatedUserOrSystem")]
|
|
||||||
public void MethodSetup()
|
|
||||||
{
|
|
||||||
Utilities.KillExistingCalculatorProcesses();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCleanup]
|
|
||||||
[TestProperty("RunAs", "ElevatedUserOrSystem")]
|
|
||||||
public void MethodCleanup()
|
|
||||||
{
|
|
||||||
Utilities.KillExistingCalculatorProcesses();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// This method executes the AppLifecycle performance test.
|
|
||||||
/// The test launches the application, suspend and resumes it and then terminates the app.
|
|
||||||
///
|
|
||||||
/// A TAEF data source is used to specify the Windows Performance Recorder profile and
|
|
||||||
/// regions of interest file to use and defines three different configurations to execute this test with.
|
|
||||||
/// Cold: The initial run to get dlls loaded into memory and to execute any first-run app logic.
|
|
||||||
/// Warm: The run that will produce consistent results and that would be used for measures.
|
|
||||||
/// Memory: A run that is focused on collecting more info on allocations.
|
|
||||||
/// </summary>
|
|
||||||
[TestMethod]
|
|
||||||
[TestProperty("RunAs", "User")]
|
|
||||||
[TestProperty("Category", "Performance")]
|
|
||||||
[TestProperty(WinperfConstants.DataSource, PerfConstants.AppLifecycleIterationsSource)]
|
|
||||||
public void AppLifecycleTest()
|
|
||||||
{
|
|
||||||
AppLifecycle.Run(Constants.PackageAppUserModelId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using Calculator.UIAutomationLibrary;
|
|
||||||
using Calculator.UIAutomationLibrary.Tests;
|
|
||||||
using WEX.TestExecution.Markup;
|
|
||||||
|
|
||||||
namespace Calculator.UITests
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class CalculatorTests
|
|
||||||
{
|
|
||||||
[TestInitialize]
|
|
||||||
[TestProperty("RunAs", "ElevatedUserOrSystem")]
|
|
||||||
public void MethodSetup()
|
|
||||||
{
|
|
||||||
Utilities.KillExistingCalculatorProcesses();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCleanup]
|
|
||||||
[TestProperty("RunAs", "ElevatedUserOrSystem")]
|
|
||||||
public void MethodCleanup()
|
|
||||||
{
|
|
||||||
Utilities.KillExistingCalculatorProcesses();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
[TestProperty("RunAs", "User")]
|
|
||||||
public void OnePlusTwoTest()
|
|
||||||
{
|
|
||||||
var calculatorLfm = CalculatorAppLauncher.Launch();
|
|
||||||
|
|
||||||
calculatorLfm.CalculateOnePlusTwo();
|
|
||||||
|
|
||||||
calculatorLfm.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
[TestProperty("RunAs", "User")]
|
|
||||||
public void Sqrt4Minus2Test()
|
|
||||||
{
|
|
||||||
var calculatorLfm = CalculatorAppLauncher.Launch();
|
|
||||||
|
|
||||||
calculatorLfm.CalculateSqrt4Minus2();
|
|
||||||
|
|
||||||
calculatorLfm.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,43 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
// Licensed under the MIT License.
|
|
||||||
|
|
||||||
using MS.Internal.Mita.Foundation;
|
|
||||||
using MS.Internal.Mita.Foundation.Controls;
|
|
||||||
using MS.Internal.Mita.Foundation.Waiters;
|
|
||||||
using System;
|
|
||||||
using WEX.TestExecution;
|
|
||||||
using WEX.TestExecution.Markup;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using Microsoft.OneCoreUap.Test.AppModel;
|
|
||||||
using System.IO;
|
|
||||||
using Calculator.UITests;
|
|
||||||
using Calculator.UIAutomationLibrary;
|
|
||||||
|
|
||||||
namespace Calculator.UITests
|
|
||||||
{
|
|
||||||
[TestClass]
|
|
||||||
public class LaunchTests
|
|
||||||
{
|
|
||||||
[TestInitialize]
|
|
||||||
[TestProperty("RunAs", "ElevatedUserOrSystem")]
|
|
||||||
public void MethodSetup()
|
|
||||||
{
|
|
||||||
Utilities.KillExistingCalculatorProcesses();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCleanup]
|
|
||||||
[TestProperty("RunAs", "ElevatedUserOrSystem")]
|
|
||||||
public void MethodCleanup()
|
|
||||||
{
|
|
||||||
Utilities.KillExistingCalculatorProcesses();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
[TestProperty("RunAs", "User")]
|
|
||||||
public void NormalLaunchTest()
|
|
||||||
{
|
|
||||||
var calculatorLfm = CalculatorAppLauncher.Launch();
|
|
||||||
calculatorLfm.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"AppModel.TestHelper": "2018.3.22",
|
|
||||||
"EtwProcessor.Managed": "10.34.181220007",
|
|
||||||
"Microsoft.TestInfrastructure.UniversalTest": "1.0.20181107.1",
|
|
||||||
"Microsoft.Windows.Apps.Performance": "1.0.7",
|
|
||||||
"MITALite": "1.0.180128001",
|
|
||||||
"Taef.Managed": "10.34.181220007",
|
|
||||||
"Test.Net.Redist": "2.0.1"
|
|
||||||
},
|
|
||||||
"frameworks": {
|
|
||||||
"netcore50": {}
|
|
||||||
},
|
|
||||||
"runtimes": {
|
|
||||||
"win10-arm": {},
|
|
||||||
"win10-x64": {},
|
|
||||||
"win10-x86": {}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "http://universaltest/schema/testmddefinition-4.json",
|
|
||||||
"Package": {
|
|
||||||
"ComponentName": "Calculator",
|
|
||||||
"SubComponentName": "UITests"
|
|
||||||
},
|
|
||||||
"SupportedArchitectures": [ "All" ],
|
|
||||||
"Execution": {
|
|
||||||
"Type": "TAEF",
|
|
||||||
"Parameter": "/ScreenCaptureOnError /TestMode:EnsureLoggedOnUser",
|
|
||||||
"ExecutionTimeoutInMinutes": "30"
|
|
||||||
},
|
|
||||||
"Dependencies": {
|
|
||||||
"Files": [
|
|
||||||
{
|
|
||||||
"SourcePath": "$(OUT_DIR)Calculator.UIAutomationLibrary.dll",
|
|
||||||
"DestinationFolderPath": "$$(TEST_DEPLOY_BIN)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SourcePath": "$(OUT_DIR)Microsoft.Windows.Apps.Performance.dll",
|
|
||||||
"DestinationFolderPath": "$$(TEST_DEPLOY_BIN)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SourcePath": "$(OUT_DIR)Config\\AppLifecycle.Profile.wprp",
|
|
||||||
"DestinationFolderPath": "$$(TEST_DEPLOY_BIN)\\Config\\"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SourcePath": "$(OUT_DIR)Config\\AppLifecycle.Regions.xml",
|
|
||||||
"DestinationFolderPath": "$$(TEST_DEPLOY_BIN)\\Config\\"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"SourcePath": "$(OUT_DIR)Config\\AppLifecycle.Iterations.xml",
|
|
||||||
"DestinationFolderPath": "$$(TEST_DEPLOY_BIN)\\Config\\"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Packages": [
|
|
||||||
"Microsoft-Windows-Test-Taef",
|
|
||||||
"Microsoft-Windows-Test-EtwProcessor",
|
|
||||||
"Microsoft-Test-Taef-EnsureLoggedOnUserTestMode",
|
|
||||||
"Microsoft-Test-Taef-EtwLoggerTestMode",
|
|
||||||
"Microsoft-Windows-Test-MitaLite",
|
|
||||||
"Microsoft-Windows-Test-TestNetV2.0",
|
|
||||||
"Microsoft-OneCoreUap-Test-AppModel-AreaLibrary"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"Logs": [],
|
|
||||||
"Plugins": [],
|
|
||||||
"Profiles": [
|
|
||||||
{
|
|
||||||
"Name": "All",
|
|
||||||
"Execution": {
|
|
||||||
"AdditionalParameter": "/TestMode:EtwLogger /p:InstallApp=true /select:not(@Category='Performance')"
|
|
||||||
},
|
|
||||||
"Dependencies": {
|
|
||||||
"AdditionalPackages": [
|
|
||||||
"Microsoft-Calculator-App"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "Performance",
|
|
||||||
"Execution": {
|
|
||||||
"AdditionalParameter": "/TestMode:WinPerf /WinPerf:Upload=Full /winperf:WinPerfSource=\"Utility Apps Performance Tests\" /winperf:VersionProcess=Calculator.exe /winperf:VersionImage=Calculator.exe /p:InstallApp=true /select:@Category='Performance'"
|
|
||||||
},
|
|
||||||
"Dependencies": {
|
|
||||||
"AdditionalPackages": [
|
|
||||||
"Microsoft-Windows-Performance-Winperf-Winperf",
|
|
||||||
"Microsoft-Calculator-App"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,77 +0,0 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 15
|
|
||||||
VisualStudioVersion = 15.0.27130.2036
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calculator.UIAutomationLibrary", "Calculator.UIAutomationLibrary\Calculator.UIAutomationLibrary.csproj", "{A43517B5-8BE3-4312-913F-004978C34444}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calculator.UITests", "Calculator.UITests\Calculator.UITests.csproj", "{0224A709-0C48-4C4F-BA17-843A49842C15}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E73C8A6E-BB94-4258-ACED-7C837A6A587B}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
nuget.config = nuget.config
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Calculator.TestPackage", "Calculator.TestPackage\Calculator.TestPackage.csproj", "{24767C43-CD5A-4DC9-8D6B-429F255524E5}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|ARM = Debug|ARM
|
|
||||||
Debug|ARM64 = Debug|ARM64
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Debug|x86 = Debug|x86
|
|
||||||
Release|ARM = Release|ARM
|
|
||||||
Release|ARM64 = Release|ARM64
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
Release|x86 = Release|x86
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Debug|ARM.Build.0 = Debug|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Release|ARM.ActiveCfg = Release|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Release|ARM.Build.0 = Release|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Release|ARM64.ActiveCfg = Release|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{A43517B5-8BE3-4312-913F-004978C34444}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Debug|ARM.ActiveCfg = Debug|ARM
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Debug|ARM.Build.0 = Debug|ARM
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Release|ARM.ActiveCfg = Release|ARM
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Release|ARM.Build.0 = Release|ARM
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Release|ARM64.ActiveCfg = Release|ARM64
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Release|x64.Build.0 = Release|x64
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{0224A709-0C48-4C4F-BA17-843A49842C15}.Release|x86.Build.0 = Release|x86
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Debug|ARM.ActiveCfg = Debug|ARM
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Debug|ARM.Build.0 = Debug|ARM
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Release|ARM.ActiveCfg = Release|ARM
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Release|ARM.Build.0 = Release|ARM
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Release|ARM64.ActiveCfg = Release|ARM64
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Release|x64.Build.0 = Release|x64
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{24767C43-CD5A-4DC9-8D6B-429F255524E5}.Release|x86.Build.0 = Release|x86
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {97D9888A-CF9F-4147-8CCE-71093C057452}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1 +0,0 @@
|
|||||||
This directory contains projects that have dependencies on internal Microsoft tools and that are not necessary to build Calculator.
|
|
@ -1,39 +0,0 @@
|
|||||||
{
|
|
||||||
"AttributesTolerance": 2,
|
|
||||||
"KeepFirstAttributeOnSameLine": true,
|
|
||||||
"MaxAttributeCharatersPerLine": 0,
|
|
||||||
"MaxAttributesPerLine": 1,
|
|
||||||
"NewlineExemptionElements": "RadialGradientBrush, GradientStop, LinearGradientBrush, ScaleTransfom, SkewTransform, RotateTransform, TranslateTransform, Trigger, Condition, Setter",
|
|
||||||
"SeparateByGroups": false,
|
|
||||||
"EnableAttributeReordering": true,
|
|
||||||
"AttributeOrderingRuleGroups": [
|
|
||||||
"x:Class*",
|
|
||||||
"xmlns, xmlns:x",
|
|
||||||
"xmlns:*",
|
|
||||||
"x:Key, Key, x:Name, Name, x:Uid, Uid, Title",
|
|
||||||
"Grid.Row, Grid.RowSpan, Grid.Column, Grid.ColumnSpan, Canvas.Left, Canvas.Top, Canvas.Right, Canvas.Bottom",
|
|
||||||
"Width, Height, MinWidth, MinHeight, MaxWidth, MaxHeight",
|
|
||||||
"Margin, Padding, HorizontalAlignment, VerticalAlignment, HorizontalContentAlignment, VerticalContentAlignment, Panel.ZIndex",
|
|
||||||
"Style, Background, Foreground, Fill, BorderBrush, BorderThickness, Stroke, StrokeThickness, Opacity",
|
|
||||||
"FontFamily, FontSize, LineHeight, FontWeight, FontStyle, FontStretch",
|
|
||||||
"*:*, *",
|
|
||||||
"PageSource, PageIndex, Offset, Color, TargetName, Property, Value, StartPoint, EndPoint",
|
|
||||||
"mc:Ignorable, d:IsDataSource, d:LayoutOverrides, d:IsStaticText"
|
|
||||||
],
|
|
||||||
"OrderAttributesByName": true,
|
|
||||||
"PutEndingBracketOnNewLine": false,
|
|
||||||
"RemoveEndingTagOfEmptyElement": true,
|
|
||||||
"SpaceBeforeClosingSlash": false,
|
|
||||||
"RootElementLineBreakRule": 0,
|
|
||||||
"ReorderVSM": 1,
|
|
||||||
"ReorderGridChildren": false,
|
|
||||||
"ReorderCanvasChildren": false,
|
|
||||||
"ReorderSetters": 0,
|
|
||||||
"FormatMarkupExtension": true,
|
|
||||||
"NoNewLineMarkupExtensions": "x:Bind, Binding",
|
|
||||||
"ThicknessSeparator": 2,
|
|
||||||
"ThicknessAttributes": "Margin, Padding, BorderThickness, ThumbnailClipMargin",
|
|
||||||
"FormatOnSave": true,
|
|
||||||
"CommentPadding": 1,
|
|
||||||
"IndentSize": 4
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<solution>
|
|
||||||
<add key="disableSourceControlIntegration" value="true" />
|
|
||||||
</solution>
|
|
||||||
<packageSources>
|
|
||||||
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
|
|
||||||
<add key="MitaLite" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/MitaLite/nuget/v3/index.json" />
|
|
||||||
<add key="Taef" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/Taef/nuget/v3/index.json" />
|
|
||||||
<add key="Test.Net" value="https://microsoft.pkgs.visualstudio.com/DefaultCollection/_packaging/Test.Net/nuget/v3/index.json" />
|
|
||||||
<add key="AppModel.TestHelper" value="https://microsoft.pkgs.visualstudio.com/_packaging/AppModel.TestHelper/nuget/v3/index.json" />
|
|
||||||
<add key="WindowsApps" value="https://microsoft.pkgs.visualstudio.com/_packaging/WindowsApps/nuget/v3/index.json" />
|
|
||||||
<add key="WindowsES-External" value="https://microsoft.pkgs.visualstudio.com/_packaging/WindowsES-External/nuget/v3/index.json" />
|
|
||||||
<add key="EEApps" value="https://eeapps.blob.core.windows.net/eeapps/index.json" />
|
|
||||||
</packageSources>
|
|
||||||
<config>
|
|
||||||
<add key="dependencyversion" value="Highest" />
|
|
||||||
</config>
|
|
||||||
</configuration>
|
|
Loading…
Reference in New Issue
Block a user