Skip to main content

Contains the common types and API client for CloudBeat

Project description

CloudBeat Python Integrations

CloudBeat logo

Release Status Downloads

Learn more about CloudBeat at https://cloudbeat.io/

~ 🧾 Documentation – official documentation for CloudBeat
~ 🙋🏻 Contact and Support – contact us and we'd love to help
~ 📣 Blog – stay updated with our latest news
~ 💻 Demo – request a demo


Quick start

Make sure your requirements.txt includes:

cloudbeat-pytest
cloudbeat-selenium

Standard Installation

cd pytest-selenium
python -m venv env
env\Scripts\activate
pip install -r requirements.txt

Installation using UV

uv venv
uv pip install -r requirements.txt

Set up CloudBeat reporter in confitest.py

import uuid

import pytest
from selenium import webdriver
from cloudbeat_common.models import CbConfig
from cloudbeat_common.reporter import CbTestReporter
from cloudbeat_selenium.wrapper import CbSeleniumWrapper


@pytest.fixture(scope="module")
def cb_config():
    """Prepare configuration class for further CB reporter initialization."""
    config = CbConfig()
    config.run_id = str(uuid.uuid4())
    config.instance_id = str(uuid.uuid4())
    config.project_id = str(uuid.uuid4())
    config.capabilities = {"browserName": "chrome"}
    return config


@pytest.fixture(scope="module")
def cb_reporter(cb_config):
    reporter = CbTestReporter(cb_config)
    return reporter


@pytest.fixture()
def setup(cb_reporter):
    driver = webdriver.Chrome()
    wrapper = CbSeleniumWrapper(cb_reporter)
    wrapped_driver = wrapper.wrap(driver)
    yield wrapped_driver
    driver.quit()

Set python src path if necessary

set PYTHONPATH=src

Run your tests

Standard

cd pytest-selenium
env\Scripts\activate

All tests

pytest 

Parallel tests

pytest -n 4

Single test

pytest -v -s Tests/test_login.py 

Using UV

uv run pytest # run all tests
uv run pytest -n 4 # run parallel tests
uv run pytest -v -s Tests/test_login.py # run a single test

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

cloudbeat_common-1.0.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

cloudbeat_common-1.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file cloudbeat_common-1.0.2.tar.gz.

File metadata

  • Download URL: cloudbeat_common-1.0.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for cloudbeat_common-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ebfcb29c7a6a556f518c56d7d56a01a491e391c742070e5690b8ce44260c5d4e
MD5 04186e3c4e9cda9bd51744d1f6dee008
BLAKE2b-256 feba373697682e62c3bddbc46dd3fb4ce48eb204f81e9a8d19bd922d84e21857

See more details on using hashes here.

File details

Details for the file cloudbeat_common-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudbeat_common-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7cbd2fb6b80e837b86d06ba95b26ef1f4dc90a3c3b355ed3a9c7fa90ca0a8186
MD5 d7071aa8dd6ce96fad96db71c9040b7a
BLAKE2b-256 629ea88498df8d6b4ec90bb07357ad11300e327a58f4761df518098a058945c6

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