Skip to content

Commit 13c62d7

Browse files
author
dmy.berezovskyi
committed
added poetry
updated docs moved pytest and project configuratuion to pyproject.toml updated jobs
1 parent 30401b5 commit 13c62d7

File tree

9 files changed

+88
-62
lines changed

9 files changed

+88
-62
lines changed

.github/workflows/lint.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ jobs:
2121
with:
2222
python-version: "3.10"
2323

24-
- name: Install dependencies
24+
- name: Install Poetry
2525
run: |
2626
python -m pip install --upgrade pip
27-
pip install -r requirements.txt
28-
pip install ruff
27+
pip install poetry
28+
29+
- name: Install dependencies with Poetry
30+
run: |
31+
poetry install
2932
3033
- name: Run Linting
3134
run: |
32-
ruff check .
35+
poetry run ruff check .

.github/workflows/run_tests.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,23 @@ jobs:
3333
echo "Chrome is already installed"
3434
fi
3535
36-
- name: Install dependencies
36+
- name: Install Poetry
3737
run: |
3838
python -m pip install --upgrade pip
39-
pip install -r requirements.txt
40-
pip install --upgrade pytest pytest-html
39+
pip install poetry
40+
41+
- name: Install dependencies with Poetry
42+
run: |
43+
poetry install
4144
4245
- name: Run tests
4346
run: |
44-
python -m pytest --verbose --junit-xml=test-results.xml
47+
poetry run pytest --verbose --junit-xml=test-results.xml
4548
4649
- name: Publish Test Report
4750
uses: mikepenz/action-junit-report@v3
4851
if: success() || failure()
4952
with:
5053
report_paths: '**/test-results.xml'
5154
detailed_summary: true
52-
include_passed: true
55+
include_passed: true

.idea/modules.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/simple-python-selenium-framework.iml

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ This is a simple UI automation framework built with:
3030

3131
1. Clone this repository
3232
2. Install required dependencies with
33-
```pip install -r requirements.txt```
33+
```shell
34+
pip install poetry
35+
poetry shell
36+
poetry install
37+
pip install -r requirements.txt
38+
```
3439
3. Create .env file and add
3540
4. Download driver to resources directory:
3641
- rename chromedriver to local if you want to run tests locally

pyproject.toml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[tool.poetry]
2+
name = "simple-framework"
3+
version = "0.1.3"
4+
description = "SIMPLE Python selenium framework"
5+
authors = ["Dmytro Berezovskyi"]
6+
readme = "README.md"
7+
packages = [
8+
{ include = "utils" },
9+
{ include = "scraper" },
10+
{ include = "driver" },
11+
]
12+
[tool.poetry.dependencies]
13+
python = "^3.12"
14+
pytest = "8.3.2"
15+
PyYAML = "^6.0.1"
16+
selenium = "4.24.0"
17+
webdriver-manager = "4.0.2"
18+
python-dotenv = "1.0.1"
19+
asyncio = "3.4.3"
20+
aioselenium = "0.0.1"
21+
pytest-xdist="3.3.1"
22+
cryptography="43.0.1"
23+
beautifulsoup4="4.12.2"
24+
requests="^2.31.0"
25+
setuptools="70.0.0"
26+
ruff="0.6.8"
27+
28+
29+
[tool.pytest.ini_options]
30+
addopts = "-rA -v --env=dev --type=local --capture=no -p no:cacheprovider"
31+
markers = [
32+
{ name = "smoke", description = "run smoke tests" },
33+
{ name = "regression", description = "run regression tests" },
34+
{ name = "sanity", description = "run sanity tests" }
35+
]
36+
testpaths = ["tests"]
37+
python_files = ["*.py"]
38+
python_classes = [
39+
"Test*",
40+
"*Test*",
41+
"*Test",
42+
"*Tests",
43+
"*Suite"
44+
]
45+
python_functions = ["test_*"]
46+
47+
junit_family = "legacy"
48+
junit_suite_name = "Selenium UI suite"
49+
filterwarnings = [
50+
"error",
51+
"ignore::UserWarning",
52+
"ignore::pytest.PytestUnknownMarkWarning",
53+
"ignore::DeprecationWarning",
54+
"ignore::ResourceWarning",
55+
"ignore::FutureWarning",
56+
"ignore::PendingDeprecationWarning"
57+
]
58+
59+
[tool.pytest.config]
60+
type = ["local", "firefox", "remote"] # Define a custom command line option for driver types as a list

pytest.ini

Lines changed: 0 additions & 32 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)