Skip to content

Commit

Permalink
QE-13881 enable python 3.12 (#382)
Browse files Browse the repository at this point in the history
- Add - enable install on python 3.12
- Change - CI - use python 3.12
- Change - CI - use selenium 117 images
- Change - CI - chain jobs
- Change - CI - pre-commit use smaller resource
- Change - increase runtime-timeout values
  • Loading branch information
ddl-cedricyoung authored Oct 30, 2023
1 parent ccfac6e commit 61a9c3c
Show file tree
Hide file tree
Showing 9 changed files with 481 additions and 457 deletions.
25 changes: 16 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ commands:
executors:
unit-test-executor:
docker:
- image: python:3.11.4
- image: python:3.12.0

chrome-test-executor:
docker:
- image: python:3.11.4
- image: selenium/standalone-chrome:114.0-chromedriver-114.0-20230614
- image: python:3.12.0
- image: selenium/standalone-chrome:117.0
environment:
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
Expand All @@ -89,8 +89,8 @@ executors:

firefox-test-executor:
docker:
- image: python:3.11.4
- image: selenium/standalone-firefox:114.0-geckodriver-0.33-20230614
- image: python:3.12.0
- image: selenium/standalone-firefox:117.0
environment:
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
Expand All @@ -100,8 +100,8 @@ executors:

edge-test-executor:
docker:
- image: python:3.11.4
- image: selenium/standalone-edge:114.0-edgedriver-114.0-20230614
- image: python:3.12.0
- image: selenium/standalone-edge:117.0
environment:
SE_NODE_MAX_SESSIONS: 12
SE_NODE_SESSION_TIMEOUT: 300
Expand All @@ -112,7 +112,8 @@ executors:
jobs:
pre-commit:
docker:
- image: cimg/python:3.11.4
- image: cimg/python:3.12.0
resource_class: medium

steps:
- checkout
Expand Down Expand Up @@ -175,7 +176,7 @@ jobs:

publish:
docker:
- image: cimg/python:3.11.4
- image: cimg/python:3.12.0
steps:
- checkout
- install_cucu_dependencies
Expand All @@ -195,12 +196,18 @@ workflows:
- test:
name: test-chrome
browser: chrome
requires:
- pre-commit
- test:
name: test-edge
browser: edge
requires:
- test-chrome
- test:
name: test-firefox
browser: firefox
requires:
- test-chrome
- publish:
filters:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
language_version: python3.12
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.264"
hooks:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project closely adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.171.0
- Add - enable install on python 3.12
- Change - CI - use python 3.12
- Change - CI - use selenium 117 images
- Change - CI - chain jobs
- Change - CI - pre-commit use smaller resource
- Change - increase runtime-timeout values

## 0.170.0
- Change - retry ElementNotInteractableException exception when clicking a dynamically generated dropdown option

Expand Down
2 changes: 1 addition & 1 deletion features/browser/helpers.feature
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ Feature: Helpers
When I open a browser at the url "http://{HOST_ADDRESS}:{PORT}/checkboxes.html?delay_page_load_ms=10000"
Then I expect the following step to fail with "checkbox "checkbox with inner label" is not checked"
"""
Then I wait up to "10" seconds to see the checkbox "checkbox with inner label" is checked
Then I wait up to "11" seconds to see the checkbox "checkbox with inner label" is checked
"""
And I should see the previous step took more than "9" seconds
2 changes: 1 addition & 1 deletion features/cli/report_basics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Feature: Report basics
@runtime-timeout
Scenario: User can run with a runtime timeout and still produce a valid report
Given I run the command "cucu run data/features/slow_features --runtime-timeout 7 --results {CUCU_RESULTS_DIR}/runtime_timeout_reporting_results" and expect exit code "1"
Then I should see the previous step took less than "12" seconds
Then I should see the previous step took less than "13" seconds
When I run the command "cucu report {CUCU_RESULTS_DIR}/runtime_timeout_reporting_results --output {CUCU_RESULTS_DIR}/runtime_timeout_reporting_report" and expect exit code "0"
And I start a webserver at directory "{CUCU_RESULTS_DIR}/runtime_timeout_reporting_report/" and save the port to the variable "PORT"
And I open a browser at the url "http://{HOST_ADDRESS}:{PORT}/index.html"
Expand Down
6 changes: 3 additions & 3 deletions features/cli/run.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Feature: Run
Given I run the command "cucu run data/features/slow_features --runtime-timeout 5 --results {CUCU_RESULTS_DIR}/runtime_timeout_results" and save stdout to "STDOUT" and expect exit code "1"

# TODO: QE-10912 Investigate why this is taking longer in python 3.11
Then I should see the previous step took less than "8" seconds
Then I should see the previous step took less than "11" seconds
And I should see "{STDOUT}" contains the following:
"""
runtime timeout reached, aborting run
Expand All @@ -80,7 +80,7 @@ Feature: Run
@runtime-timeout
Scenario: User can run with a runtime timeout and exit without having hit the timeout
Given I run the command "cucu run data/features/echo.feature --runtime-timeout 300 --results {CUCU_RESULTS_DIR}/runtime_timeout_results" and save stdout to "STDOUT" and expect exit code "0"
Then I should see the previous step took less than "5" seconds
Then I should see the previous step took less than "8" seconds
And I should see "{STDOUT}" does not contain the following:
"""
runtime timeout reached, aborting run
Expand All @@ -89,7 +89,7 @@ Feature: Run
@runtime-timeout @workers
Scenario: User can run with a runtime timeout and workers and exit without having hit the timeout
Given I run the command "cucu run data/features/tagged_features --workers 2 --runtime-timeout 300 --results {CUCU_RESULTS_DIR}/runtime_timeout_with_workers_results" and save stdout to "STDOUT" and expect exit code "0"
Then I should see the previous step took less than "5" seconds
Then I should see the previous step took less than "8" seconds
And I should see "{STDOUT}" does not contain the following:
"""
runtime timeout reached, aborting run
Expand Down
3 changes: 2 additions & 1 deletion features/cli/run_with_workers.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@runtime-timeout
@workers
Feature: Run with workers
As a developer I want tests to be parallelized using workers and run as
Expand All @@ -7,7 +8,7 @@ Feature: Run with workers
Given I run the command "cucu run data/features/slow_features --results {CUCU_RESULTS_DIR}/slow_features_without_workers" and expect exit code "0"
Then I should see the previous step took more than "15" seconds
When I run the command "cucu run data/features/slow_features --workers 3 --results {CUCU_RESULTS_DIR}/slow_features_with_workers" and expect exit code "0"
Then I should see the previous step took less than "10" seconds
Then I should see the previous step took less than "14" seconds

Scenario: User gets a report even when running with workesr
Given I run the command "cucu run data/features/slow_features --workers 3 --generate-report --report {CUCU_RESULTS_DIR}/generate_report_with_workers_report --results {CUCU_RESULTS_DIR}/generate_report_with_workers_results" and expect exit code "0"
Expand Down
Loading

0 comments on commit 61a9c3c

Please sign in to comment.