Python Pytest

This example project shows how to run Python Pytest with Cloudbeat integration. It’s a simple way to get started with running your tests in the cloud and viewing results in real time.

Installation

If you're starting from scratch, we need to create a python environment inside your project first and activate it

python -m venv env
env\Scripts\activate

Your project stracture should look like this:

In order for Python to know our src folder we need to set the path to src

Now we need to include the CloudBeat modules in our requirements.txt:

To install it, use:

Implementing Cloudbeat Reporting

We need to start by importing the Cloudbeat modules in our confitest.py file:

Then, create a custom config for CloudBeat reporter:

Finally, wrap our driver with the CloudBeat reporter:

To test it locally, we can use several commands:

After the test is finished, you should see a CB_TEST_RESULTS.json file which captured our steps.

Creating a Python Pytest project in Cloudbeat

Coming soon!

Last updated

Was this helpful?