diff --git a/.github/workflows/ci-robot.yml b/.github/workflows/ci-robot.yml index 4502fc4..52a3a65 100644 --- a/.github/workflows/ci-robot.yml +++ b/.github/workflows/ci-robot.yml @@ -2,7 +2,7 @@ name: Robot Framework - E2E Tests on: pull_request: - branches: [ master, develop ] + branches: [ develop ] jobs: e2e-tests: @@ -16,11 +16,9 @@ jobs: run: | pip install robotframework - - name: Install library Browser(Playwright) - run: | - pip install -U pip + - name: Install Playwright (Library Browser) + run: | pip install robotframework-browser - pip install -U robotframework-browser - name: Install Node Dependencies run: | diff --git a/resources/main.resource b/resources/main.resource index bdc4095..1f29079 100644 --- a/resources/main.resource +++ b/resources/main.resource @@ -2,12 +2,12 @@ Documentation Arquivo principal do projeto Library Browser -Library ../libraries/date.py +# Library ../libraries/date.py Resource pages/login.resource Resource pages/dashboard.resource -Resource variables.resource +# Resource variables.resource *** Variables *** ${BROWSER} Chromium @@ -28,19 +28,18 @@ Finish Test Sleep 1 Take Screenshot -Setup Browserstack - ${Datetime} Get Current Datetime +# Setup Browserstack +# ${Datetime} Get Current Datetime - ${CAPS} Create Dictionary - ... os=Windows - ... os_version=11 - ... browser=chrome - ... name=Test Execution: ${Datetime} - ... browserstack.username=${BROWSERSTACK_USERNAME} - ... browserstack.accessKey=${BROWSERSTACK_ACCESSKEY} - ... client.playwrightVersion=latest +# ${CAPS} Create Dictionary +# ... os=Windows +# ... os_version=11 +# ... browser=chrome +# ... name=Test Execution: ${Datetime} +# ... browserstack.username=${BROWSERSTACK_USERNAME} +# ... browserstack.accessKey=${BROWSERSTACK_ACCESSKEY} +# ... client.playwrightVersion=latest - ${BSENCODEDCAPS} Evaluate urllib.parse.quote( json.dumps(${CAPS}) ) +# ${BSENCODEDCAPS} Evaluate urllib.parse.quote( json.dumps(${CAPS}) ) - Connect To Browser wss://cdp.browserstack.com/playwright?caps=${BSENCODEDCAPS} - +# Connect To Browser wss://cdp.browserstack.com/playwright?caps=${BSENCODEDCAPS} \ No newline at end of file diff --git a/run-tests-with-multi-thread.sh b/run-tests-with-multi-thread.sh new file mode 100644 index 0000000..755d88e --- /dev/null +++ b/run-tests-with-multi-thread.sh @@ -0,0 +1,12 @@ +docker run --name robot-tests -it \ + -v /${PWD}/resources:/opt/robotframework/resources:Z \ + -v /${PWD}/tests:/opt/robotframework/tests:Z \ + -e ROBOT_THREADS=10 \ + -e PABOT_OPTIONS="--testlevelsplit" \ + ppodgorsek/robot-framework:latest + +rm -rf $(PWD)/logs + +docker cp robot-tests:/opt/robotframework/reports $(PWD)/logs + +docker container rm -f robot-tests \ No newline at end of file diff --git a/run-tests-with-single-thread.sh b/run-tests-with-single-thread.sh new file mode 100644 index 0000000..5f8fd50 --- /dev/null +++ b/run-tests-with-single-thread.sh @@ -0,0 +1,10 @@ +docker run --name robot-tests -it \ + -v /${PWD}/resources:/opt/robotframework/resources:Z \ + -v /${PWD}/tests:/opt/robotframework/tests:Z \ + ppodgorsek/robot-framework:latest + +rm -rf $(PWD)/logs + +docker cp robot-tests:/opt/robotframework/reports $(PWD)/logs + +docker container rm -f robot-tests \ No newline at end of file