Skip to content

Commit 27ec24c

Browse files
authored
docs: sync install instructions — add Homebrew across all docs (#61)
* docs: add Homebrew as recommended install method in README and pub.dev README * docs: sync install instructions — add Homebrew as recommended install method - installation.md: full rewrite with Homebrew as Option A, pre-built binary as B, go install as C; remove build-from-source as primary method - guide-to-flutter-e2e-testing.md: replace fake curl URL with Homebrew + go install; fix flutterprobe run → probe test; bump agent version to ^0.5.3 - flutter-test-automation.md: replace fake curl URL with go install; fix all flutterprobe run → probe test; add --dart-define=PROBE_AGENT=true to build step
1 parent f885344 commit 27ec24c

3 files changed

Lines changed: 78 additions & 46 deletions

File tree

website/src/content/docs/blog/guide-to-flutter-e2e-testing.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,20 @@ Three primary options exist for Flutter E2E testing:
3535
Install the FlutterProbe CLI:
3636

3737
```bash
38-
curl -sSL https://flutterprobe.dev/install | sh
38+
# macOS + Linux (recommended)
39+
brew tap AlphaWaveSystems/tap
40+
brew install probe
41+
42+
# Or via go install (good for CI)
43+
go install github.com/AlphaWaveSystems/flutter-probe/cmd/probe@latest
3944
```
4045

4146
Add the FlutterProbe Dart agent to your app's dev dependencies:
4247

4348
```yaml
4449
# pubspec.yaml
4550
dev_dependencies:
46-
flutter_probe_agent:
47-
^0.5.1
51+
flutter_probe_agent: ^0.5.3
4852
```
4953
5054
Initialize the agent in your app's main function:
@@ -192,7 +196,7 @@ The `wait for` command polls the widget tree until the condition is met or the t
192196
Configure FlutterProbe to take screenshots and capture device logs on test failure. This transforms CI failures from "test X failed" into actionable reports with visual context:
193197

194198
```bash
195-
flutterprobe run --suite tests/ --screenshot-on-failure --capture-logs
199+
probe test tests/ --screenshot-on-failure --capture-logs
196200
```
197201

198202
## Common Pitfalls

website/src/content/docs/comparisons/flutter-test-automation.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ jobs:
5151
with:
5252
flutter-version: '3.27.0'
5353
- name: Install FlutterProbe
54-
run: |
55-
curl -sSL https://flutterprobe.dev/install | sh
54+
run: go install github.com/AlphaWaveSystems/flutter-probe/cmd/probe@latest
5655
- name: Build and test
5756
run: |
58-
flutter build apk --debug
59-
flutterprobe run --target android --suite tests/
57+
flutter build apk --debug --dart-define=PROBE_AGENT=true
58+
probe test tests/ -y
6059
```
6160
6261
The key steps are: check out the code, set up Flutter, install FlutterProbe, build the app, and run the test suite. For iOS, replace the build step with `flutter build ios --simulator --debug` and adjust the target flag.
@@ -73,10 +72,10 @@ FlutterProbe supports parallel execution via the `--shard` flag:
7372

7473
```bash
7574
# Split the suite across 4 parallel shards
76-
flutterprobe run --suite tests/ --shard 1/4 &
77-
flutterprobe run --suite tests/ --shard 2/4 &
78-
flutterprobe run --suite tests/ --shard 3/4 &
79-
flutterprobe run --suite tests/ --shard 4/4 &
75+
probe test tests/ --shard 1/4 &
76+
probe test tests/ --shard 2/4 &
77+
probe test tests/ --shard 3/4 &
78+
probe test tests/ --shard 4/4 &
8079
wait
8180
```
8281

@@ -89,7 +88,7 @@ jobs:
8988
matrix:
9089
shard: [1/4, 2/4, 3/4, 4/4]
9190
steps:
92-
- run: flutterprobe run --suite tests/ --shard ${{ matrix.shard }}
91+
- run: probe test tests/ --shard ${{ matrix.shard }}
9392
```
9493

9594
Four shards typically reduce a 12-minute suite to roughly 3 minutes of wall-clock time. The speedup is linear because E2E tests are independent by design — each test starts from a known app state.
@@ -137,7 +136,7 @@ Automated tests are only useful if failures are actionable. FlutterProbe generat
137136
Reports can be output as JUnit XML for CI integration or as HTML for human review. JUnit XML integrates directly with GitHub Actions, GitLab CI, and most CI dashboards to surface test results in pull request checks.
138137

139138
```bash
140-
flutterprobe run --suite tests/ --report junit --output results.xml
139+
probe test tests/ --report junit --output results.xml
141140
```
142141

143142
When a test fails in CI, the combination of the failure screenshot, the step-level log, and the device log usually provides enough context to diagnose the issue without reproducing it locally.
Lines changed: 61 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,59 @@
11
---
22
title: Installation
3-
description: Build FlutterProbe from source and integrate the Dart agent into your Flutter app.
3+
description: Install the probe CLI and integrate the Dart agent into your Flutter app.
44
---
55

6-
## Prerequisites
6+
## Step 1: Install the CLI
7+
8+
### Option A — Homebrew (macOS + Linux, recommended)
9+
10+
```bash
11+
brew tap AlphaWaveSystems/tap
12+
brew install probe
13+
```
14+
15+
### Option B — Pre-built binary (all platforms, good for CI)
716

8-
- **Go 1.26+** — for building the probe CLI
9-
- **Dart 3.3+ / Flutter 3.19+** — for the probe_agent package (tested up to Flutter 3.41 / Dart 3.11)
10-
- **Android**: ADB + Android SDK (for Android emulator testing)
11-
- **iOS Simulator**: Xcode + `xcrun simctl` (for iOS simulator testing)
12-
- **iOS Physical Device**: All of the above, plus `iproxy` from `libimobiledevice` for USB port forwarding (`brew install libimobiledevice`)
17+
Download the binary for your platform from [GitHub Releases](https://github.com/AlphaWaveSystems/flutter-probe/releases/latest):
1318

14-
## Build the CLI
19+
| Platform | Binary |
20+
|---|---|
21+
| macOS (Apple Silicon) | `probe-darwin-arm64` |
22+
| macOS (Intel) | `probe-darwin-amd64` |
23+
| Linux (x86-64) | `probe-linux-amd64` |
24+
| Windows (x86-64) | `probe-windows-amd64.exe` |
1525

16-
Clone the repository and build the `probe` binary:
26+
Make the binary executable and place it on your `PATH`:
1727

1828
```bash
19-
git clone https://github.com/AlphaWaveSystems/flutter-probe.git
20-
cd FlutterProbe
21-
make build # outputs bin/probe
29+
chmod +x probe-darwin-arm64
30+
mv probe-darwin-arm64 /usr/local/bin/probe
2231
```
2332

24-
To install to your `$GOPATH/bin` (so `probe` is available globally):
33+
### Option C — `go install` (requires Go 1.26+)
2534

2635
```bash
27-
make install
36+
go install github.com/AlphaWaveSystems/flutter-probe/cmd/probe@latest
2837
```
2938

30-
## Add ProbeAgent to Your Flutter App
39+
This is a good option for CI environments that already have Go set up.
3140

32-
The Dart agent runs inside your Flutter app and provides the WebSocket server that the CLI connects to.
41+
Verify:
42+
43+
```bash
44+
probe version
45+
```
3346

34-
### 1. Add the dependency
47+
## Step 2: Add the Agent to Your App
3548

36-
In your Flutter app's `pubspec.yaml`:
49+
Add `flutter_probe_agent` to your Flutter app's `pubspec.yaml`:
3750

3851
```yaml
3952
dev_dependencies:
40-
flutter_probe_agent:
41-
path: /path/to/FlutterProbe/probe_agent
53+
flutter_probe_agent: ^0.5.3
4254
```
4355
44-
### 2. Initialize in main.dart
56+
Initialize in your `main.dart`:
4557

4658
```dart
4759
import 'package:flutter_probe_agent/flutter_probe_agent.dart';
@@ -58,16 +70,16 @@ Future<void> main() async {
5870
}
5971
```
6072

61-
The `PROBE_AGENT` flag is compiled into the binary via `--dart-define`. It must be set at build time — it cannot be toggled at runtime.
73+
The `bool.fromEnvironment` check ensures the agent is only active when built with `--dart-define=PROBE_AGENT=true`. It adds zero overhead to your production app.
6274

63-
### 3. Build with the flag enabled
75+
## Step 3: Build and Run
6476

6577
**iOS Simulator:**
6678

6779
```bash
68-
flutter build ios --debug --simulator --dart-define=PROBE_AGENT=true
69-
xcrun simctl install <UDID> build/ios/iphonesimulator/YourApp.app
70-
xcrun simctl launch <UDID> com.example.myapp
80+
flutter run --dart-define=PROBE_AGENT=true
81+
# In another terminal:
82+
probe test tests/login.probe --device <your-device> -v
7183
```
7284

7385
**Android Emulator:**
@@ -76,6 +88,17 @@ xcrun simctl launch <UDID> com.example.myapp
7688
flutter build apk --debug --dart-define=PROBE_AGENT=true
7789
adb install -r build/app/outputs/flutter-apk/app-debug.apk
7890
adb shell am start -n com.example.myapp/.MainActivity
91+
probe test tests/login.probe --device emulator-5554 -v
92+
```
93+
94+
**Physical iOS (WiFi mode — recommended):**
95+
96+
```bash
97+
flutter build ios --profile --dart-define=PROBE_AGENT=true --dart-define=PROBE_WIFI=true
98+
xcrun devicectl device install app --device <UDID> build/ios/iphoneos/Runner.app
99+
xcrun devicectl device process launch --device <UDID> <bundle-id>
100+
# Find PROBE_TOKEN in app console, then:
101+
probe test tests/ --host <device-ip> --token <probe-token> -v
79102
```
80103

81104
## Initialize Your Project
@@ -90,12 +113,18 @@ This creates:
90113
- `probe.yaml` — project configuration
91114
- `tests/` — directory for `.probe` test files with samples
92115

93-
## Build the Test Converter (Optional)
116+
## Prerequisites
94117

95-
If you want to migrate tests from other frameworks:
118+
| Requirement | When needed |
119+
|---|---|
120+
| Dart 3.3+ / Flutter 3.19+ | Always (for the agent) |
121+
| Android SDK + ADB | Android emulator/device testing |
122+
| Xcode + `xcrun simctl` | iOS simulator testing |
123+
| `libimobiledevice` (`brew install libimobiledevice`) | Physical iOS device testing via USB |
96124

97-
```bash
98-
make build-convert # outputs bin/probe-convert
99-
```
125+
## Next Steps
100126

101-
See [probe-convert](/tools/probe-convert/) for details.
127+
- [Write your first test](/probescript/syntax/)
128+
- [ProbeScript Dictionary](/probescript/dictionary/) — all commands and modifiers
129+
- [iOS Integration Guide](/platform/ios/) — physical device setup
130+
- [CI/CD with GitHub Actions](/ci-cd/github-actions/)

0 commit comments

Comments
 (0)