locust-cloud 1.24.3.dev8__tar.gz → 1.24.3.dev10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/.github/workflows/daily-check.yml +1 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/PKG-INFO +1 -1
- locust_cloud-1.24.3.dev10/tests/url_tester.py +129 -0
- locust_cloud-1.24.3.dev8/tests/url_tester.py +0 -49
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/.github/workflows/tests.yml +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/.gitignore +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/.pre-commit-config.yaml +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/.vscode/extensions.json +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/.vscode/launch.json +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/.vscode/settings.json +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/LICENSE +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/README.md +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/__init__.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/actions.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/apisession.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/args.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/cloud.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/common.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/docs/.gitignore +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/docs/1-first-run.rst +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/docs/2-examples.rst +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/docs/images/locust-cloud-screenshot.png +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/docs/locust-cloud.rst +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/input_events.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/web_login.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locust_cloud/websocket.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/locustfile.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/pyproject.toml +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/testdata/extra-files/extra.txt +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/testdata/extra-package/example/__init__.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/testdata/extra-package/setup.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/testdata/requirements.txt +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/tests/args_test.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/tests/cloud_test.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/tests/web_login_test.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/tests/websocket_test.py +0 -0
- {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/uv.lock +0 -0
@@ -72,6 +72,7 @@ jobs:
|
|
72
72
|
env:
|
73
73
|
LOCUSTCLOUD_USERNAME: ${{ secrets.LOCUSTCLOUD_USERNAME }}
|
74
74
|
LOCUSTCLOUD_PASSWORD: ${{ secrets.LOCUSTCLOUD_PASSWORD }}
|
75
|
+
HEADLESS: 1
|
75
76
|
- name: On failure, notify slack
|
76
77
|
if: failure()
|
77
78
|
run: curl -d "{\"text\":\"<!channel> Failed url test run $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\"}" $SLACK_NOTIFICATIONS_WEBHOOK
|
@@ -0,0 +1,129 @@
|
|
1
|
+
import os
|
2
|
+
import time
|
3
|
+
|
4
|
+
import pytest
|
5
|
+
import requests
|
6
|
+
from playwright.sync_api import expect, sync_playwright
|
7
|
+
|
8
|
+
HEADLESS = bool(os.environ.get("HEADLESS", False))
|
9
|
+
|
10
|
+
|
11
|
+
def test_login_and_dashboard_actions():
|
12
|
+
with sync_playwright() as p:
|
13
|
+
browser = p.chromium.launch(headless=HEADLESS)
|
14
|
+
context = browser.new_context(viewport={"width": 1280, "height": 1000})
|
15
|
+
page = context.new_page()
|
16
|
+
|
17
|
+
page.goto("http://auth.dev.locust.cloud")
|
18
|
+
|
19
|
+
page.fill('input[name="email"]', os.environ["LOCUSTCLOUD_USERNAME"])
|
20
|
+
page.fill('input[name="password"]', os.environ["LOCUSTCLOUD_PASSWORD"])
|
21
|
+
|
22
|
+
page.click('button[type="submit"]')
|
23
|
+
time.sleep(10)
|
24
|
+
|
25
|
+
# skip dashboard tutorial
|
26
|
+
page.get_by_text("Skip").click()
|
27
|
+
|
28
|
+
with context.expect_page() as url_test_page_info:
|
29
|
+
page.get_by_text("Run in Browser").click()
|
30
|
+
|
31
|
+
url_test_page = url_test_page_info.value
|
32
|
+
url_test_page.wait_for_load_state()
|
33
|
+
|
34
|
+
# skip locust tutorial
|
35
|
+
url_test_page.get_by_text("Skip").click()
|
36
|
+
|
37
|
+
# Select the mock target class for this test run
|
38
|
+
url_test_page.get_by_text("Mock Target").click()
|
39
|
+
|
40
|
+
button = url_test_page.locator("button[type='submit']")
|
41
|
+
expect(button).to_be_enabled(timeout=45000)
|
42
|
+
button.click()
|
43
|
+
|
44
|
+
# Let the test run
|
45
|
+
time.sleep(10)
|
46
|
+
|
47
|
+
# Stop the test
|
48
|
+
url_test_page.get_by_text("Stop").click()
|
49
|
+
|
50
|
+
# Wait for the test to have stopped and the new button to appear
|
51
|
+
button = url_test_page.locator('button:has-text("New")')
|
52
|
+
button.wait_for(state="visible", timeout=10000)
|
53
|
+
|
54
|
+
browser.close()
|
55
|
+
|
56
|
+
|
57
|
+
def test_signup(region):
|
58
|
+
with sync_playwright() as p:
|
59
|
+
browser = p.chromium.launch(headless=HEADLESS)
|
60
|
+
context = browser.new_context(viewport={"width": 1280, "height": 1000})
|
61
|
+
page = context.new_page()
|
62
|
+
|
63
|
+
page.goto("http://auth.locust.cloud/signup")
|
64
|
+
|
65
|
+
# sleeps are to avoid getting flagged by recaptcha
|
66
|
+
page.fill('input[name="email"]', f"andrew+{region}_signup_test@locust.cloud")
|
67
|
+
time.sleep(1)
|
68
|
+
page.fill('input[name="customer_name"]', f"{region} signup test")
|
69
|
+
time.sleep(1)
|
70
|
+
page.fill('input[name="company_name"]', f"{region} signup test")
|
71
|
+
time.sleep(1)
|
72
|
+
page.select_option('select[name="region"]', region)
|
73
|
+
time.sleep(1)
|
74
|
+
page.fill('input[name="password"]', os.environ["LOCUSTCLOUD_PASSWORD"])
|
75
|
+
time.sleep(1)
|
76
|
+
page.check('input[name="consent"]')
|
77
|
+
time.sleep(1)
|
78
|
+
page.click('button[type="submit"]')
|
79
|
+
time.sleep(10)
|
80
|
+
|
81
|
+
# allow verification code to be manually entered
|
82
|
+
page.wait_for_selector("text=Select a Plan", timeout=80000)
|
83
|
+
page.get_by_text("Continue with Free Tier").click()
|
84
|
+
|
85
|
+
id_token = next((cookie.get("value") for cookie in context.cookies() if cookie.get("name") == "id_token"), None)
|
86
|
+
|
87
|
+
# skip dashboard tutorial
|
88
|
+
page.get_by_text("Skip").click()
|
89
|
+
|
90
|
+
with context.expect_page() as url_test_page_info:
|
91
|
+
page.get_by_text("Run in Browser").click()
|
92
|
+
|
93
|
+
url_test_page = url_test_page_info.value
|
94
|
+
url_test_page.wait_for_load_state()
|
95
|
+
|
96
|
+
# skip locust tutorial
|
97
|
+
url_test_page.get_by_text("Skip").click()
|
98
|
+
|
99
|
+
# Select the mock target class for this test run
|
100
|
+
url_test_page.get_by_text("Mock Target").click()
|
101
|
+
|
102
|
+
button = url_test_page.locator("button[type='submit']")
|
103
|
+
expect(button).to_be_enabled(timeout=80000)
|
104
|
+
button.click()
|
105
|
+
|
106
|
+
# Let the test run
|
107
|
+
time.sleep(30)
|
108
|
+
|
109
|
+
# Stop the test
|
110
|
+
url_test_page.get_by_text("Stop").click()
|
111
|
+
|
112
|
+
# Wait for the test to have stopped and the new button to appear
|
113
|
+
button = url_test_page.locator('button:has-text("New")')
|
114
|
+
button.wait_for(state="visible", timeout=10000)
|
115
|
+
|
116
|
+
lambda_url = "https://api.locust.cloud" if region == "US" else "https://api.eu-north-1.locust.cloud"
|
117
|
+
requests.delete(f"{lambda_url}/1/delete-account", headers={"Authorization": f"Bearer {id_token}"})
|
118
|
+
|
119
|
+
browser.close()
|
120
|
+
|
121
|
+
|
122
|
+
@pytest.mark.skipif(HEADLESS, reason="verification code needs to be entered manually")
|
123
|
+
def test_signup_eu():
|
124
|
+
test_signup(region="EU")
|
125
|
+
|
126
|
+
|
127
|
+
@pytest.mark.skipif(HEADLESS, reason="verification code needs to be entered manually")
|
128
|
+
def test_signup_us():
|
129
|
+
test_signup(region="US")
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import time
|
3
|
-
|
4
|
-
from playwright.sync_api import expect, sync_playwright
|
5
|
-
|
6
|
-
|
7
|
-
def test_login_and_dashboard_actions():
|
8
|
-
with sync_playwright() as p:
|
9
|
-
browser = p.chromium.launch()
|
10
|
-
context = browser.new_context(viewport={"width": 1280, "height": 1000})
|
11
|
-
page = context.new_page()
|
12
|
-
|
13
|
-
page.goto("http://auth.dev.locust.cloud")
|
14
|
-
|
15
|
-
page.fill('input[name="email"]', os.environ["LOCUSTCLOUD_USERNAME"])
|
16
|
-
page.fill('input[name="password"]', os.environ["LOCUSTCLOUD_PASSWORD"])
|
17
|
-
|
18
|
-
page.click('button[type="submit"]')
|
19
|
-
|
20
|
-
# skip dashboard tutorial
|
21
|
-
page.get_by_text("Skip").click()
|
22
|
-
|
23
|
-
with context.expect_page() as url_test_page_info:
|
24
|
-
page.get_by_text("Run in Browser").click()
|
25
|
-
|
26
|
-
url_test_page = url_test_page_info.value
|
27
|
-
url_test_page.wait_for_load_state()
|
28
|
-
|
29
|
-
# skip locust tutorial
|
30
|
-
url_test_page.get_by_text("Skip").click()
|
31
|
-
|
32
|
-
# Select the mock target class for this test run
|
33
|
-
url_test_page.get_by_text("Mock Target").click()
|
34
|
-
|
35
|
-
button = url_test_page.locator("button[type='submit']")
|
36
|
-
expect(button).to_be_enabled(timeout=45000)
|
37
|
-
button.click()
|
38
|
-
|
39
|
-
# Let the test run
|
40
|
-
time.sleep(10)
|
41
|
-
|
42
|
-
# Stop the test
|
43
|
-
url_test_page.get_by_text("Stop").click()
|
44
|
-
|
45
|
-
# Wait for the test to have stopped and the new button to appear
|
46
|
-
button = url_test_page.locator('button:has-text("New")')
|
47
|
-
button.wait_for(state="visible", timeout=10000)
|
48
|
-
|
49
|
-
browser.close()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev10}/testdata/extra-package/example/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|