Add reqnroll-nunit-appium App Automate sample (Android)#1
Add reqnroll-nunit-appium App Automate sample (Android)#1AakashHotchandani wants to merge 7 commits into
Conversation
07souravkunda
left a comment
There was a problem hiding this comment.
Clean, modern sample — it actually improves on the existing nunit-appium-app-browserstack sibling in CI hygiene (explicit least-privilege permissions:, the status-check pattern, testObservability: true). Approve with suggestions; details are in the inline comments.
The one I'd genuinely push on before merge is the bs:// app reference in browserstack.yml: unlike the sibling (which commits the public apk and references it by relative path), an account-bound bs:// hash expires and won't work on a customer's own account out of the box — and it leaves the local test non-runnable as shipped. The rest are alignment nits against the sibling sample (target frameworks, the redundant BrowserStackLocal reference, source:/framework: yml fields, and a cd typo in the README).
| # Application under test | ||
| # ========================================== | ||
| # Pre-uploaded WikipediaSample.apk on BrowserStack (use this bs:// url verbatim). | ||
| app: bs://92d48b416632f2b1734259565ceab61b05ad0b24 |
There was a problem hiding this comment.
This pins the app under test to an account-bound bs:// hash. App Automate uploads age out, so over time — or on any account other than the one holding the CI secrets — dotnet test will fail out of the box. It also makes @sample-local-test non-runnable as shipped: there's no LocalSample.apk, and this bs:// points at the Wikipedia app.
Evidence: The established App Automate C# sample browserstack/nunit-appium-app-browserstack commits the public sample apps and references them by relative path (app: ./WikipediaSample.apk), overriding with BROWSERSTACK_APP for the local test — so it runs immediately on any account and never goes stale. The expiry caveat here lives only in the workflow comment, not the README.
Fix: commit the public WikipediaSample.apk and use app: ./WikipediaSample.apk for parity with the sibling, or at minimum surface the upload/expiry requirement in the README so customers know to re-upload on their own account.
Question for author: was bs:// chosen deliberately to keep the repo lightweight, accepting the expiry tradeoff?
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net8.0</TargetFramework> |
There was a problem hiding this comment.
This single-targets net8.0, but the README states "net6.0+ is supported," and the sibling sample nunit-appium-app-browserstack multi-targets net6.0;net8.0;net9.0;net10.0 (and CI-tests all four). The README claim and the project don't agree.
Fix: either multi-target to match the README + sibling, or change the README to say net8.0 (the CI matrix follows from whichever you pick).
Minor, same file: Microsoft.NET.Test.Sdk is 17.0.0 here vs 17.1.0 in the sibling — worth bumping to ≥17.1.0 (ideally newer for net8.0) while you're in this file.
| <!-- BrowserStack SDK: instruments the test runner and routes the Appium | ||
| session to the BrowserStack cloud using android/browserstack.yml. --> | ||
| <PackageReference Include="BrowserStack.TestAdapter" Version="0.*" /> | ||
| <PackageReference Include="BrowserStackLocal" Version="2.0.0" /> |
There was a problem hiding this comment.
The sibling App Automate sample nunit-appium-app-browserstack — which also exercises BrowserStack Local — ships with no BrowserStackLocal package reference. The SDK/binary starts and manages the tunnel automatically when browserstackLocal: true, which the README here states too. This reference looks like a leftover from a non-SDK Local setup, and could mislead customers copying the sample into adding a dependency they don't need.
Fix: remove BrowserStackLocal unless the test code uses it directly (it doesn't appear to).
| # ======================= | ||
| parallelsPerPlatform: 1 | ||
|
|
||
| source: reqnroll-nunit-appium-app-browserstack:sample-sdk:v1.0 |
There was a problem hiding this comment.
Two small alignment items with the established sample convention:
source:here isreqnroll-nunit-appium-app-browserstack:sample-sdk:v1.0, but the siblingnunit-appium-app-browserstackuses a framework-led token:nunit:appium-sample-sdk:v1.0. Suggest matching the shape, e.g.reqnroll:appium-sample-sdk:v1.0.- The
framework: reqnrollkey (line 16) isn't present in the sibling's yml — the SDK auto-detects the framework from the installed packages. Question: is this key actually read/honored, or is it redundant? The inline comment claims it "lets the SDK send test context," which may be misleading if detection is automatic.
|
|
||
| ```bash | ||
| git clone <this-repo> | ||
| cd reqnroll-nunit-appium |
There was a problem hiding this comment.
cd reqnroll-nunit-appium — the repo clones to reqnroll-nunit-appium-app-browserstack/, so this is the first command a customer copy-pastes and it lands in a non-existent directory. (The "Run Sample Test" section below correctly does cd android.)
Fix: cd reqnroll-nunit-appium-app-browserstack
…ccount-bound bs://), multi-target net6/8/9/10, drop redundant BrowserStackLocal + framework: yml key, framework-led source token, bump Test.Sdk 17.1.0, fix README cd path
| # ======================================= | ||
| # Platforms (Devices to test) | ||
| # ======================================= | ||
| platforms: |
There was a problem hiding this comment.
why 1 platform? let's add 3 platforms
| max-parallel: 3 | ||
| matrix: | ||
| os: [windows-latest] | ||
| dotnet: ['8.0.x'] |
| # BrowserStack Reporting | ||
| # ====================== | ||
| projectName: BrowserStack Samples | ||
| buildName: appauto-reqnroll-nunit-appium |
|
Thanks for the detailed review, @07souravkunda 🙏 — all addressed in the latest commits:
Also folded these back into our sample-repo generator so future samples don't repeat them. PTAL when you get a chance! |
…sion matrix with --framework
|
Quick follow-up from a broader "sync with the pre-existing sibling repos" pass: I changed the target framework from a single |
Import generated + live-validated BrowserStack SDK sample content, replacing the init scaffold. Single clean commit; safety-gated to contain no run artifacts or credentials.