Skip to content

Commit 760cbce

Browse files
Merge pull request #7 from applitools/redevelop
Redevelop
2 parents 4bb10b3 + 1298d87 commit 760cbce

File tree

9 files changed

+350
-222
lines changed

9 files changed

+350
-222
lines changed

.github/workflows/codeql-analysis.yml

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

.github/workflows/tests.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
1-
name: CI
1+
name: Run all tests
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ main ]
8+
workflow_dispatch:
89

910
env:
1011
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
12+
HEADLESS: true
1113

1214
jobs:
1315
test:
1416
runs-on: ubuntu-latest
1517

1618
steps:
19+
- name: Check out code
20+
uses: actions/checkout@v2
1721

18-
- uses: actions/checkout@v2
19-
20-
- uses: actions/setup-python@v2
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
2124
with:
2225
python-version: '3.x'
2326

24-
- name: Install Python package dependencies
27+
- name: Install dependencies
2528
run: pip3 install -r requirements.txt
2629

27-
- name: Run the tests
28-
run: pytest ultrafastgrid_tutorial.py
30+
- name: Execute tests
31+
run: python3 -m pytest -s -v tests

.github/workflows/updates.yml

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

.gitignore

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,135 @@
1-
__pycache__
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
# macOS
132+
.DS_Store
133+
134+
# Editors
135+
.vscode/

README.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,45 @@
1-
# Applitools Tutorial - Selenium Python Ultrafast Grid
1+
# Applitools Tutorial: Selenium Python pytest with the Ultrafast Grid
22

3-
Get started with Applitools Eyes visual testing with this example of using Selenium Python and the [Eyes Selenium Python SDK](https://applitools.com/docs/api/eyes-sdk/index-gen/classindex-selenium-python_sdk4.html).
3+
This is the example project for the [Selenium Python pytest tutorial](https://applitools.com/tutorials/quickstart/web/selenium/python).
4+
It shows how to start automating visual tests
5+
with [Applitools Eyes](https://applitools.com/platform/eyes/)
6+
and the [Ultrafast Grid](https://applitools.com/platform/ultrafast-grid/)
7+
using [Selenium](https://www.selenium.dev/) in Python.
48

5-
Learn more about how to install and start this project with our [Selenium Python tutorial](https://applitools.com/tutorials/selenium-python.html)!
9+
It uses:
610

7-
<https://applitools.com/tutorials/selenium-python.html>
11+
* [Python](https://www.python.org/) as the programming language
12+
* [Selenium WebDriver](https://www.selenium.dev/) for browser automation
13+
* [pytest](https://docs.pytest.org/) as the core test framework
14+
* [Google Chrome](https://www.google.com/chrome/downloads/) as the local browser for testing
15+
* [pip](https://packaging.python.org/en/latest/tutorials/installing-packages/) for dependency management
16+
* [Applitools Eyes](https://applitools.com/platform/eyes/) for visual testing
17+
* [Applitools Ultrafast Grid](https://applitools.com/platform/ultrafast-grid/) for cross-browser execution
818

9-
## More Information
19+
To run this example project, you'll need:
1020

11-
Learn more about Applitools [Eyes](https://info.applitools.com/ucY77) and the [Ultrafast Test Cloud](https://info.applitools.com/ucY78) at [applitools.com](https://info.applitools.com/ucY76).
21+
1. An [Applitools account](https://auth.applitools.com/users/register), which you can register for free
22+
2. A recent version of [Python 3](https://www.python.org/)
23+
3. A good Python editor like [Visual Studio Code](https://code.visualstudio.com/docs/languages/python)
24+
or [PyCharm](https://www.jetbrains.com/pycharm/).
25+
4. An up-to-date version of [Google Chrome](https://www.google.com/chrome/downloads/).
26+
5. A corresponding version of [ChromeDriver](https://chromedriver.chromium.org/downloads).
1227

13-
More about the Eyes Images SDK:
14-
* https://applitools.com/docs/api/eyes-sdk/index-gen/classindex-selenium-python_sdk4.html
28+
To install dependencies, run:
29+
30+
```
31+
pip install -r requirements.txt
32+
```
33+
34+
The main test case spec is [`test_acme_bank.py`](tests/test_acme_bank.py).
35+
36+
To execute tests, set the `APPLITOOLS_API_KEY` environment variable
37+
to your [account's API key](https://applitools.com/tutorials/getting-started/setting-up-your-environment.html),
38+
and then run:
39+
40+
```
41+
python3 -m pytest -s -v tests
42+
```
43+
44+
**For full instructions on running this project, take our
45+
[Selenium Python pytest tutorial](https://applitools.com/tutorials/quickstart/web/selenium/python)!**

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
webdriver-manager>=3.5.1
2-
eyes-selenium>=4.25.2
3-
pytest>=6.2.5
1+
eyes-selenium==5.11.0
2+
pytest==7.1.3

0 commit comments

Comments
 (0)