Skip to main content

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 markers — folder_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

Metadata

Release files for wgc-runner 4.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wgc-runner 4.0.2
File Size Uploaded
wgc_runner-4.0.2.tar.gz 23.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wgc-runner 4.0.2
File Interpreter ABI Platform
wgc_runner-4.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 53.1 kB

Release files / wgc_runner-4.0.2.tar.gz

Download URL wgc_runner-4.0.2.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b46052745b756df496ed1f09b36d124ba5000d0afbddeddbc4d99408ec3ff3f3
BLAKE2b-256 checksum
How to use checksums
70c26ce315a5ac229b20c3d9ff2c44b540a24e5169af8c01db138e530bd16869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / wgc_runner-4.0.2-py3-none-any.whl

Download URL wgc_runner-4.0.2-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68144f2561c4380bc3dbf0994c4a25a0732d5e818c193499cd480f6b01677f1c
BLAKE2b-256 checksum
How to use checksums
59a91c588dfc8b3d84b1d271c721e21bee2a5e864a7983a0cdce051c59933e32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

4.0.2 This release

2 release files

4.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page