Skip to content

Commit

Permalink
Workflow ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thinogueiras committed Feb 26, 2024
1 parent 5bb98c4 commit 64263f5
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 8 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Robot Framework Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
tests:
runs-on: ubuntu-latest
name: E2E Tests 🤖🤖

steps:
- name: Checkout 🚀🚀
uses: actions/checkout@v4

- name: Install dependencies ➕➕
run: pip install -r requirements.txt

- name: Initialize Browser Library (Playwright)
run: rfbrowser init

- name: E2E Tests 🧪🧪
run: robot -d ./reports 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
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Automação de Testes de UI com Robot Framework e Playwright.

[![Robot Framework Tests](https://github.com/thinogueiras/Robot-Gherkin-Tests/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/thinogueiras/Robot-Gherkin-Tests/actions/workflows/ci.yml)

## Sobre o projeto:

* Site alvo dos testes: <strong>https://www.saucedemo.com</strong>.
* Este projeto utiliza o padrão `Page Objects`.
* Os <strong>Casos de Testes</strong> foram implementados utilizando `Gherkin / BDD`.
* Este projeto utiliza o padrão <strong>`Page Objects`</strong>.
* Os <strong>`Casos de Testes`</strong> foram implementados utilizando <strong>`Gherkin`</strong> com a abordagem <strong>`declarativa`</strong>.

## Pré-requisitos mínimos de ambiente:

* [Python](https://www.python.org/downloads/) 3.10.12.
* [Git](https://git-scm.com/).

* [Python](https://www.python.org/downloads/) 3.11.x.

* [Node.js](https://nodejs.org/en) 18.17.1.
* [Node.js](https://nodejs.org/en) 18.17.x.

## Clone do Repositório:

```bash
```
git clone https://github.com/thinogueiras/Robot-Gherkin-Tests.git
cd Robot-Gherkin-Tests
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
robotframework
robotframework-browser
robotframework-pabot
robotframework-browser
2 changes: 1 addition & 1 deletion resources/base.resource
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Resource pages/CartPage.resource

*** Variables ***
${BROWSER} Chromium
${HEADLESS} ${False}
${HEADLESS} ${True}

*** Keywords ***
Start Test
Expand Down

0 comments on commit 64263f5

Please sign in to comment.