mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.63k stars 255 forks source link

`maestro test` should default to running all flows in `.maestro` directory #1792

Open bartekpacia opened 1 month ago

bartekpacia commented 1 month ago

Current behavior

$ ls .maestro/
geolocation_test.yaml   smoke_test.yaml     smoke_test_id.yaml

Currently, when maestro test is run with no arguments, it throws an error:

Logs ``` $ maestro test Missing required parameter: '' Usage: maestro test [-c] [--[no-]ansi] [--debug-output=] [--format=] [--output=] [--test-suite-name=] [-e=]... [--exclude-tags=[,...]]... [--include-tags=[,...]]... Test a Flow or set of Flows on a local iOS Simulator or Android Emulator -c, --continuous --debug-output= Configures the debug output in this path, instead of default -e, --env= --exclude-tags=[,...] List of tags that will remove the Flows containing the provided tags --format= Test report format (default=NOOP): JUNIT, NOOP --include-tags=[,...] List of tags that will remove the Flows that does not have the provided tags --[no-]ansi, --[no-]color Enable / disable colors and ansi output --output= --test-suite-name= Test suite name ```

I don't think it's good default behavior.

Expected behavior

maestro test runs all flows inside the .maestro directory (recursively descending into subdirs).

In other words, maestro test and maestro test .maestro/ should be equivalent.

JRWilding commented 1 month ago

.maestro/ is only the recommended directory, it can be anything and I think its better to require being specific. Although I guess there is some precedence in things like cd being cd ~