noqa-runner 0.2.1rc1__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 (54) hide show
  1. noqa_runner-0.2.1rc1/.gitignore +171 -0
  2. noqa_runner-0.2.1rc1/PKG-INFO +162 -0
  3. noqa_runner-0.2.1rc1/README.md +141 -0
  4. noqa_runner-0.2.1rc1/noqa_runner/__init__.py +17 -0
  5. noqa_runner-0.2.1rc1/noqa_runner/__main__.py +8 -0
  6. noqa_runner-0.2.1rc1/noqa_runner/application/__init__.py +3 -0
  7. noqa_runner-0.2.1rc1/noqa_runner/application/run_test_session.py +448 -0
  8. noqa_runner-0.2.1rc1/noqa_runner/application/services/__init__.py +3 -0
  9. noqa_runner-0.2.1rc1/noqa_runner/application/services/mobile_service.py +367 -0
  10. noqa_runner-0.2.1rc1/noqa_runner/config.py +80 -0
  11. noqa_runner-0.2.1rc1/noqa_runner/domain/__init__.py +3 -0
  12. noqa_runner-0.2.1rc1/noqa_runner/domain/exceptions.py +53 -0
  13. noqa_runner-0.2.1rc1/noqa_runner/domain/models/__init__.py +3 -0
  14. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/__init__.py +0 -0
  15. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/action_data.py +69 -0
  16. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/activate_app.py +14 -0
  17. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/background_app.py +14 -0
  18. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/base.py +18 -0
  19. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/handle_system_alert.py +23 -0
  20. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/input_text.py +24 -0
  21. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/open_url.py +20 -0
  22. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/restart_app.py +14 -0
  23. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/scroll.py +28 -0
  24. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/stop.py +20 -0
  25. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/swipe.py +26 -0
  26. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/tap.py +23 -0
  27. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/terminate_app.py +15 -0
  28. noqa_runner-0.2.1rc1/noqa_runner/domain/models/actions/wait.py +15 -0
  29. noqa_runner-0.2.1rc1/noqa_runner/domain/models/state/__init__.py +0 -0
  30. noqa_runner-0.2.1rc1/noqa_runner/domain/models/state/condition.py +90 -0
  31. noqa_runner-0.2.1rc1/noqa_runner/domain/models/state/screen.py +152 -0
  32. noqa_runner-0.2.1rc1/noqa_runner/domain/models/state/step.py +27 -0
  33. noqa_runner-0.2.1rc1/noqa_runner/domain/models/state/test_state.py +103 -0
  34. noqa_runner-0.2.1rc1/noqa_runner/domain/models/test_info.py +17 -0
  35. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/__init__.py +0 -0
  36. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/http/__init__.py +0 -0
  37. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/http/agent_api.py +101 -0
  38. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/http/base_client.py +107 -0
  39. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/http/client_manager.py +56 -0
  40. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/http/generic.py +90 -0
  41. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/mobile/__init__.py +0 -0
  42. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/mobile/appium_adapter.py +468 -0
  43. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/storage/__init__.py +0 -0
  44. noqa_runner-0.2.1rc1/noqa_runner/infrastructure/adapters/storage/local_storage_adapter.py +119 -0
  45. noqa_runner-0.2.1rc1/noqa_runner/interfaces/__init__.py +0 -0
  46. noqa_runner-0.2.1rc1/noqa_runner/interfaces/cli/__init__.py +0 -0
  47. noqa_runner-0.2.1rc1/noqa_runner/interfaces/cli/__main__.py +8 -0
  48. noqa_runner-0.2.1rc1/noqa_runner/interfaces/cli/cli.py +244 -0
  49. noqa_runner-0.2.1rc1/noqa_runner/logging_config.py +172 -0
  50. noqa_runner-0.2.1rc1/noqa_runner/utils/__init__.py +0 -0
  51. noqa_runner-0.2.1rc1/noqa_runner/utils/graceful_shutdown.py +157 -0
  52. noqa_runner-0.2.1rc1/noqa_runner/utils/retry_decorator.py +85 -0
  53. noqa_runner-0.2.1rc1/noqa_runner/utils/zip_extractor.py +26 -0
  54. noqa_runner-0.2.1rc1/pyproject.toml +35 -0
