Browse Source
Merge pull request #9407 from AvaloniaUI/fix-integration-tests-net7
use net 7 for integration tests
pull/9409/head
Dan Walmsley
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
9 additions and
9 deletions
-
azure-pipelines-integrationtests.yml
-
samples/IntegrationTestApp/IntegrationTestApp.csproj
-
tests/Avalonia.IntegrationTests.Appium/TestAppFixture.cs
-
tests/Avalonia.IntegrationTests.Appium/macos-clean-build-test.sh
-
tests/Avalonia.IntegrationTests.Appium/readme.md
|
|
|
@ -18,9 +18,9 @@ jobs: |
|
|
|
version: 6.0.401 |
|
|
|
|
|
|
|
- task: UseDotNet@2 |
|
|
|
displayName: 'Use .NET Core SDK 7.0.100-rc.2.22477.23' |
|
|
|
displayName: 'Use .NET Core SDK 7.0.100' |
|
|
|
inputs: |
|
|
|
version: 7.0.100-rc.2.22477.23 |
|
|
|
version: 7.0.100 |
|
|
|
|
|
|
|
- script: system_profiler SPDisplaysDataType |grep Resolution |
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ jobs: |
|
|
|
rm -rf $(osascript -e "POSIX path of (path to application id \"net.avaloniaui.avalonia.integrationtestapp\")") |
|
|
|
pkill IntegrationTestApp |
|
|
|
./samples/IntegrationTestApp/bundle.sh |
|
|
|
open -n ./samples/IntegrationTestApp/bin/Debug/net6.0/osx-arm64/publish/IntegrationTestApp.app |
|
|
|
open -n ./samples/IntegrationTestApp/bin/Debug/net7.0/osx-arm64/publish/IntegrationTestApp.app |
|
|
|
pkill IntegrationTestApp |
|
|
|
|
|
|
|
- task: DotNetCoreCLI@2 |
|
|
|
@ -56,9 +56,9 @@ jobs: |
|
|
|
version: 6.0.401 |
|
|
|
|
|
|
|
- task: UseDotNet@2 |
|
|
|
displayName: 'Use .NET Core SDK 7.0.100-rc.2.22477.23' |
|
|
|
displayName: 'Use .NET Core SDK 7.0.100' |
|
|
|
inputs: |
|
|
|
version: 7.0.100-rc.2.22477.23 |
|
|
|
version: 7.0.100 |
|
|
|
|
|
|
|
- task: Windows Application Driver@0 |
|
|
|
inputs: |
|
|
|
|
|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<Project Sdk="Microsoft.NET.Sdk"> |
|
|
|
<PropertyGroup> |
|
|
|
<OutputType>WinExe</OutputType> |
|
|
|
<TargetFramework>net6.0</TargetFramework> |
|
|
|
<TargetFramework>net7.0</TargetFramework> |
|
|
|
<Nullable>enable</Nullable> |
|
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -11,7 +11,7 @@ namespace Avalonia.IntegrationTests.Appium |
|
|
|
{ |
|
|
|
public class TestAppFixture : IDisposable |
|
|
|
{ |
|
|
|
private const string TestAppPath = @"..\..\..\..\..\samples\IntegrationTestApp\bin\Debug\net6.0\IntegrationTestApp.exe"; |
|
|
|
private const string TestAppPath = @"..\..\..\..\..\samples\IntegrationTestApp\bin\Debug\net7.0\IntegrationTestApp.exe"; |
|
|
|
private const string TestAppBundleId = "net.avaloniaui.avalonia.integrationtestapp"; |
|
|
|
|
|
|
|
public TestAppFixture() |
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ pkill IntegrationTestApp |
|
|
|
rm -rf $(osascript -e "POSIX path of (path to application id \"net.avaloniaui.avalonia.integrationtestapp\")") |
|
|
|
pkill IntegrationTestApp |
|
|
|
./samples/IntegrationTestApp/bundle.sh |
|
|
|
open -n ./samples/IntegrationTestApp/bin/Debug/net6.0/osx-arm64/publish/IntegrationTestApp.app |
|
|
|
open -n ./samples/IntegrationTestApp/bin/Debug/net7.0/osx-arm64/publish/IntegrationTestApp.app |
|
|
|
pkill IntegrationTestApp |
|
|
|
open -b net.avaloniaui.avalonia.integrationtestapp |
|
|
|
dotnet test tests/Avalonia.IntegrationTests.Appium/ -l "console;verbosity=detailed" |
|
|
|
|
|
|
|
@ -18,7 +18,7 @@ |
|
|
|
- Install Appium: https://appium.io/ |
|
|
|
- Give [Xcode helper the required permissions](https://apple.stackexchange.com/questions/334008) |
|
|
|
- `cd samples/IntegrationTestApp` then `./bundle.sh` to create an app bundle for `IntegrationTestApp` |
|
|
|
- Register the app bundle by running `open -n ./bin/Debug/net6.0/osx-arm64/publish/IntegrationTestApp.app` |
|
|
|
- Register the app bundle by running `open -n ./bin/Debug/net7.0/osx-arm64/publish/IntegrationTestApp.app` |
|
|
|
|
|
|
|
### Running |
|
|
|
|
|
|
|
|