Package pytest_auto :: Module yp_auto
[hide private]
[frames] | no frames]

Module yp_auto

source code

Pytest plugin with commonly used fixtures

Functions [hide private]
 
tlib_logger(request)
Returns logger with name tlib.
source code
 
adb_logger(request)
Returns logger with name adb
source code
 
test_logger(request)
Returns logger that can be used to log test information
source code
 
pytest_addoption(parser)
Options supported by pytest selenium plug-in
source code
 
base_url(request, tlib_logger)
Returns value of --base_url command line parameter
source code
 
environment_config(request, tlib_logger)
Returns configuration for the environment specified in the --environment command line parameter This function will try to find a file config\config.ini on the current folder or on the parents, up to two levels up.
source code
Variables [hide private]
  __package__ = 'pytest_auto'
Function Details [hide private]

tlib_logger(request)

source code 

Returns logger with name tlib.

This logger should only be used by TLib modules. To log from a test or test module use test_logger

Logger will get flushed at the end to ensure data is not lost if tests exit abnormally

Decorators:
  • @pytest.fixture(scope= 'class')

adb_logger(request)

source code 

Returns logger with name adb

This logger should only be used by TLib modules interacting with ADB.

To log from a test or test module use test_logger

Logger will get flushed at the end to ensure data is not lost if tests exit abnormally

Decorators:
  • @pytest.fixture(scope= 'class')

test_logger(request)

source code 

Returns logger that can be used to log test information

Logger will get flushed at the end to ensure data is not lost if tests exit abnormally

Decorators:
  • @pytest.fixture(scope= 'class')

base_url(request, tlib_logger)

source code 

Returns value of --base_url command line parameter

Decorators:
  • @pytest.fixture(scope= "class")

environment_config(request, tlib_logger)

source code 

Returns configuration for the environment specified in the --environment command line parameter
This function will try to find a file config\config.ini on the current folder or on the parents,
up to two levels up.

This fixture returns a dict like this:
{
    'mysql_host': 'db.ci.qa.ypg.com',
    'mysql_user': 'ci',
    'mysql_passwd': '21345'
}

@rtype dict

Decorators:
  • @pytest.fixture(scope= "class")