loadero_python.resources.project module

Loadero project resource.

Project resource is seperated into three parts

ProjectParams class describes projects attributes

ProjectAPI class groups all API operations related to projects.

Project class combines ProjectParams and ProjectAPI.

Single Project object coresponds to single project in Loadero.

class loadero_python.resources.project.PlanLimitsParams[source]

Bases: LoaderoResourceParams

PlanLimitsParams describes Loadero subscription plan limitations.

property api_access: bool

Is API access allowed.

Returns:

bool: Is API access allowed.

property assert_preconditions_access: bool

Is assert preconditions access allowed.

Returns:

bool: Is assert preconditions access allowed.

property aws_access: bool

Is AWS access allowed.

Returns:

bool: Is AWS access allowed.

property browsers: list[Browser]

Allowed browsers.

Returns:

list[Browser]: Allowed browsers.

property compute_units: list[ComputeUnit]

Allowed compute units.

Returns:

list[ComputeUnit]: Allowed compute units.

property included_compute_units: int

Included compute units.

Returns:

int: Included compute units.

property included_test_duration: str

Included test duration.

Returns:

str: Included test duration.

property locations: list[Location]

Allowed test locations.

Returns:

list[Location]: Allowed test locations.

property max_monthly_cu: int

Maximum allowed compute unit usage per month.

Returns:

int: Maximum allowed compute unit usage per month.

property max_test_cu: int

Maximum allowed test compute unit.

Returns:

int: Maximum allowed test compute unit.

property max_test_duration: str

Maximum allowed test duration.

Returns:

str: Maximum allowed test duration.

property mos_enabled: bool

Are mean opinion score tests enabled.

Returns:

bool: Are mean opinion score tests enabled.

property plan_duration: str

Plan duration.

Returns:

str: Plan duration.

property session_recording_access: bool

Is session recording access allowed.

Returns:

bool: Is session recording access allowed.

class loadero_python.resources.project.Project[source]

Bases: LoaderoResource

Project class allows read information about the project that the API client is configured for. APIClient must be previously initialized with a valid Loadero access token.

files(query_params: QueryParams | None = None) tuple[list[File], PaginationParams, dict[any, any]][source]

Read all files in the project.

Args:

query_params (QueryParams, optional): Describes query parameters

Raises:

APIException: If API call fails.

Returns:

list[File]: List of files.

PaginationParams: Pagination parameters of request.

dict[any, any]: Filters applied to in request.

read() Project[source]

Reads information about project.

Raises:

APIException: If API call fails.

Returns:

Assert: Read assert resource.

runs(query_params: QueryParams | None = None) Tuple[List[Run], PaginationParams, Dict[any, any]][source]

Read all runs in the project.

Args:

query_params (QueryParams, optional): Describes query parameters

Raises:

APIException: If API call fails.

Returns:

list[Run]: List of runs.

PaginationParams: Pagination parameters of request.

dict[any, any]: Filters applied to in request.

tests(query_params: QueryParams | None = None) tuple[list[Test], PaginationParams, dict[any, any]][source]

Read all tests in the project.

Args:

query_params (QueryParams, optional): Describes query parameters

Raises:

APIException: If API call fails.

Returns:

list[Test]: List of tests.

PaginationParams: Pagination parameters of request.

dict[any, any]: Filters applied to in request.

class loadero_python.resources.project.ProjectAPI[source]

Bases: object

ProjectAPI defines Loadero API operations for project resource.

static read() ProjectParams[source]

Read an existing project resource that the API Client is configured too

Raises:

APIException: If API call fails.

Returns:

ProjectParams: Read project resource params.

class loadero_python.resources.project.ProjectComputeUnitUsageParams[source]

Bases: LoaderoResourceParams

ProjectComputeUnitUsageParams describes compute unit usage for a single project.

property included: int

Compute unit included in the project.

Returns:

int: Compute unit included in the project.

property used: int

Compute unit used in the project.

Returns:

int: Compute unit used in the project.

class loadero_python.resources.project.ProjectParams[source]

Bases: LoaderoResourceParams

ProjectParams represents Loadero project resource attributes.

property account_role: MemberRole

Account role in the project.

Returns:

MemberRole: Account role in the project.

property aws_info_id: str

AWS info ID.

Returns:

str: AWS info ID.

property compute_unit_usage: ProjectComputeUnitUsageParams

Compute unit usage statistics.

Returns:

ProjectComputeUnitUsageParams: Compute unit usage statistics.

property created: datetime

Time when project was created.

Returns:

datetime: Time when project was created.

property language: Language

Test script programming language.

Returns:

Language: Test script programming language.

property member_count: int

Number of members in the project.

Returns:

int: Number of members in the project.

property name: str

Project name.

Returns:

str: Project name.

property plan_limits: PlanLimitsParams

Plan limits.

Returns:

PlanLimitsParams: Plan limits.

property project_id: str

Project ID.

Returns:

str: Project ID.

property subscription: SubscriptionParams

Subscription.

Returns:

SubscriptionParams: Subscription.

property subscription_id: str

Subscription ID.

Returns:

str: Subscription ID.

property trial_expired: bool

Whether project trial period has expired.

Returns:

bool: Whether project trial period has expired.

property updated: datetime

Time when project was last updated.

Returns:

datetime: Time when project was last updated.

class loadero_python.resources.project.SubscriptionParams[source]

Bases: LoaderoResourceParams

SubscriptionParams describes Loadero subscription.

property activation_date: datetime

Time when subscription was activated.

Returns:

datetime: Time when subscription was activated.

property billing_email: str

Billing email of subscription.

Returns:

str: Billing email of subscription.

property created: datetime

Time when subscription was created.

Returns:

datetime: Time when subscription was created.

property payment_plan: PaymentPlan

Payment plan of subscription.

Returns:

PaymentPlan: Payment plan of subscription.

property payment_status: PaymentStatus

Payment status of subscription.

Returns:

PaymentStatus: Payment status of subscription.

property settings: SubscriptionSettingsParams

Subscription settings.

Returns:

SubscriptionSettingsParams: Subscription settings.

property subscription_id: str

Subscription ID.

Returns:

str: Subscription ID.

property updated: datetime

Time when subscription was last updated.

Returns:

datetime: Time when subscription was last updated.

class loadero_python.resources.project.SubscriptionSettingsParams[source]

Bases: LoaderoResourceParams

SubscriptionSettingsParams describes Loadero subscription settings.

property max_monthly_cu: int

Maximum allowed compute unit usage per month.

Returns:

int: Maximum allowed compute unit usage per month.

property max_participant_cu: ComputeUnit

Maximum allowed compute unit for a participant.

Returns:

ComputeUnit: Maximum allowed compute unit for a participant.

property max_test_cu: int

Maximum allowed compute unit usage per test.

Returns:

int: Maximum allowed compute unit usage per test.

property max_test_duration: TestDuration

Maximum allowed test duration.

Returns:

TestDuration: Maximum allowed test duration.

property mos_enabled: bool

Are mean opinion score tests enabled.

Returns:

bool: Are mean opinion score tests enabled.