Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing] Run tests on device #17808

Merged
merged 15 commits into from Nov 28, 2023
Merged

[testing] Run tests on device #17808

merged 15 commits into from Nov 28, 2023

Conversation

rmarinho
Copy link
Member

@rmarinho rmarinho commented Oct 3, 2023

Description of Change

Updates iOS cake to handle run device and uitests on real devices. Android runs devices tests on device but doesn't look for the correct device yet.

Real dumb look using xharness to get the attached devices . I did try something like xharness apple device ios-device but that only returns 1 attached device? I can pass --device=iHomePad and get UDID but I don't know the name of devices in the 1st place.

Use --device as ios-device and specify what version to run on with --apiversion it will just match major version of the attached devices.

The signing part is tricky and still trying to figure out the best way to do it. the Appium driver app runs needs to also be installed and for that expects a wildcard profile and cert with default name on the default keychain. Provisionator creates its own keychain.

UItests

dotnet cake -Script eng/devices/ios.cake --target=uitest --device=ios-device --apiversion="16.5" --workloads=global

Device tests

 dotnet cake -script eng/devices/ios.cake --project="/Users/ruimarinho/repos/dotnet/maui/src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj" --device=ios-device --apiversion="16.5" --workloads=global
dotnet cake -script eng/devices/android.cake --project="/Users/ruimarinho/repos/dotnet/maui/src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj" --device=android-device-64 --workloads=global

@jsuarezruiz jsuarezruiz added the area/testing Unit tests, device tests label Oct 4, 2023
@rmarinho rmarinho marked this pull request as ready for review October 10, 2023 18:08
@rmarinho rmarinho requested a review from a team as a code owner October 10, 2023 18:08
@rmarinho
Copy link
Member Author

rmarinho commented Nov 6, 2023

/rebase

# Conflicts:
#	eng/devices/devices-shared.cake
#	eng/devices/ios.cake
#	src/Controls/tests/UITests/UITest.cs
@jfversluis
Copy link
Member

@rmarinho is this still needed? I think I see some things that have already been updated through other PRs as well?

@rmarinho
Copy link
Member Author

rmarinho commented Nov 9, 2023

Yes there are still stuff here I didn't pulled in. Some stuff I put in other PRs..

@rmarinho rmarinho merged commit 73d2142 into main Nov 28, 2023
47 checks passed
@rmarinho rmarinho deleted the run-on-device branch November 28, 2023 13:21
@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/testing Unit tests, device tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants