Skip to content

Fails to run with BrowserStack account in VS2022 #18

@JYouren

Description

@JYouren

Following the instructions here, or the same ones at https://app-automate.browserstack.com/dashboard/v2/quick-start/get-started#run-a-sample-build result in the following error when attempting to run the tests.

git clone https://github.com/browserstack/nunit-appium-app-browserstack.git
cd nunit-appium-app-browserstack
cd android
change the username/password in browserstack.yml
dotnet build
dotnet test --filter "Category=sample-test"

Build started at 08:51...
1>------ Build started: Project: android, Configuration: Debug Any CPU ------
1>The template "Dotnet local tool manifest file" was created successfully.
1>
1>You can invoke the tool from this directory using the following commands: 'dotnet tool run browserstack-sdk' or 'dotnet browserstack-sdk'.
1>Tool 'browserstack-sdk' (version '1.16.4') was successfully installed. Entry is added to the manifest file C:\Source\nunit2\android.config\dotnet-tools.json.
1>2024-11-15 08:51:48.5241|INFO|browserstack_sdk.utils|Using dotnet: C:\Program Files\dotnet\dotnet.exe
1>2024-11-15 08:51:50.4863|INFO|browserstack_sdk.Program|Detected Selenium version 3.141.0
1>2024-11-15 08:51:50.4863|INFO|browserstack_sdk.Program|Detected Appium version 4.4.0
1>2024-11-15 08:51:50.4863|INFO|browserstack_sdk.Program|Running for f/w nunit 3.13.3
1>2024-11-15 08:51:50.6247|INFO|browserstack_sdk.Program|Detected dotnet version 8.0.404
1>2024-11-15 08:51:50.8712|INFO|browserstack_sdk.utils|Using existing app id bs://417c29b9234c10bb5a652167a5d5ac789fc67163 for hash : bf26007ec897ff6d7b9971fa053e2274.
1>2024-11-15 08:51:50.8712|INFO|browserstack_sdk.Configuration|Using App : bs://417c29b9234c10bb5a652167a5d5ac789fc67163.
1>2024-11-15 08:51:50.8712|INFO|browserstack_sdk.Program|SetupObservability: No test Assembly found in environment, returning
1>2024-11-15 08:51:50.8982|ERROR|browserstack_sdk.Program|Uncaught exception occured: System.IndexOutOfRangeException: Index was outside the bounds of the array.
1> at browserstack_sdk.Program.Main(String[] args)
1>C:\Users\User\.nuget\packages\browserstack.testadapter\0.3.1\build\BrowserStack.TestAdapter.targets(9,5): error MSB3073: The command "dotnet browserstack-sdk --add-patch-bstack obj\Debug\net6.0\ C:\Source\nunit2\android\bin\Debug\net6.0\android.dll" exited with code 1.
1>Done building project "android.csproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 08:51 and took 05.094 seconds ==========

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions