locust-cloud 1.24.3.dev8__tar.gz → 1.24.3.dev13__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.

Potentially problematic release.


This version of locust-cloud might be problematic. Click here for more details.

Files changed (37) hide show
  1. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/.github/workflows/daily-check.yml +2 -1
  2. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/PKG-INFO +1 -1
  3. locust_cloud-1.24.3.dev13/tests/browser_tests.py +108 -0
  4. locust_cloud-1.24.3.dev8/tests/url_tester.py +0 -49
  5. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/.github/workflows/tests.yml +0 -0
  6. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/.gitignore +0 -0
  7. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/.pre-commit-config.yaml +0 -0
  8. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/.vscode/extensions.json +0 -0
  9. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/.vscode/launch.json +0 -0
  10. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/.vscode/settings.json +0 -0
  11. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/LICENSE +0 -0
  12. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/README.md +0 -0
  13. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/__init__.py +0 -0
  14. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/actions.py +0 -0
  15. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/apisession.py +0 -0
  16. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/args.py +0 -0
  17. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/cloud.py +0 -0
  18. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/common.py +0 -0
  19. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/docs/.gitignore +0 -0
  20. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/docs/1-first-run.rst +0 -0
  21. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/docs/2-examples.rst +0 -0
  22. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/docs/images/locust-cloud-screenshot.png +0 -0
  23. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/docs/locust-cloud.rst +0 -0
  24. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/input_events.py +0 -0
  25. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/web_login.py +0 -0
  26. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locust_cloud/websocket.py +0 -0
  27. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/locustfile.py +0 -0
  28. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/pyproject.toml +0 -0
  29. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/testdata/extra-files/extra.txt +0 -0
  30. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/testdata/extra-package/example/__init__.py +0 -0
  31. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/testdata/extra-package/setup.py +0 -0
  32. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/testdata/requirements.txt +0 -0
  33. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/tests/args_test.py +0 -0
  34. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/tests/cloud_test.py +0 -0
  35. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/tests/web_login_test.py +0 -0
  36. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/tests/websocket_test.py +0 -0
  37. {locust_cloud-1.24.3.dev8 → locust_cloud-1.24.3.dev13}/uv.lock +0 -0
@@ -72,9 +72,10 @@ 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
- run: curl -d "{\"text\":\"<!channel> Failed url test run $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\"}" $SLACK_NOTIFICATIONS_WEBHOOK
78
+ run: curl -d "{\"text\":\"Failed url test run $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\"}" $SLACK_NOTIFICATIONS_WEBHOOK
78
79
  - name: Make sure to delete (url tester doesn't self-destroy)
79
80
  if: always()
80
81
  run: uv run --with locust --with . locust --delete
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: locust-cloud
3
- Version: 1.24.3.dev8
3
+ Version: 1.24.3.dev13
4
4
  Summary: Locust Cloud
5
5
  Project-URL: homepage, https://locust.cloud
6
6
  Project-URL: repository, https://github.com/locustcloud/locust-cloud
@@ -0,0 +1,108 @@
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 do_url_test(page, context):
12
+ # skip dashboard tutorial
13
+ page.get_by_text("Skip").click()
14
+ time.sleep(10)
15
+
16
+ with context.expect_page() as url_test_page_info:
17
+ page.get_by_text("Run in Browser").click()
18
+
19
+ url_test_page = url_test_page_info.value
20
+ url_test_page.wait_for_load_state()
21
+
22
+ # skip locust tutorial
23
+ url_test_page.get_by_text("Skip").click()
24
+
25
+ # Select the mock target class for this test run
26
+ url_test_page.get_by_text("Mock Target").click()
27
+
28
+ button = url_test_page.locator("button[type='submit']")
29
+ expect(button).to_be_enabled(timeout=80000)
30
+ button.click()
31
+
32
+ # Let the test run
33
+ time.sleep(20)
34
+
35
+ # Stop the test
36
+ url_test_page.get_by_text("Stop").click()
37
+
38
+ # Wait for the test to have stopped and the new button to appear
39
+ button = url_test_page.locator('button:has-text("New")')
40
+ button.wait_for(state="visible", timeout=10000)
41
+
42
+
43
+ def do_signup(region):
44
+ with sync_playwright() as p:
45
+ browser = p.chromium.launch(headless=HEADLESS)
46
+ context = browser.new_context(viewport={"width": 1280, "height": 1000})
47
+ page = context.new_page()
48
+
49
+ page.goto("http://auth.locust.cloud/signup")
50
+
51
+ # sleeps are to avoid getting flagged by recaptcha
52
+ page.fill('input[name="email"]', f"andrew+{region}_signup_test@locust.cloud")
53
+ time.sleep(1)
54
+ page.fill('input[name="customer_name"]', f"{region} signup test")
55
+ time.sleep(1)
56
+ page.fill('input[name="company_name"]', f"{region} signup test")
57
+ time.sleep(1)
58
+ page.select_option('select[name="region"]', region)
59
+ time.sleep(1)
60
+ page.fill('input[name="password"]', os.environ["LOCUSTCLOUD_PASSWORD"])
61
+ time.sleep(1)
62
+ page.check('input[name="consent"]')
63
+ time.sleep(1)
64
+ page.click('button[type="submit"]')
65
+ time.sleep(10)
66
+
67
+ # allow verification code to be manually entered
68
+ page.wait_for_selector("text=Select a Plan", timeout=80000)
69
+ page.get_by_text("Continue with Free Tier").click()
70
+
71
+ id_token = next((cookie.get("value") for cookie in context.cookies() if cookie.get("name") == "id_token"), None)
72
+
73
+ do_url_test(page, context)
74
+
75
+ lambda_url = "https://api.locust.cloud" if region == "US" else "https://api.eu-north-1.locust.cloud"
76
+ requests.delete(f"{lambda_url}/1/delete-account", headers={"Authorization": f"Bearer {id_token}"})
77
+
78
+ browser.close()
79
+
80
+
81
+ @pytest.mark.skipif(HEADLESS, reason="verification code needs to be entered manually")
82
+ def test_signup_eu():
83
+ do_signup(region="EU")
84
+
85
+
86
+ @pytest.mark.skipif(HEADLESS, reason="verification code needs to be entered manually")
87
+ def test_signup_us():
88
+ do_signup(region="US")
89
+
90
+
91
+ def test_login_and_dashboard_actions():
92
+ with sync_playwright() as p:
93
+ browser = p.chromium.launch(headless=HEADLESS)
94
+ context = browser.new_context(viewport={"width": 1280, "height": 1000})
95
+ page = context.new_page()
96
+
97
+ page.goto("http://auth.dev.locust.cloud")
98
+
99
+ page.fill('input[name="email"]', os.environ["LOCUSTCLOUD_USERNAME"])
100
+ page.fill('input[name="password"]', os.environ["LOCUSTCLOUD_PASSWORD"])
101
+ page.select_option('select[name="region"]', "EU")
102
+
103
+ page.click('button[type="submit"]')
104
+ time.sleep(10)
105
+
106
+ do_url_test(page, context)
107
+
108
+ browser.close()
@@ -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()