Skip to main content

Pytest plugin and fixtures for WGC QA framework

Project description

wgc-runner

Pytest plugin and fixtures for running WGC QA tests. Manages the full test lifecycle: build download, mock server startup, WGC installation, test execution, artifact collection.

Pytest Plugin

Registered as wgc_plugin via pytest11 entry point. Activated automatically when installed.

CLI Options

py.test tests/ \
  --wgc "\\share\builds\wgc\latest" \
  --wgc-build "12345" \
  --wgc-branch "release/1.0" \
  --wgc-arch "x64" \
  --wgc-publisher "wargaming" \
  --video-capture \
  --no-sanity-check
Option Description
--wgc Path to WGC build on shared drive
--wgc-build Build number
--wgc-branch Git branch
--wgc-arch Architecture: win32 or x64
--wgc-publisher Publisher: wargaming, steam, qihoo
--video-capture Enable screen recording for each test
--no-sanity-check Skip WGC sanity check before test session
--testrail Enable TestRail reporting

Lifecycle Hooks

Hook What it does
pytest_cmdline_main Download WGC build, start mock server, install WGC
pytest_configure Initialize TestRail API, setup config
pytest_runtest_setup Prepare environment before each test
pytest_runtest_teardown Crash detection, collect logs/video/screenshots, terminate WGC
pytest_collection_modifyitems Auto-assign folder_* markers by test directory

Key Features

  • Auto build download from shared drive
  • Mock server startup/shutdown around test session
  • Video recording — each test recorded via OpenCV
  • Crash detection — automatic WGC crash check after every test
  • Sanity check — WGC startup verification before test session
  • Artifact upload — logs, video, screenshots uploaded to share
  • Auto markersfolder_arsenal_login1, folder_game_install2, etc.

Fixtures

All fixtures are session or function-scoped and available automatically:

Fixture Scope Provides
wgc_client session WGCClient instance
config session WGCConfig instance
wgc_settings session WGCSettingsHelper
fake_games session FakeGamesHelper
os_helper session OSHelper
registry session RegistryHelper
browser session BrowserHelper
screen session ScreenHelper
firewall session FireWallHelper
encrypt session EncryptHelper
cmd_helper session CmdHelper
event_listener session EventHelper
wgc_installer session WGCInstaller
wgc_uninstaller session WGCUninstaller
soft_assert function SoftAssert
wgni_users_db session WGNIUsersDB

Arsenal Fixtures

Additional fixtures for Arsenal UI tests (shop, products, billing):

def test_buy_item(arsenal_shop_page, arsenal_product_list):
    # arsenal_shop_page and arsenal_product_list are auto-configured
    arsenal_shop_page.open_product(arsenal_product_list[0])

Install

pip install wgc-runner

This will pull all WGC packages transitively.

Dependencies

All WGC packages + pytest>=7.0, pytest-timeout, pyhamcrest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wgc_runner-4.0.2.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wgc_runner-4.0.2-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file wgc_runner-4.0.2.tar.gz.

File metadata

  • Download URL: wgc_runner-4.0.2.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for wgc_runner-4.0.2.tar.gz
Algorithm Hash digest
SHA256 b46052745b756df496ed1f09b36d124ba5000d0afbddeddbc4d99408ec3ff3f3
MD5 2ddb16dcece9b30bacc29f8c619be875
BLAKE2b-256 70c26ce315a5ac229b20c3d9ff2c44b540a24e5169af8c01db138e530bd16869

See more details on using hashes here.

File details

Details for the file wgc_runner-4.0.2-py3-none-any.whl.

File metadata

  • Download URL: wgc_runner-4.0.2-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for wgc_runner-4.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68144f2561c4380bc3dbf0994c4a25a0732d5e818c193499cd480f6b01677f1c
MD5 4e5e97e91608767eafbb72842e4004fc
BLAKE2b-256 59a91c588dfc8b3d84b1d271c721e21bee2a5e864a7983a0cdce051c59933e32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page