@@ -0,0 +1,171 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ .idea/
161
+ secrets/
162
+
163
+ /draft/
164
+
165
+ .DS_Store
166
+
167
+ *.ipa
168
+
169
+ # Local debug configurations
170
+ application/debug/configs/debug_tests.json
171
+ **/debug_tests.json
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: noqa-runner
3
+ Version: 0.2.1rc1
4
+ Summary: noqa runner
5
+ Author-email: Sergey Ustinov <sergey@noqa.ai>
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: aiofiles>=24.0.0
8
+ Requires-Dist: appium-python-client>=4.0.0
9
+ Requires-Dist: defusedxml>=0.7.1
10
+ Requires-Dist: httpx[http2]>=0.27.0
11
+ Requires-Dist: numpy>=1.24.0
12
+ Requires-Dist: pillow>=10.0.0
13
+ Requires-Dist: pydantic-settings>=2.10.0
14
+ Requires-Dist: pydantic>=2.0.0
15
+ Requires-Dist: python-slugify>=8.0.0
16
+ Requires-Dist: sentry-sdk>=2.44.0
17
+ Requires-Dist: structlog>=24.0.0
18
+ Requires-Dist: tenacity>=8.0.0
19
+ Requires-Dist: typer>=0.12.0
20
+ Description-Content-Type: text/markdown
21
+
22
+ # noqa-runner
23
+
24
+ AI-powered mobile test execution runner for iOS applications.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ pip install noqa-runner
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ ### CLI
35
+
36
+ ```bash
37
+ # Run with local IPA build
38
+ python -m noqa_runner run \
39
+ --noqa-api-token $NOQA_API_TOKEN \
40
+ --case-input-json '[
41
+ {
42
+ "case_instructions": "Open app and login with valid credentials"
43
+ }
44
+ ]' \
45
+ --device-id "00008110-001234567890001E" \
46
+ --apple-developer-team-id TEAM123456 \
47
+ --app-bundle-id com.example.app \
48
+ --build-path /path/to/app.ipa
49
+
50
+ # Run with TestFlight installation
51
+ python -m noqa_runner run \
52
+ --noqa-api-token $NOQA_API_TOKEN \
53
+ --case-input-json '[
54
+ {
55
+ "case_instructions": "Open app and verify features"
56
+ }
57
+ ]' \
58
+ --device-id "00008110-001234567890001E" \
59
+ --apple-developer-team-id TEAM123456 \
60
+ --app-bundle-id com.example.app \
61
+ --app-store-id 123456789
62
+
63
+ ```
64
+
65
+ **Required Options:**
66
+
67
+ ```
68
+ --noqa-api-token TEXT noqa API authentication token [required]
69
+ --case-input-json TEXT JSON with test cases: [{case_instructions, test_id?, case_name?}] [required]
70
+ --device-id TEXT Device UDID for testing [required]
71
+ --apple-developer-team-id TEXT Apple Developer Team ID for code signing [required]
72
+ --app-bundle-id TEXT App bundle ID (auto-extracted from IPA if not provided) [recommended]
73
+ ```
74
+
75
+ **Installation Options (choose one):**
76
+
77
+ ```
78
+ --build-path TEXT Path to local IPA build file
79
+ --app-store-id TEXT App Store ID for TestFlight installation
80
+ ```
81
+
82
+ **Other Options:**
83
+
84
+ ```
85
+ --app-context TEXT Application context information [optional]
86
+ --agent-api-url TEXT Agent API base URL [optional, default: https://agent.noqa.ai]
87
+ --log-level TEXT Logging level [optional, default: INFO]
88
+ --appium-url TEXT Appium server URL [optional, default: http://localhost:4723]
89
+ ```
90
+
91
+ ### Python API
92
+
93
+ ```python
94
+ from noqa_runner import RunnerSession, RunnerTestInfo
95
+
96
+ # Create session
97
+ session = RunnerSession()
98
+
99
+ # Run with local IPA build
100
+ results = session.run(
101
+ noqa_api_token="your-token",
102
+ tests=[
103
+ RunnerTestInfo(
104
+ case_instructions="Open app and verify home screen",
105
+ )
106
+ ],
107
+ device_id="00008110-001234567890001E",
108
+ apple_developer_team_id="TEAM123456",
109
+ app_bundle_id="com.example.app",
110
+ app_build_path="/path/to/app.ipa",
111
+ )
112
+
113
+ # Run with TestFlight installation
114
+ results = session.run(
115
+ noqa_api_token="your-token",
116
+ tests=[
117
+ RunnerTestInfo(
118
+ case_instructions="Open app and verify features",
119
+ )
120
+ ],
121
+ device_id="00008110-001234567890001E",
122
+ apple_developer_team_id="TEAM123456",
123
+ app_bundle_id="com.example.app",
124
+ app_store_id="123456789",
125
+ )
126
+
127
+ for result in results:
128
+ print(f"Test {result.case_name}: {result.status}")
129
+ ```
130
+
131
+ ## Test Results
132
+
133
+ The CLI returns test results as JSON with detailed information about each test execution:
134
+
135
+ ```json
136
+ [
137
+ {
138
+ "case_instructions": "Complete onboarding, check that paywall has products",
139
+ "status": "passed",
140
+ "message": "Test completed",
141
+ "test_conditions": [
142
+ {
143
+ "condition": "Onboarding process was completed successfully",
144
+ "is_verified": true,
145
+ "evidence": "User progressed through multiple onboarding screens, ending with 'Get started' button",
146
+ "step_number": 4,
147
+ "confidence": 100
148
+ },
149
+ ...
150
+ ],
151
+ "steps": [...]
152
+ }
153
+ ]
154
+ ```
155
+
156
+ ## License
157
+
158
+ Proprietary - noqa.ai
159
+
160
+ ## Support
161
+
162
+ For issues and questions, please contact sergey@noqa.ai
@@ -0,0 +1,141 @@
1
+ # noqa-runner
2
+
3
+ AI-powered mobile test execution runner for iOS applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install noqa-runner
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ### CLI
14
+
15
+ ```bash
16
+ # Run with local IPA build
17
+ python -m noqa_runner run \
18
+ --noqa-api-token $NOQA_API_TOKEN \
19
+ --case-input-json '[
20
+ {
21
+ "case_instructions": "Open app and login with valid credentials"
22
+ }
23
+ ]' \
24
+ --device-id "00008110-001234567890001E" \
25
+ --apple-developer-team-id TEAM123456 \
26
+ --app-bundle-id com.example.app \
27
+ --build-path /path/to/app.ipa
28
+
29
+ # Run with TestFlight installation
30
+ python -m noqa_runner run \
31
+ --noqa-api-token $NOQA_API_TOKEN \
32
+ --case-input-json '[
33
+ {
34
+ "case_instructions": "Open app and verify features"
35
+ }
36
+ ]' \
37
+ --device-id "00008110-001234567890001E" \
38
+ --apple-developer-team-id TEAM123456 \
39
+ --app-bundle-id com.example.app \
40
+ --app-store-id 123456789
41
+
42
+ ```
43
+
44
+ **Required Options:**
45
+
46
+ ```
47
+ --noqa-api-token TEXT noqa API authentication token [required]
48
+ --case-input-json TEXT JSON with test cases: [{case_instructions, test_id?, case_name?}] [required]
49
+ --device-id TEXT Device UDID for testing [required]
50
+ --apple-developer-team-id TEXT Apple Developer Team ID for code signing [required]
51
+ --app-bundle-id TEXT App bundle ID (auto-extracted from IPA if not provided) [recommended]
52
+ ```
53
+
54
+ **Installation Options (choose one):**
55
+
56
+ ```
57
+ --build-path TEXT Path to local IPA build file
58
+ --app-store-id TEXT App Store ID for TestFlight installation
59
+ ```
60
+
61
+ **Other Options:**
62
+
63
+ ```
64
+ --app-context TEXT Application context information [optional]
65
+ --agent-api-url TEXT Agent API base URL [optional, default: https://agent.noqa.ai]
66
+ --log-level TEXT Logging level [optional, default: INFO]
67
+ --appium-url TEXT Appium server URL [optional, default: http://localhost:4723]
68
+ ```
69
+
70
+ ### Python API
71
+
72
+ ```python
73
+ from noqa_runner import RunnerSession, RunnerTestInfo
74
+
75
+ # Create session
76
+ session = RunnerSession()
77
+
78
+ # Run with local IPA build
79
+ results = session.run(
80
+ noqa_api_token="your-token",
81
+ tests=[
82
+ RunnerTestInfo(
83
+ case_instructions="Open app and verify home screen",
84
+ )
85
+ ],
86
+ device_id="00008110-001234567890001E",
87
+ apple_developer_team_id="TEAM123456",
88
+ app_bundle_id="com.example.app",
89
+ app_build_path="/path/to/app.ipa",
90
+ )
91
+
92
+ # Run with TestFlight installation
93
+ results = session.run(
94
+ noqa_api_token="your-token",
95
+ tests=[
96
+ RunnerTestInfo(
97
+ case_instructions="Open app and verify features",
98
+ )
99
+ ],
100
+ device_id="00008110-001234567890001E",
101
+ apple_developer_team_id="TEAM123456",
102
+ app_bundle_id="com.example.app",
103
+ app_store_id="123456789",
104
+ )
105
+
106
+ for result in results:
107
+ print(f"Test {result.case_name}: {result.status}")
108
+ ```
109
+
110
+ ## Test Results
111
+
112
+ The CLI returns test results as JSON with detailed information about each test execution:
113
+
114
+ ```json
115
+ [
116
+ {
117
+ "case_instructions": "Complete onboarding, check that paywall has products",
118
+ "status": "passed",
119
+ "message": "Test completed",
120
+ "test_conditions": [
121
+ {
122
+ "condition": "Onboarding process was completed successfully",
123
+ "is_verified": true,
124
+ "evidence": "User progressed through multiple onboarding screens, ending with 'Get started' button",
125
+ "step_number": 4,
126
+ "confidence": 100
127
+ },
128
+ ...
129
+ ],
130
+ "steps": [...]
131
+ }
132
+ ]
133
+ ```
134
+
135
+ ## License
136
+
137
+ Proprietary - noqa.ai
138
+
139
+ ## Support
140
+
141
+ For issues and questions, please contact sergey@noqa.ai
@@ -0,0 +1,17 @@
1
+ """
2
+ noqa runner package.
3
+
4
+ AI-powered mobile test execution runner for iOS applications.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from noqa_runner.application.run_test_session import RunnerSession
10
+ from noqa_runner.domain.models.test_info import RunnerTestInfo
11
+ from noqa_runner.logging_config import configure_logging
12
+
13
+ # Configure default logging on module import
14
+ # CLI will reconfigure with custom log level if needed
15
+ configure_logging(is_simple=True)
16
+
17
+ __all__ = ["RunnerSession", "RunnerTestInfo"]
@@ -0,0 +1,8 @@
1
+ """Entry point for running runner as a module: python -m noqa_runner"""
2
+
3
+ from __future__ import annotations
4
+
5
+ from noqa_runner.interfaces.cli.cli import main
6
+
7
+ if __name__ == "__main__":
8
+ main()
@@ -0,0 +1,3 @@
1
+ """Application layer for runner package"""
2
+
3
+ from __future__ import annotations