Skip to content

Commit

Permalink
Merge pull request #1 from carlosnizolli/new
Browse files Browse the repository at this point in the history
Versão atualizada
  • Loading branch information
carlosnizolli authored Mar 7, 2023
2 parents d20430c + a26c405 commit e25b2e4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 41 deletions.
25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ ENV SCREEN_COLOUR_DEPTH 24
ENV SCREEN_HEIGHT 1080
ENV SCREEN_WIDTH 1920

ENV METRICS_LOGO https://upload.wikimedia.org/wikipedia/commons/e/e4/Robot-framework-logo.png

ENV TZ America/Sao_Paulo

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
Expand All @@ -32,7 +30,7 @@ RUN apt-get upgrade -y
RUN apt-get install -y python3-pip

RUN apt-get install -y curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -yq nodejs build-essential \
&& node -v \
&& npm -v \
Expand All @@ -55,28 +53,27 @@ RUN apt-get -y install chromium-browser

RUN pip3 install \
--no-cache-dir \
cryptography==3.1.1 \
cryptography==39.0.1 \
robotframework-xvfb \
robotframework-csvlib \
requests==2.20.1 \
robotframework==5.0 \
robotframework-browser==12.3.0 \
requests==2.28.2 \
robotframework==6.0.2 \
robotframework-browser==16.0.0 \
robotframework-databaselibrary==1.2.4 \
robotframework-datadriver==1.6.0 \
robotframework-datadriver==1.7.0 \
robotframework-datetime-tz==1.0.6 \
robotframework-faker==5.0.0 \
robotframework-ftplibrary==1.9 \
robotframework-imaplibrary2==0.4.2 \
robotframework-pabot==2.5.2 \
robotframework-requests==0.9.2 \
robotframework-imaplibrary2==0.4.6 \
robotframework-pabot==2.13.0 \
robotframework-requests==0.9.4 \
robotframework-sshlibrary==3.8.0 \
PyYAML \
robotframework-metrics==3.2.2 \
robotframework-notifications \
pg8000==1.26.0 \
pg8000==1.29.4 \
tesults \
robot-tesults \
robotframework-jsonlibrary==0.3.1 \
robotframework-jsonlibrary==0.5 \
robotframework-autorecorder \
robotframework-screencaplibrary==1.6.0

Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
# Docker para o Robot Framework em Ubuntu

### Contém as seguintes Libs
- robotframework-csvlib
- robotframework==5.0
- robotframework-browser==12.3.0
- robotframework-databaselibrary==1.2.4
- robotframework-datadriver==1.6.0
- robotframework-datetime-tz==1.0.6
- robotframework-faker==5.0.0
- robotframework-ftplibrary==1.9
- robotframework-imaplibrary2==0.4.2
- robotframework-pabot==2.5.2
- robotframework-requests==0.9.2
- robotframework-sshlibrary==3.8.0
- robotframework-metrics==3.2.2
- robotframework-notifications
- pg8000==1.26.0
- tesults
- robot-tesults
- robotframework-jsonlibrary==0.3.1
- robotframework-autorecorder
- robotframework-screencaplibrary==1.6.0
cryptography==39.0.1
robotframework-xvfb
robotframework-csvlib
requests==2.28.2
robotframework==6.0.2
robotframework-browser==16.0.0
robotframework-databaselibrary==1.2.4
robotframework-datadriver==1.7.0
robotframework-datetime-tz==1.0.6
robotframework-faker==5.0.0
robotframework-ftplibrary==1.9
robotframework-imaplibrary2==0.4.6
robotframework-pabot==2.13.0
robotframework-requests==0.9.4
robotframework-sshlibrary==3.8.0
PyYAML
robotframework-notifications
pg8000==1.29.4
tesults
robot-tesults
robotframework-jsonlibrary==0.5
robotframework-autorecorder
robotframework-screencaplibrary==1.6.0

### Orientações gerais
- Utiliza o timezone São Paulo
- Preparado para a utilização do firefox
- Para executar é necessário informar caminho dos test_cases na variável ROBOT_TESTS_DIR
- O diretório de logs pode ser alterado com a variável ROBOT_REPORTS_DIR
- Por padrão o Metrics salva o dashboard com o nome metrics-log.html dentro da pasta de logs
- O Metrics utiliza uma imagem padrão do robot, para alterar a imagem presente no dashboard informar na variável METRICS_LOGO
- Para utilizar o tesults basta passar o listener completo na variável ROBOT_LISTENER
- Usar a variável ROBOT_OPTIONS para passar options do robot framework como --exitonfailure, --name, etc.

Expand All @@ -41,14 +42,13 @@ Esta imagem está no dockerhub, para usar no actions basta adicionar os seguinte
- name: Create folder for reports
run: mkdir -m 777 reports
- name: Execute Robot tests
uses: carlosnizolli/docker-robotframework@v02
uses: carlosnizolli/docker-robotframework@v06.1
env:
DOCKER_SHM_SIZE: 22000000
BROWSER: firefox
ROBOT_TESTS_DIR: ${{ github.workspace }}/SuaPasta/SeusTestes.robot
ROBOT_REPORTS_DIR: ${{ github.workspace }}/reports
ROBOT_OPTIONS: "--exitonfailure"
METRICS_LOGO: http://seuendereco.com/sua_imagem.svg
ROBOT_LISTENER: --listener TesultsListener:target=${{ secrets.TESULTS_TARGET }}:build-name=SeuBuildName

No exemplo está sendo criada uma pasta para gravação dos logs o que permite maior controle para exportações.
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: 'Robot Framework'
description: 'Run Robot Framework tests'
runs:
using: 'docker'
image: docker://nizolli/robotframework-ubuntu:v05
image: docker://nizolli/robotframework-ubuntu:v06.1
2 changes: 0 additions & 2 deletions bin/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ fi

ROBOT_EXIT_CODE=$?

robotmetrics -M metrics-log.html --inputpath $ROBOT_REPORTS_DIR --output output.xml --log log.html --logo "${METRICS_LOGO}"

exit $ROBOT_EXIT_CODE

0 comments on commit e25b2e4

Please sign in to comment.