diff --git a/images/appium.png b/.github/images/appium.png similarity index 100% rename from images/appium.png rename to .github/images/appium.png diff --git a/images/avd.png b/.github/images/avd.png similarity index 100% rename from images/avd.png rename to .github/images/avd.png diff --git a/.github/images/browserstack-logo.png b/.github/images/browserstack-logo.png new file mode 100644 index 0000000..366fb7e Binary files /dev/null and b/.github/images/browserstack-logo.png differ diff --git a/.github/images/browserstack-tests.png b/.github/images/browserstack-tests.png new file mode 100644 index 0000000..3724085 Binary files /dev/null and b/.github/images/browserstack-tests.png differ diff --git a/.github/images/observabilidade.png b/.github/images/observabilidade.png new file mode 100644 index 0000000..e95c710 Binary files /dev/null and b/.github/images/observabilidade.png differ diff --git a/.github/workflows/browserStack-ci.yml b/.github/workflows/browserStack-ci.yml new file mode 100644 index 0000000..9cee896 --- /dev/null +++ b/.github/workflows/browserStack-ci.yml @@ -0,0 +1,59 @@ +name: BrowserStack Tests + +on: + pull_request: + branches: [ main ] + +jobs: + tests: + runs-on: ubuntu-latest + name: Android Tests 🤖🤖 + + steps: + - name: Checkout 🚀🚀 + uses: actions/checkout@v4 + + - name: Install dependencies ➕➕ + run: pip install -r requirements.txt + + - name: BrowserStack Env Setup 🔧🔧 + uses: browserstack/github-actions/setup-env@master + with: + username: ${{ secrets.BROWSERSTACK_USERNAME }} + access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + + - name: Run tests 🧪🧪 + run: browserstack-sdk robot -d ./reports -i browserstack tests/ + + - name: Upload Reports 📖📖 + uses: actions/upload-artifact@v4 + if: always() + with: + name: Reports + path: reports + retention-days: 90 + if-no-files-found: warn + + - name: Slack Notification - Success + if: ${{ success() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: pipeline-notifications + SLACK_COLOR: ${{ job.status }} + SLACK_ICON: https://cdn-icons-png.flaticon.com/512/1642/1642322.png + SLACK_TITLE: 'All tests passed successfully' + SLACK_MESSAGE: ':robot: Tests passed :robot:' + SLACK_USERNAME: SUCCESS + + - name: Slack Notification - Failure + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_CHANNEL: pipeline-notifications + SLACK_COLOR: ${{ job.status }} + SLACK_ICON: https://cdn-icons-png.flaticon.com/512/3271/3271351.png + SLACK_TITLE: 'Some tests failed' + SLACK_MESSAGE: ':fire: Tests failed :fire:' + SLACK_USERNAME: FAILURE \ No newline at end of file diff --git a/README.md b/README.md index 4877861..26fb9fe 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Automação de testes Mobile com Robot Framework e Appium. -

- -

+[![BrowserStack Tests](https://github.com/thinogueiras/Robot-Appium-Tests/actions/workflows/browserStack-ci.yml/badge.svg?branch=main)](https://github.com/thinogueiras/Robot-Appium-Tests/actions/workflows/browserStack-ci.yml) ## Pré-requisitos mínimos de ambiente: @@ -67,11 +65,11 @@ browserstack-sdk setup --framework "robot" --username "relatórios da execução: --- +## Sobre a integração com o BrowserStack: + +

+ +

+ +### Execuções disparadas automaticamente pelo pipeline do `GitHub Actions`: + +![alt text](.github/images/browserstack-tests.png) + +### Observabilidade dos Testes: + +![alt text](.github/images/observabilidade.png) + +--- + Linkedin Thiago Nogueira dos Santos 🤓 ✌🏻 diff --git a/images/robot.png b/images/robot.png deleted file mode 100644 index 0e2e8d0..0000000 Binary files a/images/robot.png and /dev/null differ