mobileui-os 1.0.0
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.
- package/AGENTS.md +47 -0
- package/CHANGELOG.md +25 -0
- package/README.md +78 -0
- package/bin/cli.mjs +375 -0
- package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
- package/knowledge/android/accessibility.md +333 -0
- package/knowledge/android/components-controls.md +270 -0
- package/knowledge/android/material-design-3.md +174 -0
- package/knowledge/android/navigation-patterns.md +212 -0
- package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
- package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
- package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
- package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
- package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
- package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
- package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
- package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
- package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
- package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
- package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
- package/knowledge/apple/Interaction-behaviour.md +1378 -0
- package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
- package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
- package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
- package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
- package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
- package/knowledge/apple/Patterns-templates-composition.md +647 -0
- package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
- package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
- package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
- package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
- package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
- package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
- package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
- package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
- package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
- package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
- package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
- package/knowledge/apple/accessibility.md +2162 -0
- package/knowledge/apple/color.md +1933 -0
- package/knowledge/apple/component-architecture.md +2208 -0
- package/knowledge/apple/components.md +2172 -0
- package/knowledge/apple/design-decision-framework.md +1883 -0
- package/knowledge/apple/design-review-engine.md +2108 -0
- package/knowledge/apple/design-tokens.md +1943 -0
- package/knowledge/apple/designing-for-ios.md +1680 -0
- package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
- package/knowledge/apple/hig-foundation.md +1806 -0
- package/knowledge/apple/iconography.md +1903 -0
- package/knowledge/apple/interaction-patterns.md +2513 -0
- package/knowledge/apple/interaction.md +2141 -0
- package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
- package/knowledge/apple/ios-components-and-controls.md +1634 -0
- package/knowledge/apple/ios-components-patterns.md +1343 -0
- package/knowledge/apple/ios-design-system-architecture.md +1520 -0
- package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
- package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
- package/knowledge/apple/ios-forms-and-input.md +1458 -0
- package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
- package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
- package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
- package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
- package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
- package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
- package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
- package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
- package/knowledge/apple/ios-search-and-discovery.md +1456 -0
- package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
- package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
- package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
- package/knowledge/apple/layout.md +2331 -0
- package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
- package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
- package/knowledge/apple/motion-and-animation.md +1698 -0
- package/knowledge/apple/motion.md +2087 -0
- package/knowledge/apple/navigation.md +2281 -0
- package/knowledge/apple/responsive-adaptive.md +2159 -0
- package/knowledge/apple/screen-architecture.md +2067 -0
- package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
- package/knowledge/apple/typography.md +1802 -0
- package/knowledge/apple/ui-ux inteligence audit.md +106 -0
- package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
- package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
- package/knowledge/apple/visual-materials.md +2189 -0
- package/package.json +53 -0
- package/principles/design-principles.md +37 -0
- package/principles/platform-principles.md +25 -0
- package/principles/ux-principles.md +16 -0
- package/references/official-links.md +11 -0
- package/skills/accessibility-engineer/SKILL.md +125 -0
- package/skills/analytics-engineer/SKILL.md +283 -0
- package/skills/animation-engineer/SKILL.md +316 -0
- package/skills/component-designer/SKILL.md +75 -0
- package/skills/component-library-engineer/SKILL.md +140 -0
- package/skills/component-library-ops/SKILL.md +155 -0
- package/skills/design-system/SKILL.md +77 -0
- package/skills/design-token-engineer/SKILL.md +203 -0
- package/skills/design-token-pipeline/SKILL.md +277 -0
- package/skills/device-lab-engineer/SKILL.md +387 -0
- package/skills/forms-engineer/SKILL.md +79 -0
- package/skills/internationalization-engineer/SKILL.md +256 -0
- package/skills/motion-designer/SKILL.md +77 -0
- package/skills/native-data-fetching/SKILL.md +50 -0
- package/skills/navigation-architect/SKILL.md +65 -0
- package/skills/performance-engineer/SKILL.md +250 -0
- package/skills/platform-specialist/SKILL.md +95 -0
- package/skills/pre-release-gate/SKILL.md +75 -0
- package/skills/screen-designer/SKILL.md +117 -0
- package/skills/security-engineer/SKILL.md +375 -0
- package/skills/skills.json +134 -0
- package/skills/testing-auditor/SKILL.md +62 -0
- package/skills/ui-architect/SKILL.md +86 -0
- package/skills/ui-implementer/SKILL.md +188 -0
- package/skills/ux-architect/SKILL.md +49 -0
- package/skills/ux-auditor/SKILL.md +52 -0
- package/skills/visual-auditor/SKILL.md +71 -0
- package/templates/audit-report.md +29 -0
- package/templates/design-tokens.ts +33 -0
- package/templates/screen-spec.md +61 -0
- package/workflows/new-screen.md +17 -0
- package/workflows/pre-release.md +21 -0
- package/workflows/redesign.md +14 -0
- package/workflows/ui-audit.md +22 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
# Device Lab & Cloud Testing Engineer
|
|
2
|
+
|
|
3
|
+
Automate testing across real device matrices: CI integration, flake detection, parallel execution, artifact collection.
|
|
4
|
+
|
|
5
|
+
## Device Matrix Strategy
|
|
6
|
+
|
|
7
|
+
### Coverage Tiers
|
|
8
|
+
|
|
9
|
+
| Tier | iOS Devices | Android Devices | Purpose |
|
|
10
|
+
|------|-------------|-----------------|---------|
|
|
11
|
+
| **Critical** (100%) | iPhone 15 Pro, iPhone SE (3rd), iPad Pro 12.9" | Pixel 8 Pro, Galaxy S24, Galaxy A14, Pixel Tablet | Every PR |
|
|
12
|
+
| **Standard** (Daily) | iPhone 14, iPhone 13 mini, iPad Air | Pixel 7a, Galaxy S23, OnePlus 12, Galaxy Tab S9 | Nightly |
|
|
13
|
+
| **Legacy** (Weekly) | iPhone 12, iPhone SE (2nd), iPad 9th | Pixel 6a, Galaxy S21, Galaxy A53 | Weekly |
|
|
14
|
+
| **Edge** (Monthly) | iPhone 11, iPad mini 6 | Pixel 5, Galaxy S20 FE, Fold 5 | Monthly |
|
|
15
|
+
|
|
16
|
+
### OS Versions
|
|
17
|
+
- **iOS**: Current (N), N-1, N-2
|
|
18
|
+
- **Android**: Current (API 34), API 33, 31, 29 (min SDK)
|
|
19
|
+
|
|
20
|
+
### Configurations
|
|
21
|
+
| Config | Values |
|
|
22
|
+
|--------|--------|
|
|
23
|
+
| Screen size | Compact (375pt), Regular (414pt), Large (768pt+) |
|
|
24
|
+
| Pixel density | 2x, 3x, 2.6xxhdpi, 3.5xxxhdpi |
|
|
25
|
+
| Orientation | Portrait, Landscape |
|
|
26
|
+
| Theme | Light, Dark, System |
|
|
27
|
+
| Font scale | 100%, 150%, 200% (AX3) |
|
|
28
|
+
| Language | en-US, ar-SA, zh-CN, hi-IN, es-ES |
|
|
29
|
+
| Network | WiFi, 4G, 3G, Offline, 20% packet loss |
|
|
30
|
+
| Battery | 100%, 20%, Low Power Mode |
|
|
31
|
+
|
|
32
|
+
## Cloud Providers
|
|
33
|
+
|
|
34
|
+
| Provider | iOS | Android | Parallel | Cost/Device-hr | Best For |
|
|
35
|
+
|----------|-----|---------|----------|----------------|----------|
|
|
36
|
+
| **Firebase Test Lab** | ✅ | ✅ | High | Free tier + $5/hr | Android, Google ecosystem |
|
|
37
|
+
| **BrowserStack** | ✅ | ✅ | Very High | $25/hr | iOS, cross-browser |
|
|
38
|
+
| **Sauce Labs** | ✅ | ✅ | High | $30/hr | Enterprise, compliance |
|
|
39
|
+
| **Bitbar** | ✅ | ✅ | High | Custom | Enterprise |
|
|
40
|
+
| **AWS Device Farm** | ✅ | ✅ | Medium | $0.17/min | AWS shops |
|
|
41
|
+
| **MacStadium / Corellium** | ✅ | ❌ | Medium | $1-2/hr | iOS-specific, debugging |
|
|
42
|
+
|
|
43
|
+
## CI Integration
|
|
44
|
+
|
|
45
|
+
### GitHub Actions (Firebase Test Lab)
|
|
46
|
+
```yaml
|
|
47
|
+
# .github/workflows/device-test.yml
|
|
48
|
+
name: Device Tests
|
|
49
|
+
|
|
50
|
+
on:
|
|
51
|
+
push:
|
|
52
|
+
branches: [main, develop]
|
|
53
|
+
pull_request:
|
|
54
|
+
branches: [main]
|
|
55
|
+
schedule:
|
|
56
|
+
- cron: '0 2 * * *' # Nightly
|
|
57
|
+
|
|
58
|
+
jobs:
|
|
59
|
+
ios:
|
|
60
|
+
runs-on: macos-latest
|
|
61
|
+
timeout-minutes: 60
|
|
62
|
+
strategy:
|
|
63
|
+
matrix:
|
|
64
|
+
device:
|
|
65
|
+
- 'iPhone 15 Pro'
|
|
66
|
+
- 'iPhone SE (3rd generation)'
|
|
67
|
+
- 'iPad Pro (12.9-inch) (6th generation)'
|
|
68
|
+
os: ['17.2', '16.7']
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
- name: Build iOS
|
|
72
|
+
run: |
|
|
73
|
+
xcodebuild -workspace MyApp.xcworkspace \
|
|
74
|
+
-scheme MyApp \
|
|
75
|
+
-configuration Release \
|
|
76
|
+
-sdk iphoneos \
|
|
77
|
+
-derivedDataPath build \
|
|
78
|
+
CODE_SIGNING_ALLOWED=NO
|
|
79
|
+
|
|
80
|
+
- name: Upload to Firebase
|
|
81
|
+
uses: FirebaseExtended/action-hosting-deploy@v0
|
|
82
|
+
with:
|
|
83
|
+
token: ${{ secrets.FIREBASE_TOKEN }}
|
|
84
|
+
projectId: my-project
|
|
85
|
+
|
|
86
|
+
- name: Run Tests
|
|
87
|
+
uses: FirebaseExtended/action-test-lab@v1
|
|
88
|
+
with:
|
|
89
|
+
type: ios
|
|
90
|
+
app: build/Build/Products/Release-iphoneos/MyApp.app
|
|
91
|
+
test: build/Build/Products/Release-iphoneos/MyAppUITests-Runner.app
|
|
92
|
+
devices: ${{ matrix.device }}
|
|
93
|
+
osVersion: ${{ matrix.os }}
|
|
94
|
+
locale: en_US
|
|
95
|
+
orientation: portrait
|
|
96
|
+
|
|
97
|
+
android:
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
timeout-minutes: 60
|
|
100
|
+
strategy:
|
|
101
|
+
matrix:
|
|
102
|
+
device:
|
|
103
|
+
- 'pixel8pro'
|
|
104
|
+
- 'galaxy-s24'
|
|
105
|
+
- 'galaxy-a14'
|
|
106
|
+
api: [34, 33, 31]
|
|
107
|
+
steps:
|
|
108
|
+
- uses: actions/checkout@v4
|
|
109
|
+
- name: Build Android
|
|
110
|
+
run: ./gradlew assembleRelease assembleAndroidTest
|
|
111
|
+
|
|
112
|
+
- name: Run Firebase Test Lab
|
|
113
|
+
uses: FirebaseExtended/action-test-lab@v1
|
|
114
|
+
with:
|
|
115
|
+
type: android
|
|
116
|
+
app: app/build/outputs/apk/release/app-release.apk
|
|
117
|
+
test: app/build/outputs/apk/androidTest/release/app-release-androidTest.apk
|
|
118
|
+
device: ${{ matrix.device }}
|
|
119
|
+
apiLevel: ${{ matrix.api }}
|
|
120
|
+
locale: en
|
|
121
|
+
orientation: portrait
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Parallelization Strategy
|
|
125
|
+
```yaml
|
|
126
|
+
# Split by test suite for parallelism
|
|
127
|
+
jobs:
|
|
128
|
+
unit:
|
|
129
|
+
runs-on: ubuntu-latest
|
|
130
|
+
steps: [...]
|
|
131
|
+
|
|
132
|
+
integration:
|
|
133
|
+
runs-on: ubuntu-latest
|
|
134
|
+
steps: [...]
|
|
135
|
+
|
|
136
|
+
e2e-ios-critical:
|
|
137
|
+
needs: [unit, integration]
|
|
138
|
+
strategy:
|
|
139
|
+
matrix:
|
|
140
|
+
shard: [1, 2, 3, 4] # 4x parallel
|
|
141
|
+
steps: [...]
|
|
142
|
+
|
|
143
|
+
e2e-android-critical:
|
|
144
|
+
needs: [unit, integration]
|
|
145
|
+
strategy:
|
|
146
|
+
matrix:
|
|
147
|
+
shard: [1, 2, 3, 4]
|
|
148
|
+
steps: [...]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Flake Detection & Management
|
|
152
|
+
|
|
153
|
+
### Flake Detection
|
|
154
|
+
```yaml
|
|
155
|
+
# .github/workflows/flake-detection.yml
|
|
156
|
+
name: Flake Detection
|
|
157
|
+
|
|
158
|
+
on:
|
|
159
|
+
workflow_run:
|
|
160
|
+
workflows: ['Device Tests']
|
|
161
|
+
types: [completed]
|
|
162
|
+
|
|
163
|
+
jobs:
|
|
164
|
+
detect-flakes:
|
|
165
|
+
runs-on: ubuntu-latest
|
|
166
|
+
steps:
|
|
167
|
+
- uses: actions/checkout@v4
|
|
168
|
+
- name: Download test results
|
|
169
|
+
uses: actions/download-artifact@v4
|
|
170
|
+
with:
|
|
171
|
+
name: test-results
|
|
172
|
+
- name: Analyze flakes
|
|
173
|
+
run: |
|
|
174
|
+
python scripts/flake_detector.py \
|
|
175
|
+
--results test-results/ \
|
|
176
|
+
--threshold 0.05 \ # 5% flake rate
|
|
177
|
+
--window 30 \ # 30 days
|
|
178
|
+
--output flake-report.json
|
|
179
|
+
- name: Create issue for flakes
|
|
180
|
+
if: success()
|
|
181
|
+
uses: peter-evans/create-issue-from-file@v5
|
|
182
|
+
with:
|
|
183
|
+
title: 'Flaky tests detected'
|
|
184
|
+
content-filepath: flake-report.json
|
|
185
|
+
labels: ['flaky', 'needs-investigation']
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Flake Detector Logic
|
|
189
|
+
```python
|
|
190
|
+
# scripts/flake_detector.py
|
|
191
|
+
import json
|
|
192
|
+
from collections import defaultdict
|
|
193
|
+
from datetime import datetime, timedelta
|
|
194
|
+
|
|
195
|
+
def detect_flakes(results_dir, threshold=0.05, window_days=30):
|
|
196
|
+
test_runs = defaultdict(lambda: {'pass': 0, 'fail': 0})
|
|
197
|
+
|
|
198
|
+
for file in Path(results_dir).glob('*.json'):
|
|
199
|
+
data = json.load(file)
|
|
200
|
+
test_name = data['test_name']
|
|
201
|
+
passed = data['passed']
|
|
202
|
+
timestamp = datetime.fromisoformat(data['timestamp'])
|
|
203
|
+
|
|
204
|
+
if datetime.now() - timestamp > timedelta(days=window_days):
|
|
205
|
+
continue
|
|
206
|
+
|
|
207
|
+
if passed:
|
|
208
|
+
test_runs[test_name]['pass'] += 1
|
|
209
|
+
else:
|
|
210
|
+
test_runs[test_name]['fail'] += 1
|
|
211
|
+
|
|
212
|
+
flaky = []
|
|
213
|
+
for test, counts in test_runs.items():
|
|
214
|
+
total = counts['pass'] + counts['fail']
|
|
215
|
+
if total >= 10: # Minimum runs
|
|
216
|
+
fail_rate = counts['fail'] / total
|
|
217
|
+
if fail_rate > threshold and fail_rate < 1.0:
|
|
218
|
+
flaky.append({
|
|
219
|
+
'test': test,
|
|
220
|
+
'fail_rate': fail_rate,
|
|
221
|
+
'runs': total,
|
|
222
|
+
'passes': counts['pass'],
|
|
223
|
+
'fails': counts['fail']
|
|
224
|
+
})
|
|
225
|
+
|
|
226
|
+
return sorted(flaky, key=lambda x: x['fail_rate'], reverse=True)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Artifact Collection
|
|
230
|
+
|
|
231
|
+
### Required Artifacts
|
|
232
|
+
| Artifact | Retention | Storage |
|
|
233
|
+
|----------|-----------|---------|
|
|
234
|
+
| Screenshots (failure) | 30 days | Cloud bucket |
|
|
235
|
+
| Video recording | 7 days | Cloud bucket |
|
|
236
|
+
| Logs (logcat, syslog) | 14 days | Cloud bucket |
|
|
237
|
+
| Performance traces | 30 days | Cloud bucket |
|
|
238
|
+
| Crash dumps (.dSYM, .so) | 90 days | Cloud bucket |
|
|
239
|
+
| Test reports (JUnit, HTML) | 90 days | Cloud bucket |
|
|
240
|
+
|
|
241
|
+
### Collection Script
|
|
242
|
+
```bash
|
|
243
|
+
#!/bin/bash
|
|
244
|
+
# collect-artifacts.sh
|
|
245
|
+
|
|
246
|
+
ARTIFACT_DIR="artifacts/${BUILD_ID}"
|
|
247
|
+
mkdir -p "$ARTIFACT_DIR"
|
|
248
|
+
|
|
249
|
+
# Screenshots
|
|
250
|
+
adb pull /sdcard/Pictures/Screenshots "$ARTIFACT_DIR/screenshots" 2>/dev/null || true
|
|
251
|
+
|
|
252
|
+
# Videos (Firebase Test Lab)
|
|
253
|
+
gsutil -m cp -r "gs://${BUCKET}/videos/${BUILD_ID}/*" "$ARTIFACT_DIR/videos/" 2>/dev/null || true
|
|
254
|
+
|
|
255
|
+
# Logs
|
|
256
|
+
adb logcat -d > "$ARTIFACT_DIR/logcat.txt" 2>/dev/null || true
|
|
257
|
+
xcrun simctl get_app_container booted com.myapp data > "$ARTIFACT_DIR/ios_logs.txt" 2>/dev/null || true
|
|
258
|
+
|
|
259
|
+
# Performance
|
|
260
|
+
adb shell dumpsys gfxinfo com.myapp > "$ARTIFACT_DIR/gfxinfo.txt" 2>/dev/null || true
|
|
261
|
+
|
|
262
|
+
# Upload
|
|
263
|
+
gsutil -m cp -r "$ARTIFACT_DIR" "gs://${BUCKET}/artifacts/"
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Test Sharding
|
|
267
|
+
|
|
268
|
+
### Android (Firebase Test Lab)
|
|
269
|
+
```bash
|
|
270
|
+
# Auto-shard by test class
|
|
271
|
+
gcloud firebase test android run \
|
|
272
|
+
--type instrumentation \
|
|
273
|
+
--app app-release.apk \
|
|
274
|
+
--test app-release-androidTest.apk \
|
|
275
|
+
--device model=pixel8pro,version=34,locale=en,orientation=portrait \
|
|
276
|
+
--shard-timeout 10m \
|
|
277
|
+
--num-uniform-shards 4
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### iOS (Xcode)
|
|
281
|
+
```bash
|
|
282
|
+
# xcodebuild test-without-building with test plan
|
|
283
|
+
xcodebuild test-without-building \
|
|
284
|
+
-workspace MyApp.xcworkspace \
|
|
285
|
+
-scheme MyApp \
|
|
286
|
+
-testPlan DeviceTests \
|
|
287
|
+
-destination 'platform=iOS Simulator,name=iPhone 15 Pro' \
|
|
288
|
+
-parallel-testing-enabled YES \
|
|
289
|
+
-maximum-concurrent-test-simulator-destinations 4
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Performance Regression Detection
|
|
293
|
+
|
|
294
|
+
```yaml
|
|
295
|
+
# .github/workflows/perf-regression.yml
|
|
296
|
+
jobs:
|
|
297
|
+
perf-compare:
|
|
298
|
+
runs-on: ubuntu-latest
|
|
299
|
+
steps:
|
|
300
|
+
- uses: actions/checkout@v4
|
|
301
|
+
- name: Download baseline metrics
|
|
302
|
+
uses: actions/download-artifact@v4
|
|
303
|
+
with:
|
|
304
|
+
name: perf-baseline
|
|
305
|
+
path: baseline/
|
|
306
|
+
- name: Run performance tests
|
|
307
|
+
run: ./scripts/run-perf-tests.sh --output current/
|
|
308
|
+
- name: Compare
|
|
309
|
+
run: |
|
|
310
|
+
python scripts/perf_compare.py \
|
|
311
|
+
--baseline baseline/metrics.json \
|
|
312
|
+
--current current/metrics.json \
|
|
313
|
+
--threshold 0.10 \ # 10% regression
|
|
314
|
+
--output perf-report.json
|
|
315
|
+
- name: Comment on PR
|
|
316
|
+
uses: actions/github-script@v7
|
|
317
|
+
with:
|
|
318
|
+
script: |
|
|
319
|
+
const fs = require('fs');
|
|
320
|
+
const report = JSON.parse(fs.readFileSync('perf-report.json'));
|
|
321
|
+
if (report.regressions.length > 0) {
|
|
322
|
+
await github.rest.issues.createComment({
|
|
323
|
+
issue_number: context.payload.pull_request.number,
|
|
324
|
+
owner: context.repo.owner,
|
|
325
|
+
repo: context.repo.repo,
|
|
326
|
+
body: '⚠️ Performance regressions detected:\n' +
|
|
327
|
+
report.regressions.map(r => `- ${r.metric}: ${r.change}% slower`).join('\n')
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
## Local Development
|
|
333
|
+
|
|
334
|
+
### Device Farm CLI
|
|
335
|
+
```bash
|
|
336
|
+
# Firebase Test Lab local
|
|
337
|
+
gcloud firebase test android run \
|
|
338
|
+
--type robo \
|
|
339
|
+
--app app-debug.apk \
|
|
340
|
+
--device model=pixel8pro,version=34 \
|
|
341
|
+
--timeout 5m \
|
|
342
|
+
--results-bucket my-bucket \
|
|
343
|
+
--directories-to-pull /sdcard/Download
|
|
344
|
+
|
|
345
|
+
# BrowserStack local
|
|
346
|
+
browserstack-sdk test run --config browserstack.yml
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Simulator/Emulator Matrix (Local)
|
|
350
|
+
```bash
|
|
351
|
+
# iOS - run on all simulators
|
|
352
|
+
xcrun simctl list devices available | grep -E 'iPhone|iPad' | while read line; do
|
|
353
|
+
UDID=$(echo $line | grep -oE '[A-F0-9-]{36}')
|
|
354
|
+
NAME=$(echo $line | sed 's/ (.*//')
|
|
355
|
+
xcodebuild test -scheme MyApp -destination "id=$UDID" -quiet &
|
|
356
|
+
done
|
|
357
|
+
wait
|
|
358
|
+
|
|
359
|
+
# Android - run on all emulators
|
|
360
|
+
emulator -list-avds | while read avd; do
|
|
361
|
+
emulator -avd "$avd" -no-window -no-audio -no-boot-anim &
|
|
362
|
+
adb wait-for-device
|
|
363
|
+
./gradlew connectedAndroidTest -Pavd="$avd" &
|
|
364
|
+
done
|
|
365
|
+
wait
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
## Cost Optimization
|
|
369
|
+
|
|
370
|
+
| Strategy | Savings |
|
|
371
|
+
|----------|---------|
|
|
372
|
+
| Run critical matrix on PR, full matrix nightly | 70% |
|
|
373
|
+
| Use spot/preemptible instances (Android) | 60-80% |
|
|
374
|
+
| Cache build artifacts between runs | 30% |
|
|
375
|
+
| Parallelize by test class, not device | 40% |
|
|
376
|
+
| Skip devices with 0% usage (analytics) | 20% |
|
|
377
|
+
| Negotiate enterprise volume discounts | 15-30% |
|
|
378
|
+
|
|
379
|
+
## Monitoring Dashboard
|
|
380
|
+
|
|
381
|
+
Key metrics to track:
|
|
382
|
+
- **Test execution time** (p50, p95)
|
|
383
|
+
- **Flake rate** (target < 1%)
|
|
384
|
+
- **Device availability** (target > 99%)
|
|
385
|
+
- **Cost per PR** (target < $5)
|
|
386
|
+
- **Coverage** (devices × OS × config)
|
|
387
|
+
- **Mean time to feedback** (target < 15min)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Forms Engineer
|
|
2
|
+
|
|
3
|
+
Build accessible, platform-native forms with validation, error handling, and input optimization.
|
|
4
|
+
|
|
5
|
+
## Responsibilities
|
|
6
|
+
|
|
7
|
+
- Design form architecture: controlled vs uncontrolled, schema validation
|
|
8
|
+
- Implement platform-native inputs: pickers, date/time, sliders, switches
|
|
9
|
+
- Map validation errors to accessible inline messages
|
|
10
|
+
- Handle keyboard behavior: next, done, submit, auto-dismiss
|
|
11
|
+
- Preserve input on error/retry (UX principle #12)
|
|
12
|
+
- Support dynamic type, RTL, autofill, password managers
|
|
13
|
+
|
|
14
|
+
## Validation Strategy
|
|
15
|
+
|
|
16
|
+
| Layer | Tool | Scope |
|
|
17
|
+
|-------|------|-------|
|
|
18
|
+
| Schema | Zod, Valibot, Yup | Type-safe, shared client/server |
|
|
19
|
+
| Field | React Hook Form, Formik | Per-field, async validation |
|
|
20
|
+
| Submit | Server response | Map 4xx to field errors |
|
|
21
|
+
|
|
22
|
+
## Platform Input Mapping
|
|
23
|
+
|
|
24
|
+
| Data Type | iOS | Android | Web Fallback |
|
|
25
|
+
|-----------|-----|---------|--------------|
|
|
26
|
+
| Text | UITextField | TextInput | input |
|
|
27
|
+
| Email | keyboardType=email | inputType=textEmailAddress | type=email |
|
|
28
|
+
| Phone | keyboardType=phonePad | inputType=phone | type=tel |
|
|
29
|
+
| Number | keyboardType=decimalPad | inputType=numberDecimal | type=number |
|
|
30
|
+
| Password | secureTextEntry | inputType=textPassword | type=password |
|
|
31
|
+
| Date | UIDatePicker (inline) | MaterialDatePicker | type=date |
|
|
32
|
+
| Time | UIDatePicker (inline) | MaterialTimePicker | type=time |
|
|
33
|
+
| Select | UIPickerView / Menu | DropdownMenu / Spinner | select |
|
|
34
|
+
| Toggle | UISwitch | SwitchMaterial | checkbox |
|
|
35
|
+
| Slider | UISlider | Slider | range |
|
|
36
|
+
|
|
37
|
+
## Accessibility Requirements
|
|
38
|
+
|
|
39
|
+
- Every input: `accessibilityLabel` + `accessibilityHint` if needed
|
|
40
|
+
- Required fields: `accessibilityRequired={true}`
|
|
41
|
+
- Error: `accessibilityLiveRegion="polite"` on error message
|
|
42
|
+
- Group: `accessibilityRole="form"` or `fieldset` equivalent
|
|
43
|
+
- Dynamic type: test at 200% (AX3), no clipping
|
|
44
|
+
- Autofill: `textContentType` (iOS) / `autofillHints` (Android)
|
|
45
|
+
|
|
46
|
+
## Keyboard Handling
|
|
47
|
+
|
|
48
|
+
- `returnKeyType`: next / done / send / search / go
|
|
49
|
+
- `onSubmitEditing`: focus next field or submit
|
|
50
|
+
- `keyboardShouldPersistTaps`: 'handled' for lists with inputs
|
|
51
|
+
- Toolbar: Previous / Next / Done (iOS), done button (Android)
|
|
52
|
+
|
|
53
|
+
## Error Handling
|
|
54
|
+
|
|
55
|
+
- Inline error below field, not toast-only
|
|
56
|
+
- Error color + icon (not color alone — UX principle #8)
|
|
57
|
+
- Focus first error on submit failure
|
|
58
|
+
- Preserve all valid input on error
|
|
59
|
+
- Server errors: map to fields, show generic at top if unmatched
|
|
60
|
+
|
|
61
|
+
## Implementation Checklist
|
|
62
|
+
|
|
63
|
+
- [ ] Schema validates on blur + submit
|
|
64
|
+
- [ ] Platform picker/date components used (not web polyfills)
|
|
65
|
+
- [ ] Dynamic type: no horizontal overflow, labels wrap
|
|
66
|
+
- [ ] Autofill works for address, card, credentials
|
|
67
|
+
- [ ] RTL: label/input order flips, icons mirror
|
|
68
|
+
- [ ] Reduced motion: no animated error shake
|
|
69
|
+
- [ ] Submit disabled while validating/submitting
|
|
70
|
+
- [ ] Haptic feedback on error (iOS: notification/error, Android: vibrate)
|
|
71
|
+
|
|
72
|
+
## Anti-Patterns
|
|
73
|
+
|
|
74
|
+
- Custom date picker instead of native
|
|
75
|
+
- Validation only on submit
|
|
76
|
+
- Toast-only errors (inaccessible)
|
|
77
|
+
- Losing input on keyboard dismiss
|
|
78
|
+
- `TextInput` for everything (no platform pickers)
|
|
79
|
+
- Fixed font sizes breaking dynamic type
|