-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the full TCP mode in the visual runner (#26)
* Added a TCP result channel * ResultChannels are now services Channels will also need access for services, so they are now in the collection. Access is now through the singleton manager to avoid duplicate openings or premature closings.
- Loading branch information
1 parent
710047c
commit b752406
Showing
42 changed files
with
594 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
name: XHarness Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ main, 'releases/**' ] | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
|
||
ios: | ||
name: iOS | ||
runs-on: macos-13 | ||
env: | ||
TEST_TARGET_FRAMEWORK: net8.0-ios | ||
TEST_RUNTIME_IDENTIFIER: iossimulator-x64 | ||
TEST_CONFIGURATION: Debug | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Required Tools | ||
uses: ./.github/workflows/setup-tools | ||
- name: Publish App | ||
run: | | ||
dotnet build sample/SampleMauiApp/SampleMauiApp.csproj \ | ||
-f ${{ env.TEST_TARGET_FRAMEWORK }} \ | ||
-r ${{ env.TEST_RUNTIME_IDENTIFIER }} \ | ||
-c ${{ env.TEST_CONFIGURATION }} \ | ||
-p:TestingMode=XHarness \ | ||
/bl:./artifacts/logs/msbuild-publish.binlog | ||
- name: Run Tests | ||
run: | | ||
for i in $(seq 1 2) | ||
do | ||
dotnet xharness apple test \ | ||
--target ios-simulator-64 \ | ||
--timeout="00:02:00" \ | ||
--launch-timeout=00:06:00 \ | ||
--app sample/SampleMauiApp/bin/${{ env.TEST_CONFIGURATION }}/${{ env.TEST_TARGET_FRAMEWORK }}/${{ env.TEST_RUNTIME_IDENTIFIER }}/SampleMauiApp.app \ | ||
--output-directory artifacts \ | ||
&& code=0 && break || code=$? && sleep 15 | ||
done | ||
exit $code | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v1 | ||
if: ${{ always() }} | ||
with: | ||
name: Test Results - iOS | ||
path: ./artifacts | ||
|
||
|
||
maccatalyst: | ||
name: Mac Catalyst | ||
runs-on: macos-13 | ||
env: | ||
TEST_TARGET_FRAMEWORK: net8.0-maccatalyst | ||
TEST_RUNTIME_IDENTIFIER: maccatalyst-x64 | ||
TEST_CONFIGURATION: Debug | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Required Tools | ||
uses: ./.github/workflows/setup-tools | ||
- name: Publish App | ||
run: | | ||
dotnet build sample/SampleMauiApp/SampleMauiApp.csproj \ | ||
-f ${{ env.TEST_TARGET_FRAMEWORK }} \ | ||
-r ${{ env.TEST_RUNTIME_IDENTIFIER }} \ | ||
-c ${{ env.TEST_CONFIGURATION }} \ | ||
-p:TestingMode=XHarness \ | ||
/bl:./artifacts/logs/msbuild-publish.binlog | ||
- name: Run Tests | ||
run: | | ||
dotnet xharness apple test \ | ||
--target maccatalyst \ | ||
--timeout="00:02:00" \ | ||
--launch-timeout=00:06:00 \ | ||
--app sample/SampleMauiApp/bin/${{ env.TEST_CONFIGURATION }}/${{ env.TEST_TARGET_FRAMEWORK }}/${{ env.TEST_RUNTIME_IDENTIFIER }}/SampleMauiApp.app \ | ||
--output-directory artifacts | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v1 | ||
if: ${{ always() }} | ||
with: | ||
name: Test Results - Mac Catalyst | ||
path: ./artifacts | ||
|
||
|
||
windows: | ||
name: Windows | ||
runs-on: windows-latest | ||
env: | ||
TEST_TARGET_FRAMEWORK: net8.0-windows10.0.19041.0 | ||
TEST_RUNTIME_IDENTIFIER: win10-x64 | ||
TEST_CONFIGURATION: Release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Required Tools | ||
uses: ./.github/workflows/setup-tools | ||
- name: Publish App | ||
run: | | ||
$fingerprint = ./scripts/New-Certificate.ps1 -Project sample/SampleMauiApp/SampleMauiApp.csproj | ||
dotnet publish sample/SampleMauiApp/SampleMauiApp.csproj ` | ||
-f ${{ env.TEST_TARGET_FRAMEWORK }} ` | ||
-c ${{ env.TEST_CONFIGURATION }} ` | ||
-p:TestingMode=XHarness ` | ||
-p:AppxPackageSigningEnabled=true ` | ||
-p:PackageCertificateThumbprint=$fingerprint ` | ||
-p:PackageCertificateKeyFile="" ` | ||
/bl:./artifacts/logs/msbuild-publish.binlog | ||
./scripts/Remove-Certificate.ps1 -CertificateFingerprint $fingerprint | ||
- name: Run Tests | ||
run: | | ||
$msix = Get-ChildItem "sample/SampleMauiApp/bin/${{ env.TEST_CONFIGURATION }}/${{ env.TEST_TARGET_FRAMEWORK }}/${{ env.TEST_RUNTIME_IDENTIFIER }}/AppPackages/*_Test/*.msix" | ||
./scripts/Start-Tests.ps1 ` | ||
-App $msix ` | ||
-OutputDirectory artifacts ` | ||
-TestingMode XHarness | ||
shell: powershell | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v1 | ||
if: ${{ always() }} | ||
with: | ||
name: Test Results - Windows | ||
path: ./artifacts | ||
|
||
|
||
# android: | ||
# name: Android | ||
# runs-on: macos-13 | ||
# env: | ||
# TEST_TARGET_FRAMEWORK: net8.0-android | ||
# TEST_RUNTIME_IDENTIFIER: android-x64 | ||
# TEST_CONFIGURATION: Release | ||
# TEST_EMULATOR_IMAGE: system-images;android-34;google_apis;x86_64 | ||
# TEST_EMULATOR_DEVICE: pixel_5 | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v2 | ||
# - name: Setup Required Tools | ||
# uses: ./.github/workflows/setup-tools | ||
# - name: Install Emulator Image | ||
# run: dotnet android sdk install --package "${{ env.TEST_EMULATOR_IMAGE }}" | ||
# - name: Create the Emulator | ||
# run: dotnet android avd create --name TestRunnerEmulator --sdk "${{ env.TEST_EMULATOR_IMAGE }}" --device "${{ env.TEST_EMULATOR_DEVICE }}" | ||
# - name: Boot the Emulator | ||
# run: dotnet android avd start --name TestRunnerEmulator --wait-boot | ||
# - name: Publish App | ||
# run: | | ||
# dotnet publish sample/SampleMauiApp/SampleMauiApp.csproj \ | ||
# -f ${{ env.TEST_TARGET_FRAMEWORK }} \ | ||
# -r ${{ env.TEST_RUNTIME_IDENTIFIER }} \ | ||
# -c ${{ env.TEST_CONFIGURATION }} \ | ||
# -p:TestingMode=XHarness \ | ||
# /bl:./artifacts/logs/msbuild-publish.binlog | ||
# - name: Run Tests | ||
# run: | | ||
# xharness android test \ | ||
# --package-name com.companyname.samplemauiapp \ | ||
# --instrumentation devicerunners.xharness.maui.XHarnessInstrumentation \ | ||
# --app sample/SampleMauiApp/bin/${{ env.TEST_CONFIGURATION }}/${{ env.TEST_TARGET_FRAMEWORK }}/${{ env.TEST_RUNTIME_IDENTIFIER }}/publish/com.companyname.samplemauiapp-Signed.apk | ||
# --output-directory artifacts | ||
# - name: Shutdown the Emulator | ||
# run: dotnet xharness android adb -- emu kill | ||
# - name: Upload Artifacts | ||
# uses: actions/upload-artifact@v1 | ||
# if: ${{ always() }} | ||
# with: | ||
# name: Test Results - Android | ||
# path: ./artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.