steps.api.cloud =============== .. py:module:: steps.api.cloud Classes ------- .. autoapisummary:: steps.api.cloud.Cloud Module Contents --------------- .. py:class:: Cloud(users_path: str, config: dict, context: steps.api.utils.CloudContextHandler) Cloud class for managing cloud resources during testing. This class provides functionality for initializing test resources, managing users, platforms and jobs for QA automation. :param users_path: Path to the CSV file containing user information :param config: Configuration dictionary with environment variables :param context: CloudContextHandler instance for making API requests .. py:attribute:: temp .. py:attribute:: environnement .. py:attribute:: admin .. py:method:: admin_initialise(context: steps.api.utils.CloudContextHandler) Initialize the admin user with necessary tokens. Logs in as admin, finds admin's user ID, removes existing job tokens, and creates new tokens for test execution. :param context: CloudContextHandler instance for making API requests .. py:method:: initialise(context: steps.api.utils.CloudContextHandler) Initialize the complete test environment. Sets up admin, clears previous test data, creates test platforms and users, and creates a simple job for testing. :param context: CloudContextHandler instance for making API requests .. py:method:: create_platform(context: steps.api.utils.CloudContextHandler) Create a default test platform for testing. Creates and registers a platform with the default QA name and assigns it to the company if not in light version mode. :param context: CloudContextHandler instance for making API requests .. py:method:: delete_platforms(context: steps.api.utils.CloudContextHandler) Delete all QA test platforms. Removes all platforms with names containing ":qa" to clean up test resources. :param context: CloudContextHandler instance for making API requests .. py:method:: load_users(users_path: str, context: steps.api.utils.CloudContextHandler) Load user information from a CSV file. Reads user data from the CSV file, creates User objects with generated email and password data, and adds them to the users list. :param users_path: Path to the CSV file containing user information :param context: CloudContextHandler instance for context information .. py:method:: delete_users(context) Delete test users from the cloud system. Finds and deletes all users from the cloud system that match the test users loaded from the CSV file. :param context: CloudContextHandler instance for making API requests .. py:method:: create_users(context) Create test users in the cloud system. Creates users in the cloud, assigns them to the default platform, logs them in, creates job tokens, and assigns tokens to the platform. :param context: CloudContextHandler instance with users_nb_to_create setting .. py:method:: clear(context: steps.api.utils.CloudContextHandler) Clear existing test resources from the cloud system. Removes all test users and platforms to ensure a clean environment. :param context: CloudContextHandler instance for making API requests