-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fails to run with BrowserStack account in VS2022 #18
Comments
Can you please provide the dotnet version and the details regarding the system configuration(windows or mac)? |
.Net 8.0.404 |
In the .csproj file I had to change to for it to build successfully. |
Then when I run dotnet test --filter "Category=sample-test" I get Starting test execution, please wait... 12.0OpenQA.Selenium.WebDriverException : [BROWSERSTACK_INVALID_APP_URL] The app_url/ custom_id/ shareable_id specified in the 'app' capability in your test script is invalid. Please update the 'app' capability with a valid value and try again. Refer to this document to reset the app capabilities : https://www.browserstack.com/docs/app-automate/appium/set-up-tests/specify-app#BrowserStack_SDK 11.0OpenQA.Selenium.WebDriverException : [BROWSERSTACK_INVALID_APP_URL] The app_url/ custom_id/ shareable_id specified in the 'app' capability in your test script is invalid. Please update the 'app' capability with a valid value and try again. Refer to this document to reset the app capabilities : https://www.browserstack.com/docs/app-automate/appium/set-up-tests/specify-app#BrowserStack_SDK 12.0OpenQA.Selenium.WebDriverException : [BROWSERSTACK_INVALID_APP_URL] The app_url/ custom_id/ shareable_id specified in the 'app' capability in your test script is invalid. Please update the 'app' capability with a valid value and try again. Refer to this document to reset the app capabilities : https://www.browserstack.com/docs/app-automate/appium/set-up-tests/specify-app#BrowserStack_SDK Stack Trace: 12.0at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) 11.0at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) 12.0at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) Failed! - Failed: 1, Passed: 0, Skipped: 0, Total: 1, Duration: < 1 ms - android.dll (net8.0) |
So if I go to https://app-automate.browserstack.com/dashboard/v2/quick-start/get-started, upload the WikipediaSample.apk file manually, and replace app: ./WikipediaSample.apk with app: bs://........ in the browserstack.yml file I get a successful test! 😩 |
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 ==========
The text was updated successfully, but these errors were encountered: