mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Add an ADO yaml file for integration tests (#1035)
* enable code coverage for ADO test run * fix debugtype default * use file name instead of guid * use wildcard for test dll name
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.0.52" />
|
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.0.52" />
|
||||||
|
<!-- Need full debugtype for code coverage -->
|
||||||
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
52
azure-pipelines/integrationtests.yml
Normal file
52
azure-pipelines/integrationtests.yml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
pool:
|
||||||
|
name: SqlToolsTestAgentPool
|
||||||
|
steps:
|
||||||
|
- task: DownloadSecureFile@1
|
||||||
|
displayName: 'Download secure file'
|
||||||
|
inputs:
|
||||||
|
secureFile: 'testsettings.json'
|
||||||
|
|
||||||
|
- task: VisualStudioTestPlatformInstaller@1
|
||||||
|
displayName: 'Visual Studio Test Platform Installer'
|
||||||
|
inputs:
|
||||||
|
versionSelector: latestStable
|
||||||
|
|
||||||
|
- task: UseDotNet@2
|
||||||
|
displayName: 'Use .NET Core sdk '
|
||||||
|
inputs:
|
||||||
|
useGlobalJson: true
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: 'dotnet build'
|
||||||
|
inputs:
|
||||||
|
projects: '**/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj'
|
||||||
|
|
||||||
|
- task: CopyFiles@2
|
||||||
|
displayName: 'Copy testsettings file to bin'
|
||||||
|
inputs:
|
||||||
|
SourceFolder: '$(Agent.TempDirectory)'
|
||||||
|
Contents: '**\testsettings.json'
|
||||||
|
TargetFolder: '$(Build.SourcesDirectory)\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\bin\Debug\netcoreapp3.1'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: 'Run integration tests'
|
||||||
|
inputs:
|
||||||
|
command: test
|
||||||
|
projects: '**/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj'
|
||||||
|
arguments: '--no-build'
|
||||||
|
testRunTitle: 'SqlToolsService Integration Tests'
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
- task: VSTest@2
|
||||||
|
displayName: 'Run integration tests with code coverage'
|
||||||
|
inputs:
|
||||||
|
testAssemblyVer2: '**/bin/Debug/**/Microsoft.SqlTools.ServiceLayer.IntegrationTests.dll'
|
||||||
|
vsTestVersion: toolsInstaller
|
||||||
|
runSettingsFile: 'azure-pipelines/testrun.runsettings'
|
||||||
|
codeCoverageEnabled: true
|
||||||
|
testRunTitle: 'SqlToolsService Integration Tests'
|
||||||
|
rerunFailedTests: true
|
||||||
|
rerunFailedThreshold: 15
|
||||||
|
rerunMaxAttempts: 1
|
||||||
|
continueOnError: true
|
||||||
|
|
||||||
@@ -6,11 +6,19 @@
|
|||||||
<CodeCoverage>
|
<CodeCoverage>
|
||||||
<ModulePaths>
|
<ModulePaths>
|
||||||
<Include>
|
<Include>
|
||||||
<ModulePath>Microsoft\.SqlTools.*\.dll$</ModulePath>
|
<ModulePath>.*SqlTools.*</ModulePath>
|
||||||
<ModulePath>Microsoft\.SqlTools.*\.exe$</ModulePath>
|
|
||||||
</Include>
|
</Include>
|
||||||
<Exclude>
|
<Exclude>
|
||||||
<ModulePath>Microsoft\.SqlTools\.ServiceLayer\.IntegrationTests\.dll</ModulePath>
|
<ModulePath>.*Microsoft\.SqlTools\.ServiceLayer\.IntegrationTests\.dll</ModulePath>
|
||||||
|
<ModulePath>.*Microsoft\.SqlTools\.ServiceLayer\.UnitTests\.dll</ModulePath>
|
||||||
|
<ModulePath>.*Nunit.*</ModulePath>
|
||||||
|
<ModulePath>.*Moq.*</ModulePath>
|
||||||
|
<ModulePath>.*Microsoft\.SqlTools\.Hosting\.UnitTests\.dll</ModulePath>
|
||||||
|
<ModulePath>.*Microsoft\.SqlTools\.ManagedBatchParser\.IntegrationTests\.dll</ModulePath>
|
||||||
|
<ModulePath>.*Microsoft\.SqlTools\.ServiceLayer\.PerfTests\.dll</ModulePath>
|
||||||
|
<ModulePath>.*Microsoft\.SqlTools\.ServiceLayer\.Test.Common\.dll</ModulePath>
|
||||||
|
<ModulePath>.*Microsoft\.SqlTools\.ServiceLayer\.TestDriver.*</ModulePath>
|
||||||
|
<ModulePath>.*Microsoft\.SqlTools\.ServiceLayer\.TestDriver.Tests\.dll</ModulePath>
|
||||||
</Exclude>
|
</Exclude>
|
||||||
</ModulePaths>
|
</ModulePaths>
|
||||||
<UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
|
<UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
|
||||||
|
|||||||
@@ -21,7 +21,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CredentialsTargetFramework>netcoreapp3.1</CredentialsTargetFramework>
|
<CredentialsTargetFramework>netcoreapp3.1</CredentialsTargetFramework>
|
||||||
<ServiceLayerTargetFramework>netcoreapp3.1</ServiceLayerTargetFramework>
|
<ServiceLayerTargetFramework>netcoreapp3.1</ServiceLayerTargetFramework>
|
||||||
<ResourceProivderTargetFramework>netcoreapp3.1</ResourceProivderTargetFramework>
|
<ResourceProviderTargetFramework>netcoreapp3.1</ResourceProviderTargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
|
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<DebugType>portable</DebugType>
|
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64</RuntimeIdentifiers>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
<DefineConstants>$(DefineConstants);NETCOREAPP1_0;TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);NETCOREAPP1_0;TRACE</DefineConstants>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<DebugType>portable</DebugType>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||||
<DebugType>portable</DebugType>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Localization\transXliff\" />
|
<Folder Include="Localization\transXliff\" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>$(ResourceProivderTargetFramework)</TargetFramework>
|
<TargetFramework>$(ResourceProviderTargetFramework)</TargetFramework>
|
||||||
<PackageId>SqlToolsResourceProviderService</PackageId>
|
<PackageId>SqlToolsResourceProviderService</PackageId>
|
||||||
<AssemblyName>SqlToolsResourceProviderService</AssemblyName>
|
<AssemblyName>SqlToolsResourceProviderService</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
<Copyright><EFBFBD> Microsoft Corporation. All rights reserved.</Copyright>
|
<Copyright><EFBFBD> Microsoft Corporation. All rights reserved.</Copyright>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<DebugType>portable</DebugType>
|
|
||||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64</RuntimeIdentifiers>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
<DefineConstants>$(DefineConstants);NETCOREAPP1_0;TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);NETCOREAPP1_0;TRACE</DefineConstants>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<DebugType>portable</DebugType>
|
|
||||||
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64</RuntimeIdentifiers>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user