{"id":21944746,"url":"https://github.com/browserstack/mstest-browserstack","last_synced_at":"2026-03-15T09:48:17.031Z","repository":{"id":229971926,"uuid":"759746442","full_name":"browserstack/MSTest-browserstack","owner":"browserstack","description":"Sample code for running sessions with MStest on Browserstack","archived":false,"fork":false,"pushed_at":"2024-07-03T15:51:37.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-05T00:19:53.369Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/browserstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-19T09:01:24.000Z","updated_at":"2024-07-03T15:51:38.000Z","dependencies_parsed_at":"2024-06-27T15:09:21.304Z","dependency_job_id":"1660ea56-86da-4c69-bdc2-04b754d81bb9","html_url":"https://github.com/browserstack/MSTest-browserstack","commit_stats":null,"previous_names":["browserstack/mstest-browserstack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/browserstack/MSTest-browserstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2FMSTest-browserstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2FMSTest-browserstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2FMSTest-browserstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2FMSTest-browserstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserstack","download_url":"https://codeload.github.com/browserstack/MSTest-browserstack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2FMSTest-browserstack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266433112,"owners_count":23927703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T04:17:01.459Z","updated_at":"2025-12-26T09:24:36.593Z","avatar_url":"https://github.com/browserstack.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MSTest-browserstack\nSample code for running sessions with MStest on Browserstack using SDK. \u003cimg src=\"assets/browserstack.png\" width=30 height=25\u003e \u003cimg src=\"assets/MSTest.png\" width=50 height=25\u003e \n\n\u003e To perform tests using Selenium 3, please checkout the selenium 3 branch\n\n\u003e To perform tests using Selenium 4, please checkout the main branch\n\n[MSTest](https://docs.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-mstest) Integration with BrowserStack.\n\n## Setup\n\n### Installation Steps\n\n1. Clone the repository.\n2. Open the solution `MSTest_browserstack.sln` in Visual Studio.\n3. Install dependencies using NuGet Package Manager:\n    ```bash\n    dotnet restore\n    ```\n4. To run tests on private websites,\n    - set `browserstackLocal`: `true` at `browserstack.yml`\n5. Build the solution\n\n### Running Tests\n\n- To run tests, execute the following command:\n    ```bash\n    dotnet test\n    ```\n\n- To run the single test, execute the following command:\n    ```bash\n    dotnet test --filter TestCategory=sample-test\n    ```\n\n- To run local tests, execute the following command:\n    ```bash\n    dotnet test --filter TestCategory=sample-local-test\n    ```\n\nUnderstand how many parallel sessions you need by using our [Parallel Test Calculator](https://www.browserstack.com/automate/parallel-calculator?ref=github)\n\n## Integrate your test suite\n\nThis 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:\n\n* Create sample browserstack.yml file with the browserstack related capabilities with your [BrowserStack Username and Access Key](https://www.browserstack.com/accounts/profile/details) and place it in your root folder.\n* Add nuget library BrowserStack.TestAdapter\n```sh\ndotnet add BrowserStack.TestAdapter\n```\n* Build project `dotnet build`\n\n### Notes\n\n* View your test results on the [BrowserStack automate dashboard](https://www.browserstack.com/automate).\n* For testing on different browsers, check the [platform configurator](https://www.browserstack.com/automate/c-sharp#setting-os-and-browser).\n* You can export the environment variables for the Username and Access Key of your BrowserStack account\n\n  * For Unix-like or Mac machines:\n  ```\n  export BROWSERSTACK_USERNAME=\u003cbrowserstack-username\u003e \u0026\u0026\n  export BROWSERSTACK_ACCESS_KEY=\u003cbrowserstack-access-key\u003e\n  ```\n\n  * For Windows Cmd:\n  ```\n  set BROWSERSTACK_USERNAME=\u003cbrowserstack-username\u003e\n  set BROWSERSTACK_ACCESS_KEY=\u003cbrowserstack-access-key\u003e\n  ```\n\n  * For Windows Powershell:\n  ```\n  $env:BROWSERSTACK_USERNAME=\u003cbrowserstack-username\u003e\n  $env:BROWSERSTACK_ACCESS_KEY=\u003cbrowserstack-access-key\u003e\n  ```\n\n## Additional Resources\n\n* [Documentation for writing automate test scripts in C#](https://www.browserstack.com/automate/c-sharp).\n* [Customizing your tests on BrowserStack](https://www.browserstack.com/automate/capabilities).\n* [Browsers \u0026 mobile devices for selenium testing on BrowserStack](https://www.browserstack.com/list-of-browsers-and-platforms?product=automate).\n* [Using REST API to access information about your tests via the command-line interface](https://www.browserstack.com/automate/rest-api).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fmstest-browserstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserstack%2Fmstest-browserstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fmstest-browserstack/lists"}