Repository navigation
Conversation
…m#1160) * test: add local HTTP mock server for client-side command tests * test: tighten mock server routing and W3C capability assertions * test: replace HttpListener with loopback TcpListener in MockAppiumServer * test: assert disjoint W3C capability sets and close active clients on disposal * test: use WireMock.Net in MockAppiumServer * test: use JsonPartialMatcher in MockAppiumServer and remove unused ClearRecordedRequests
--- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.12.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ppium#1149) * test(android): cover AndroidCommandExecutionHelper.OpenNotifications Verifies OpenNotifications issues a single ExecuteScript command for mobile:openNotifications with an empty args array. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: extract FakeExecuteMethod into shared test helpers Move the IExecuteMethod fake out of AndroidCommandExecutionHelperTests into test/integration/helpers so other command-helper tests can reuse it. It now records every executed command in order instead of only the last one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ppium#1143) SimpleTouchActionTestCase and TouchByCoordinatesTestCase fail intermittently on CI with StaleElementReferenceException: ActivateApp can return while the ApiDemos list is still being redrawn, so the TextViews found right after it are replaced before the actions run. - Add PerformOnTextViews, which finds the TextViews again and retries the actions (up to 3 attempts) when they go stale. - Share the wait for the TextView count to change between both tests; TouchByCoordinatesTestCase used a fixed Thread.Sleep(1000) instead. - Pass a 5-second timeout to TerminateApp in TearDown so tearing down ApiDemos under emulator load does not fail on the default 500ms timeout.
The helper introduced in appium#1103 passed its argument straight to Enumerable.ToList when the collection was neither a ReadOnlyCollection nor an IList, so a finder returning null surfaced an ArgumentNullException naming LINQ's internal "source" parameter instead of the helper's own argument. Validate the argument up front so the exception points at "collection". Extends MobileByFactoryTest with the null case and the List-to- ReadOnlyCollection conversion; the ReadOnlyCollection pass-through is already covered by TizenAutomationDelegatesToMatchingFinder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXt9AdcyCrYRXRAAZpgWBx
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟡 Changes recommended
Changing SessionId after construction leaves the new-session response and DELETE route using the old ID while script routes use the new ID, causing script requests to return 404.
1 open issue
What changed in this PR
This PR adds device-free HTTP testing for the Appium .NET client using WireMock.Net, alongside targeted functional-test reliability improvements.
Changes:
- Add a local mock server and tests for session creation, command routing, serialization, and responses.
- Expand command-helper and collection tests, with explicit null validation.
- Improve Android test synchronization and configure iOS tests to use the selected simulator.
| File | Description |
|---|---|
test/integration/helpers/MockAppiumServer.cs |
Add a WireMock-backed server with request recording and response stubs. |
test/integration/helpers/FakeExecuteMethod.cs |
Add a command-recording fake for device-free tests. |
test/integration/helpers/Caps.cs |
Support simulator selection through IOS_UDID. |
test/integration/helpers/AppsTest.cs |
Test inclusion and omission of the iOS UDID capability. |
test/integration/Driver/MockServerClientTests.cs |
Verify client HTTP requests and response handling. |
test/integration/Common/MobileByFactoryTest.cs |
Test collection wrapping and null handling. |
test/integration/Appium.Net.Integration.Tests.csproj |
Add WireMock.Net and update the test SDK. |
test/integration/Android/Device/Keys/KeyboardTests.cs |
Wait for keyboard visibility before testing keyboard commands. |
test/integration/Android/AndroidCommandExecutionHelperTests.cs |
Verify notification command names and arguments. |
test/integration/Android/ActionsChainsTest.cs |
Retry stale elements and replace a fixed sleep with polling. |
src/Appium.Net/Appium/ReadOnlyCollectionExtensions.cs |
Explicitly reject null collections. |
.github/workflows/functional-test.yml |
Install WebDriverAgent and pass the selected simulator UDID to tests. |
Review effort: Balanced
| private readonly WireMockServer _server; | ||
| private bool _disposed; | ||
|
|
||
| public string SessionId { get; set; } = "mock-session-id"; |
|
Closing: this PR targets this fork's The only new commit is The branch is kept for that PR. Generated by Claude Code |

test: add local HTTP mock server for client-side command tests
test: tighten mock server routing and W3C capability assertions
test: replace HttpListener with loopback TcpListener in MockAppiumServer
test: assert disjoint W3C capability sets and close active clients on disposal
test: use WireMock.Net in MockAppiumServer
test: use JsonPartialMatcher in MockAppiumServer and remove unused ClearRecordedRequests