{"id":21944749,"url":"https://github.com/browserstack/pytest-appium-app-browserstack","last_synced_at":"2025-04-22T21:06:31.153Z","repository":{"id":66098340,"uuid":"569218844","full_name":"browserstack/pytest-appium-app-browserstack","owner":"browserstack","description":" Pytest integration with BrowserStack","archived":false,"fork":false,"pushed_at":"2024-11-20T08:06:00.000Z","size":35323,"stargazers_count":1,"open_issues_count":2,"forks_count":7,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-22T21:06:16.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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":"2022-11-22T10:47:43.000Z","updated_at":"2024-07-03T15:41:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9e2915f-daee-4f26-8f7b-c3babfcefe83","html_url":"https://github.com/browserstack/pytest-appium-app-browserstack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fpytest-appium-app-browserstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fpytest-appium-app-browserstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fpytest-appium-app-browserstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fpytest-appium-app-browserstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserstack","download_url":"https://codeload.github.com/browserstack/pytest-appium-app-browserstack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250324690,"owners_count":21411946,"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","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:02.253Z","updated_at":"2025-04-22T21:06:31.131Z","avatar_url":"https://github.com/browserstack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTest with Browserstack AppAutomate\n\nPyTest Integration with BrowserStack using SDK.\n\n![BrowserStack Logo](https://d98b8t1nnulk5.cloudfront.net/production/images/layout/logo-header.png?1469004780)\n### Requirements\n\n* Python3\n\n## Setup\n\n* Clone the repo with `git clone -b sdk https://github.com/browserstack/pytest-appium-app-browserstack.git`\n* It is recommended to use a virtual environment to install dependencies. To create a virtual environment:\n  ```\n  python3 -m venv env\n  source env/bin/activate # on Mac\n  env\\Scripts\\activate # on Windows\n  ```\n* Install dependencies `pip install -r requirements.txt`\n* To run your automated tests using BrowserStack, you must provide a valid username and access key. This can be done either by providing your username and access key in the `browserstack.yml` configuration file, or by setting the `BROWSERSTACK_USERNAME` and `BROWSERSTACK_ACCESS_KEY` environment variables.\n\n## Getting Started\n\nGetting Started with Pytest-Appium tests in Python on BrowserStack couldn't be easier!\n\n### Run your first test :\n\n**1. Upload your Android or iOS App**\n\nSpecify your Android app (.apk or .aab file) or iOS app (.ipa file) in the `browserstack.yml` configuration file. Here is an example app config :\n\n```\napp: '/path/to/local/app.apk'\n```\n\nSet `app` to use the appliction under test for Appium sessions. Available options: app: `/path/to/local/app.apk` OR app: `bs://\u003capp-id\u003e` i.e App URL returned when uploading the app to BrowserStack manually. Visit https://www.browserstack.com/docs/app-automate/appium/set-up-tests/specify-app for more options\n\n**Note**: If you do not have an .apk or .ipa file and are looking to simply try App Automate, you can download and test using our [sample Android app](https://www.browserstack.com/app-automate/sample-apps/android/WikipediaSample.apk) or [sample iOS app](https://www.browserstack.com/app-automate/sample-apps/ios/BStackSampleApp.ipa).\n\n\n**2. Configure and run your first single test**\n\nOpen `browserstack.yml` file in `android` folder for Android and `ios` folder for iOS:\n\n- Replace `YOUR_USERNAME` \u0026 `YOUR_ACCESS_KEY` in the `browserstack.yml` configuration file. Get your BrowserStack access credentials from [here](https://www.browserstack.com/accounts/settings)\n\n- Replace `app: bs://\u003capp-id\u003e` with the URL obtained from app upload step or mention the path to your apk file.\n\n- Run the below command to execute a Android test on BrowserStack AppAutomate:\n    ```\n    cd android\n    browserstack-sdk pytest -s bstack_sample.py\n    ```\n\n- Run the below command to execute a iOS test on BrowserStack AppAutomate:\n    ```\n    cd ios\n    browserstack-sdk pytest -s bstack_sample.py\n    ```\n\n- You can access the test execution results, and debugging information such as video recording, network logs on [App Automate dashboard](https://app-automate.browserstack.com/dashboard)\n\n---\n\n### **Use Local testing for apps that access resources hosted in development or testing environments :**\n\n**1. Upload your Android or iOS App**\n\nSpecify your Android app (.apk or .aab file) or iOS app (.ipa file) in the `browserstack.yml` configuration file. Here is an example app config :\n\n```\napp: '/path/to/local/app.apk'\n```\n\nSet `app` to use the appliction under test for Appium sessions. Available options: app: `/path/to/local/app.apk` OR app: `bs://\u003capp-id\u003e` i.e App URL returned when uploading the app to BrowserStack manually. Visit https://www.browserstack.com/docs/app-automate/appium/set-up-tests/specify-app for more options\n\n**Note**: If you do not have an .apk or .ipa file and are looking to simply try App Automate, you can download and test using our [sample Android app](https://www.browserstack.com/app-automate/sample-apps/android/WikipediaSample.apk) or [sample iOS app](https://www.browserstack.com/app-automate/sample-apps/ios/BStackSampleApp.ipa).\n\n\n**2. Configure and run your local test**\n\nOpen `browserstack.yml` file in `android` folder for Android and `ios` folder for iOS:\n\n- Replace `YOUR_USERNAME` \u0026 `YOUR_ACCESS_KEY` in the `browserstack.yml` configuration file. Get your BrowserStack access credentials from [here](https://www.browserstack.com/accounts/settings)\n\n- Replace `app: bs://\u003capp-id\u003e` with the URL obtained from app upload step or mention the path to your apk file.\n\n- Ensure that `browserstackLocal` capability is set to `true`. The `browserstack-sdk` contains the code snippet that automatically establishes Local Testing connection to BrowserStack servers using Python binding for BrowserStack Local. \n\n- Run the below command for Android: \n    ```\n    cd android\n    browserstack-sdk pytest -s bstack_sample_local.py\n    ```\n\n- Run the below command for iOS: \n    ```\n    cd ios\n    browserstack-sdk pytest -s bstack_sample_local.py\n    ```\n\n- You can access the test execution results, and debugging information such as video recording, network logs on [App Automate dashboard](https://app-automate.browserstack.com/dashboard)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fpytest-appium-app-browserstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserstack%2Fpytest-appium-app-browserstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fpytest-appium-app-browserstack/lists"}