I have a problem with Gitlab Ci. I'm completely green at this. I have run a test that works fine locally.(python 3.8) After placing Ci in gitlab - unfortunately it is not so colorful anymore. I admit that I still do not know anything about topics such as Docker
This is my .gitlab-ci.yml :
stages:
- test
e2e:chrome:
services:
- selenium/standalone-chrome
before_script:
- python -V
- python3 -m pip install pytest
- python3 -m pip install selenium pytest
- python3 -m pip install webdriver_manager
- python3 -m pip install allure-pytest
script:
- python -m pytest Tvn24_Tests/Login_By_Facebook_Test.py
I get Error :
ERROR at setup of Test_Log_in.test_Facebook_login_method_Passed ________
request = <SubRequest 'setup' for <Function test_Facebook_login_method_Passed>>
@pytest.fixture()
def setup(request):
options = Options()
options.page_load_strategy = 'normal'
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
Tvn24_Tests/conftest.py:13:
/usr/local/lib/python3.9/site-packages/webdriver_manager/chrome.py:25: in __init__
self.driver = ChromeDriver(name=name,
/usr/local/lib/python3.9/site-packages/webdriver_manager/driver.py:54: in __init__
self.browser_version = chrome_version(chrome_type)
Tis is original script :
import pytest
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
import allure
@pytest.fixture()
def setup(request):
options = Options()
options.page_load_strategy = 'normal'
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
request.cls.driver = driver
driver.maximize_window()
yield
driver.quit()
Question
Is there any simple instruction to create this yml file in the form:
- Install all plugins (Pytest, selenium, chrome, allure) 2.Perform the test in Pytest