mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 19:47:10 +00:00
feat: Maestro driver integration + DeviceDriver architecture (#32)
* proto(driver): drop launcher_activity from LaunchRequest * refactor(driver): rename Driver to DeviceDriver, drop launcherActivity from Launch * refactor(driver): rename package maestro to sidecar * feat(driver): add ChromeDriver backed by chromedp * feat(hierarchy): replace XML parser with TreeNode JSON parser * refactor(driver): update mock and runner to DeviceDriver, drop launcherActivity * feat(runner): add platform routing for web vs sidecar * test(verifier): update hierarchy fixtures from XML to TreeNode JSON * feat(sidecar): extract readLogcat/readProcMetrics; add MaestroDriverBackend - Extract readLogcat() and readProcMetrics() as internal package-level helpers parameterised by serial - Add MaestroDriverBackend wiring maestro-client AndroidDriver - Drop launcherActivity from DriverBackend interface and StubDriverBackend - Add maestro-utils and micrometer-core as explicit compile deps * refactor(sidecar): inject DriverBackend into DriverService; drop launcherActivity - Remove serial and default backend from DriverService constructor - Make backend a required parameter - Drop launcherActivity from launch RPC handler - Create MaestroDriverBackend in Main.kt when platform is android * test(sidecar): update tests for dropped launcherActivity and required backend * chore(sidecar): remove unnecessary micrometer-core direct dependency
This commit is contained in:
26 files changed
+880
-450
No files matched your search
+12
-12
@@ -15,14 +15,13 @@ import (
|
||||
var Version = "dev"
|
||||
|
||||
type testOptions struct {
|
||||
spec string
|
||||
bundleID string
|
||||
launcherActivity string
|
||||
platform string
|
||||
avd string
|
||||
duration time.Duration
|
||||
seed int64
|
||||
output string
|
||||
spec string
|
||||
bundleID string
|
||||
platform string
|
||||
avd string
|
||||
duration time.Duration
|
||||
seed int64
|
||||
output string
|
||||
}
|
||||
|
||||
const topUsage = `sanderling is a property-based UI fuzzer for mobile apps.
|
||||
@@ -45,8 +44,7 @@ func parseTestArgs(args []string, stderr io.Writer) (testOptions, error) {
|
||||
var options testOptions
|
||||
flagSet.StringVar(&options.spec, "spec", "", "path to the TypeScript spec (required)")
|
||||
flagSet.StringVar(&options.bundleID, "bundle-id", "", "target app bundle ID (required)")
|
||||
flagSet.StringVar(&options.launcherActivity, "launcher-activity", "", "optional <pkg>/<activity> to launch (overrides default resolution)")
|
||||
flagSet.StringVar(&options.platform, "platform", "android", "target platform: android (ios deferred)")
|
||||
flagSet.StringVar(&options.platform, "platform", "android", "target platform: android, web")
|
||||
flagSet.StringVar(&options.avd, "avd", "", "Android AVD name to boot if no device is connected")
|
||||
flagSet.DurationVar(&options.duration, "duration", 5*time.Minute, "total test duration")
|
||||
flagSet.Int64Var(&options.seed, "seed", 0, "RNG seed (0 = random)")
|
||||
@@ -60,8 +58,10 @@ func parseTestArgs(args []string, stderr io.Writer) (testOptions, error) {
|
||||
if options.bundleID == "" {
|
||||
return testOptions{}, errors.New("--bundle-id is required")
|
||||
}
|
||||
if options.platform != "android" {
|
||||
return testOptions{}, fmt.Errorf("unsupported platform: %q (only android in v0.1)", options.platform)
|
||||
switch options.platform {
|
||||
case "android", "ios", "web":
|
||||
default:
|
||||
return testOptions{}, fmt.Errorf("unsupported platform: %q (android, web)", options.platform)
|
||||
}
|
||||
return options, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user