Skip to content

Commit

Permalink
refactor the ccy pages (#2750)
Browse files Browse the repository at this point in the history
* refactor the ccy pages

* fixing broken links

* prettier

* review comments

---------

Co-authored-by: adam-saucelabs <[email protected]>
  • Loading branch information
mikedon and adam-saucelabs authored Apr 30, 2024
1 parent 0a3a11a commit 7c99d7e
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 81 deletions.
2 changes: 1 addition & 1 deletion docs/basics/acct-team-mgmt/adding-deleting-teams.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you are an organization admin, you can create and delete teams and assign con
<img src={useBaseUrl('img/team-mgmt/create-new-team.jpg')} alt="Create new team" width="400"/>

4. In the **TO LINE OF BUSINESS** dropdown, select the line of business the team will be associated with.
5. Under **TEAM VM CONCURRENCY LIMITS**, use the up and down arrows to set the number of concurrent virtual machines that the team can access. For more information about concurrency, see [Concurrency Limits and Team Accounts](/basics/acct-team-mgmt/concurrency-limits).
5. Under **TEAM VM CONCURRENCY LIMITS**, use the up and down arrows to set the number of concurrent virtual machines that the team can access. For more information about concurrency, see [Managing Concurrency](/basics/acct-team-mgmt/concurrency/managing-concurrency).
6. Click **ADD TEAM**.

## Deleting Teams
Expand Down
72 changes: 0 additions & 72 deletions docs/basics/acct-team-mgmt/concurrency-limits.md

This file was deleted.

68 changes: 68 additions & 0 deletions docs/basics/acct-team-mgmt/concurrency/managing-concurrency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
id: managing-concurrency
title: Managing Concurrency
sidebar_label: Managing Concurrency
---

import useBaseUrl from '@docusaurus/useBaseUrl';

Managing your concurrency throughout your organization is an important aspect of administering your Sauce Labs account. We provide multiple options to make it easy for you to optimize your usage and enable your releases to go out smoothly.

#### Setting Parallel Limits in Common Frameworks
The first and foremost way to manage how many concurrent tests to run on Sauce Labs is to use the out of the box mechanisms available in your test framework. For convenience we have included some of the more populare frameworks below but please consult the documentation for your specific framework to learn more.

<Tabs>
<TabItem value="Maven" label="Maven" default>

</TabItem>
<TabItem value="Webdriver" label="webdriver.io" default>

</TabItem>
</Tabs>

#### Usage Reporting & Notifications
Sauce Labs provides you robust mechanisms to inspect your organization's usage. This includes seeing your organization wide usage over time and a team breakdown. To learn more see [Usage Report](/insights/usage-report).

We also provide notification mechanisms to alert you when your organization is reaching its subscription amount. To learn more about these see [Usage Notifications](/insights/usage-report).

#### Team Management

<p><span className="sauceGreen">Enterprise Plans only</span></p>

If your organization has multiple teams sharing a Sauce Labs account, you can use Team Limits to ensure that your organization's concurrency is distributed among different teams.

If you are an org admin, you can view and control your organization's concurrency limits:

1. In Sauce Labs, click **ACCOUNT** and then click **Organization Management**.

<img src={useBaseUrl('img/team-mgmt/team-mgmt-nav.png')} alt="Organization management navigation" width="300"/>

2. On the **Organization Management** page, under the ORGANIZATION NAME box, concurrency limits will be displayed for the selected data center.

3. To view the limits for another data center, in the upper-right corner of the window, click the **DATA CENTER** dropdown and select the relevant data center.

<img src={useBaseUrl('img/team-mgmt/ccy-data-center-dropdown.png')} alt="Data Center dropdown" width="250"/>

4. On the **Organization Management** page, click the **TEAMS** tab. **Team VM Concurrency** and **Peak VM Concurrency** will be displayed for each team in the organization.

<img src={useBaseUrl('img/team-mgmt/ccy-limits-teams.png')} alt="Team concurrency limits" width="600"/>

For more usage information, see [Viewing and Exporting Usage Data](/basics/acct-team-mgmt/viewing-exporting-usage-data/).

5. To allocate concurrency to teams, click on the team name to open the Teams tab.

6. Under the Teams tab, Enter **Team VM Concurrency** and click on Update.

For an example, let's say the organization admin allocates 100 VMs to Team A, which has five members. Since the members of a team share the team's VM limit, the number of concurrent tests being run by the five team members cannot exceed 100. However, concurrency limits cannot be set at the user level, so User A could be running 20 tests, while user B is running 50 tests, and users C, D, and E are running 10 tests each. Or User A could be running 100 tests while Users B, C, D, and E are not running any tests.

#### Concurrency API

In some cases you might want to configure your test framework to dynamically pull real time information about your organization and teams concurrency usage.

You can use the [Get User Concurrency](/dev/api/accounts/#get-user-concurrency) API endpoint to retrieve a specific user's concurrency usage compared with their organization and team concurrency allowances.

```jsx title="Sample Concurrency Request"
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location \
--request GET 'https://api.us-west-1.saucelabs.com/rest/v1.2/users/<username>/concurrency' \
--header 'Content-Type: application/json' \ | json_pp
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
id: understanding-concurrency
title: Understanding Concurrency
sidebar_label: Understanding Concurrency
---

import useBaseUrl from '@docusaurus/useBaseUrl';

Your subscription to the Sauce Labs Virtual Cloud or Real Device Cloud entitles you to run a certain amount of concurrent tests as many times as you like within a given region. In essence, this means you pay for the ability to run at your peak needs and you can run at that as frequently as you like. Your concurrency can be used for both automated and live testing.

## Virtual Cloud Concurrency

Concurrency for the Virtual Cloud is defined at two levels, the organization and the team level.

To view your organizations concurrency limit:

1. In Sauce Labs, click **ACCOUNT** and then click **Organization Management**.

<img src={useBaseUrl('img/team-mgmt/team-mgmt-nav.png')} alt="Organization management navigation" width="300"/>

2. On the **Organization Management** page, under the ORGANIZATION NAME box, concurrency limits will be displayed for the selected data center.

3. To view the limits for another data center, in the upper-right corner of the window, click the **DATA CENTER** dropdown and select the relevant data center.

<img src={useBaseUrl('img/team-mgmt/ccy-data-center-dropdown.png')} alt="Data Center dropdown" width="250"/>

To view the concurrency for a given team

4. On the **Organization Management** page, click the **TEAMS** tab. **Team VM Concurrency** and **Peak VM Concurrency** will be displayed for each team in the organization.

### Exceeding Virtual Cloud Concurrency

The Virtual Cloud is used to run business critical pipelines across large enterprise organizations. This means there will be times when it is difficult to predict exactly how much concurrency you will need at all times. For these situations we allow your organization to exceed it's concurrency limit.

The following table describes the maximum amount you are allowed to exceed your concurrency limit.

| Subscription Amount | % You Can Exceed| Example |
|---------------------------------------|---------|
|1-100| 200%| 50 -> 150|
|101-500|100%|200 -> 400|
|501-2000|50%|1000 -> 1500|
|2001+|10%|2500 -> 2750|

Once your organization attempts to run a test past the maximum amount you can exceed your tests will receive a [You've Exceeding Your Concurrency Limit Error](/dev/error-messages/#youve-exceeded-your-sauce-labs-concurrency-limit)

To learn more about how to manage your concurrency, including setting team limits and receiving usage notifications, please read [Managing Concurrency](/basics/acct-team-mgmt/concurrency/managing-concurrency/)


## Real Device Cloud Concurrency

If your subscription includes access to our Public Real Device Cloud, then your subscription quantity equals the amount of concurrent tests that can be run on Sauce Labs real devices.

To view your organizations concurrency limit:

1. In Sauce Labs, click **ACCOUNT** and then click **Organization Management**.

<img src={useBaseUrl('img/team-mgmt/team-mgmt-nav.png')} alt="Organization management navigation" width="300"/>

2. On the **Organization Management** page, under the ORGANIZATION NAME box, concurrency limits will be displayed for the selected data center.

3. To view the limits for another data center, in the upper-right corner of the window, click the **DATA CENTER** dropdown and select the relevant data center.

<img src={useBaseUrl('img/team-mgmt/ccy-data-center-dropdown.png')} alt="Data Center dropdown" width="250"/>

### Exceeding Real Device Public Cloud Concurrency

If your organization attempts to run more tests than your subscription permits then your tests will be queued until an available concurrency slot becomes available. Your request for a device will queue for up to 15 minutes by default and it can be configured up to a maximum of 30 minutes by adjusting your [Test Configuration Options] (/dev/test-configuration-options).

For example, if you have a Public Real Device Cloud concurrency limit of 5 and you attempt to run 10 tests, 5 of the tests will run immediately and the other 5 will be queued until one of the other tests finishes.

2 changes: 1 addition & 1 deletion docs/basics/acct-team-mgmt/private-device-mgmt.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Private device management allows an organization admin to view and manage the pr
For more information about managing teams, see [Adding and Deleting Teams](/basics/acct-team-mgmt/adding-deleting-teams).

Private devices are not included in VM or RDC concurrency limits.
For more details, please see [Concurrency Limits and Team Accounts](/basics/acct-team-mgmt/concurrency-limits).
For more details, please see [Managing Concurrency](/basics/acct-team-mgmt/concurrency/managing-concurrency).
:::

## Viewing an Organization’s Private Devices
Expand Down
2 changes: 1 addition & 1 deletion docs/basics/acct-team-mgmt/viewing-exporting-usage-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The USAGE widget provides a quick look at the device usage, by test session, for

## Minutes Used vs. Concurrency

One way to tell if you're getting the most efficient use out of your Sauce Labs plan is to compare the minutes used with the number of concurrent tests run during the same period. If the ratio of minutes to concurrency is low, for example, 2:1 (100 minutes:50 concurrent tests), then you are using a lot of minutes to run very few tests. You should redesign your tests to take greater advantage of concurrency. See [Using Frameworks to Run Tests in Parallel](/web-apps/automated-testing/selenium#using-frameworks-to-run-tests-in-parallel) and [Concurrency Limits and Team Accounts](/basics/acct-team-mgmt/concurrency-limits/) for more information.
One way to tell if you're getting the most efficient use out of your Sauce Labs plan is to compare the minutes used with the number of concurrent tests run during the same period. If the ratio of minutes to concurrency is low, for example, 2:1 (100 minutes:50 concurrent tests), then you are using a lot of minutes to run very few tests. You should redesign your tests to take greater advantage of concurrency. See [Using Frameworks to Run Tests in Parallel](/web-apps/automated-testing/selenium#using-frameworks-to-run-tests-in-parallel) and [Understanding Concurrency](/basics/acct-team-mgmt/concurrency/understanding-concurrency) for more information.

## Exporting Usage Data

Expand Down
2 changes: 1 addition & 1 deletion docs/basics/sso/setting-up-sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Users who are created via SSO are placed into the default team.

Organization admins can [assign users to other teams](/basics/acct-team-mgmt/assigning-removing-users-teams).

Additionally, you have the option to limit concurrency, which controls the number of virtual machines available for running tests simultaneously, for newly provisioned accounts. This can be configured in the [default team settings](/basics/acct-team-mgmt/concurrency-limits/).
Additionally, you have the option to limit concurrency, which controls the number of virtual machines available for running tests simultaneously, for newly provisioned accounts. This can be configured in the [default team settings](/basics/acct-team-mgmt/concurrency/managing-concurrency).

#### Usernames

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/cli/saucectl/usage/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ saucectl run --ccy 10

A setting of `10` runs up to 10 test suites at the same time. If the test has more suites than that, excess suites are queued and run in order as currently running suites complete and new slots are available.

When running on Sauce Cloud, the maximum concurrency that you can use is defined by your [account settings](/basics/acct-team-mgmt/concurrency-limits/).
When running on Sauce Cloud, the maximum concurrency that you can use is defined by your [account settings](/basics/acct-team-mgmt/concurrency/understanding-concurrency).

## Sauce Connect

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ See also: [http client](#http-client).

### Concurrency Limit

The maximum number of total Sauce Labs tests -- both automated and manual -- that you can run simultaneously across all user accounts within your organization. Concurrency limits vary according to pricing plan. Once you and/or your teammates have used all concurrency slots, additional tests will not launch until an existing test has finished. More information: [Understanding Concurrency Limits and Team Accounts](/basics/acct-team-mgmt/concurrency-limits).
The maximum number of total Sauce Labs tests -- both automated and manual -- that you can run simultaneously across all user accounts within your organization. Concurrency limits vary according to pricing plan. Once you and/or your teammates have used all concurrency slots, additional tests will not launch until an existing test has finished. More information: [Understanding Concurrency](/basics/acct-team-mgmt/concurrency/understanding-concurrency).

### Continuous Deployment (CD)

Expand Down
Loading

0 comments on commit 7c99d7e

Please sign in to comment.