Skip to content

Commit

Permalink
Tests on pipeline (#10244)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykhailopylyp committed Mar 16, 2021
1 parent 0413fe9 commit 1d2aeaf
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 30 deletions.
39 changes: 26 additions & 13 deletions .pipelines/ci/templates/build-powertoys-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,40 +93,52 @@ steps:
msbuildArgs: ${{ parameters.additionalBuildArguments }}
maximumCpuCount: true


# directly not doing WinAppDriver testing
- task: VSTest@2
displayName: 'Run .Net Core Tests 1'
displayName: 'MS Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\Microsoft.Plugin.Folder.UnitTest.dll
**\Microsoft.Plugin.Program.UnitTests.dll
**\Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest.dll
**\Microsoft.Plugin.Uri.UnitTests.dll
**\Wox.Test.dll
**\UnitTests-SvgThumbnailProvider.dll
**\Microsoft.PowerToys.Settings.UI.UnitTests.dll
**\UnitTests-SvgPreviewHandler.dll
**\UnitTests-PreviewHandlerCommon.dll
**\PreviewPaneUnitTests.dll
**\Microsoft.PowerToys.Run.Plugin.Registry.UnitTests.dll
**\UnitTest-ColorPickerUI.dll
**\Microsoft.Interop.Tests.dll
!**\obj\**
- task: VSTest@2
displayName: 'Run .Net Core Tests 2'
displayName: 'XUnit Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\PreviewPaneUnitTests.dll #this is the markdown tests
**\UnitTests-PreviewHandlerCommon.dll
**\UnitTests-SvgPreviewHandler.dll
**\ImageResizer.Test.dll
**\powerpreviewTest.dll
!**\obj\**
- task: VSTest@2
displayName: 'NUnit Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\Microsoft.Plugin.Folder.UnitTests.dll
**\Microsoft.Plugin.Program.UnitTests.dll
**\Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest.dll
**\Microsoft.Plugin.Uri.UnitTests.dll
**\Wox.Test.dll
**\Microsoft.PowerToys.Run.Plugin.System.UnitTests.dll
!**\obj\**
# Native dlls
- task: VSTest@2
displayName: 'Run Native Tests'
displayName: 'Native Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
Expand All @@ -135,4 +147,5 @@ steps:
**\KeyboardManagerTest.dll
**\UnitTests-CommonLib.dll
**\PowerRenameUnitTests.dll
**\powerpreviewTest.dll
!**\obj\**
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

namespace Microsoft.PowerToys.Run.Plugin.System.UnitTests
{
[TestFixture]
public class ImageTests
{
[SetUp]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\common\PreviewHandlerCommon.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
</ItemGroup>
<ItemGroup>
<Compile Update="WebBrowserExtUnitTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void SvgPreviewControlShouldSetScriptErrorsSuppressedPropertyWhenDoPrevie
}
}

[TestMethod]
// ToDo: fix unit test
public void SvgPreviewControlShouldSetScrollBarsEnabledPropertyWhenDoPreviewCalled()
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Moq" Version="4.14.7" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Moq" Version="4.14.7" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Moq" Version="4.14.7" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.2" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 1d2aeaf

Please sign in to comment.