This repository demonstrates how to run Appium tests in Specflow on BrowserStack App Automate.
-
Visual Studio and .NET Core
- Download Visual Studio from here
- Install .NET Core while installing Visual Studio
Getting Started with Appium tests in Specflow on BrowserStack devices couldn't be easier!
-
Go to
android
orios
directory -
Open the project in Visual Studio by opening
SpecFlow_BrowserStack.sln
file -
If you have uploaded your app then add the app id to the
browserstack.yml
config file, or you can directly specify the path to your app in thebrowserstack.yml
file. -
Run
dotnet test --filter "Category=sample-test"
-
You can access the test execution results, and debugging information such as video recording, network logs on App Automate dashboard
-
Go to
android
orios
directory -
Open the project in Visual Studio by opening
SpecFlow_BrowserStack.sln
file -
Ensure that
browserstackLocal
capability is set totrue
in thebrowserstack.yml
file -
If you have uploaded your app then add the app id to the
browserstack.yml
config file, or you can directly specify the path to your app in thebrowserstack.yml
file. -
Run
dotnet test --filter "Category=sample-local-test"
-
You can access the test execution results, and debugging information such as video recording, network logs on App Automate dashboard
This repository uses the BrowserStack SDK to run tests on BrowserStack. Follow the steps below to install the SDK in your test suite and run tests on BrowserStack:
- Create sample browserstack.yml file with the browserstack related capabilities with your BrowserStack Username and Access Key and place it in your root folder.
- Add nuget library BrowserStack.TestAdapter
dotnet add BrowserStack.TestAdapter
- Build project
dotnet build
--
For other CSharp frameworks samples, refer to following repositories :
Note: For other test frameworks supported by App-Automate refer our Developer documentation
--
-
In case
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json'
issue is encountered while running a Local test on Windows, please follow the these steps to resolve it :-
Go to Tools > NuGet Package Manager > Package Manager Console
-
Run the command
update-package Newtonsoft.Json -reinstall
in the opened console -
Then run
update-package Newtonsoft.Json
in the same console
-
--
If you are running into any issues or have any queries, please check Browserstack Support page or get in touch with us.