locust-cloud 1.24.3.dev2__tar.gz → 1.24.3.dev4__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.
Files changed (36) hide show
  1. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/.github/workflows/daily-check.yml +12 -0
  2. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/.github/workflows/tests.yml +1 -1
  3. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/PKG-INFO +2 -1
  4. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/pyproject.toml +2 -0
  5. locust_cloud-1.24.3.dev4/tests/url_tester.py +49 -0
  6. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/uv.lock +395 -360
  7. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/.gitignore +0 -0
  8. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/.pre-commit-config.yaml +0 -0
  9. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/.vscode/extensions.json +0 -0
  10. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/.vscode/launch.json +0 -0
  11. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/.vscode/settings.json +0 -0
  12. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/LICENSE +0 -0
  13. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/README.md +0 -0
  14. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/__init__.py +0 -0
  15. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/actions.py +0 -0
  16. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/apisession.py +0 -0
  17. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/args.py +0 -0
  18. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/cloud.py +0 -0
  19. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/common.py +0 -0
  20. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/docs/.gitignore +0 -0
  21. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/docs/1-first-run.rst +0 -0
  22. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/docs/2-examples.rst +0 -0
  23. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/docs/images/locust-cloud-screenshot.png +0 -0
  24. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/docs/locust-cloud.rst +0 -0
  25. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/input_events.py +0 -0
  26. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/web_login.py +0 -0
  27. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locust_cloud/websocket.py +0 -0
  28. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/locustfile.py +0 -0
  29. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/testdata/extra-files/extra.txt +0 -0
  30. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/testdata/extra-package/example/__init__.py +0 -0
  31. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/testdata/extra-package/setup.py +0 -0
  32. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/testdata/requirements.txt +0 -0
  33. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/tests/args_test.py +0 -0
  34. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/tests/cloud_test.py +0 -0
  35. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/tests/web_login_test.py +0 -0
  36. {locust_cloud-1.24.3.dev2 → locust_cloud-1.24.3.dev4}/tests/websocket_test.py +0 -0
@@ -56,3 +56,15 @@ jobs:
56
56
  - name: Make sure to delete (only really needed for mock)
57
57
  if: always()
58
58
  run: uv run --with locust --with . locust --delete
59
+
60
+ locust_url_test:
61
+ runs-on: ubuntu-latest
62
+ steps:
63
+ - uses: actions/checkout@v4
64
+ - uses: astral-sh/setup-uv@v5
65
+ - run: uv venv --python 3.11
66
+ - run: uv run playwright install --with-deps
67
+ - run: uv run pytest tests/url_tester.py
68
+ env:
69
+ LOCUSTCLOUD_USERNAME: ${{ secrets.LOCUSTCLOUD_USERNAME }}
70
+ LOCUSTCLOUD_PASSWORD: ${{ secrets.LOCUSTCLOUD_PASSWORD }}
@@ -21,7 +21,7 @@ jobs:
21
21
  fetch-depth: 0
22
22
  fetch-tags: true
23
23
  - uses: astral-sh/setup-uv@v5
24
- - run: uv venv --python 3.10
24
+ - run: uv venv --python 3.11
25
25
  - run: uv run ruff check
26
26
  - run: uv run ruff format --check
27
27
  - run: uv run pyright
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: locust-cloud
3
- Version: 1.24.3.dev2
3
+ Version: 1.24.3.dev4
4
4
  Summary: Locust Cloud
5
5
  Project-URL: homepage, https://locust.cloud
6
6
  Project-URL: repository, https://github.com/locustcloud/locust-cloud
@@ -10,6 +10,7 @@ Requires-Python: >=3.10
10
10
  Requires-Dist: configargparse>=1.7.1
11
11
  Requires-Dist: gevent<26.0.0,>=24.10.1
12
12
  Requires-Dist: platformdirs<5.0.0,>=4.3.6
13
+ Requires-Dist: playwright==1.52.0
13
14
  Requires-Dist: python-engineio>=4.12.2
14
15
  Requires-Dist: python-socketio[client]==5.13.0
15
16
  Requires-Dist: tomli>=1.1.0; python_version < '3.11'
@@ -12,6 +12,7 @@ dependencies = [
12
12
  "platformdirs>=4.3.6,<5.0.0",
13
13
  "python-socketio[client]==5.13.0",
14
14
  "python-engineio>=4.12.2",
15
+ "playwright==1.52.0",
15
16
  ]
16
17
 
17
18
  [project.urls]
@@ -59,6 +60,7 @@ dev = [
59
60
  "types-beautifulsoup4>=4.12.0.20241020",
60
61
  "gevent-websocket==0.10.1",
61
62
  "flask>=3.1.0",
63
+ "playwright==1.52.0",
62
64
  ]
63
65
 
64
66
  [tool.pyright]
@@ -0,0 +1,49 @@
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()