mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(driver): optional launcher_activity on Launch RPC for multi-alias apps
This commit is contained in:
1 parent
6d81e24e71
commit
c4cf0ff530
11 files changed
+69
-64
No files matched your search
+9
-7
@@ -11,13 +11,14 @@ import (
|
||||
)
|
||||
|
||||
type testOptions struct {
|
||||
spec string
|
||||
bundleID string
|
||||
platform string
|
||||
avd string
|
||||
duration time.Duration
|
||||
seed int64
|
||||
output string
|
||||
spec string
|
||||
bundleID string
|
||||
launcherActivity string
|
||||
platform string
|
||||
avd string
|
||||
duration time.Duration
|
||||
seed int64
|
||||
output string
|
||||
}
|
||||
|
||||
const topUsage = `uatu is a property-based UI fuzzer for mobile apps.
|
||||
@@ -38,6 +39,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.avd, "avd", "", "Android AVD name (required on android)")
|
||||
flagSet.DurationVar(&options.duration, "duration", 5*time.Minute, "total test duration")
|
||||
|
||||
@@ -116,7 +116,7 @@ func runTestPipeline(ctx context.Context, options testOptions, stdout io.Writer)
|
||||
acceptChannel <- acceptResult{connection: connection, err: acceptErr}
|
||||
}()
|
||||
|
||||
if err := driverClient.Launch(ctx, options.bundleID, false); err != nil {
|
||||
if err := driverClient.Launch(ctx, options.bundleID, options.launcherActivity, false); err != nil {
|
||||
return fmt.Errorf("launch app: %w", err)
|
||||
}
|
||||
fmt.Fprintf(stdout, "launched %s; waiting for SDK to connect (%.0fs timeout)\n", options.bundleID, sdkAcceptTimeout.Seconds())
|
||||
|
||||
Reference in new issue
Block a user