Skip to content

Commit

Permalink
DO NOT MERGE: Grab hierarchy on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishbowler committed Nov 11, 2024
1 parent 513efe0 commit 56e3b1d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions e2e/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ for workspace_dir in ./workspaces/*; do
app_name="$(basename "$workspace_dir")"
_h1 "run tests for app \"$app_name\" on platform \"$platform\""

### Debugging tests
if [ "$(basename "$workspace_dir")" = "demo_app" ]; then

_h2 "$app_name" "run debuggings tests"

while IFS= read -r line; do
_h3 "$app_name" "debugging" "$line"
done < pipe &

maestro --verbose --platform "$platform" test --include-tags debugging --exclude-tags "$exclude_tags" "$workspace_dir" 1>pipe 2>&1 || WORKSPACE_PASS=false

if [ "$WORKSPACE_PASS" = "false" ]; then
_h2 "$app_name" "FAIL! Expected debug tests to pass, but at least some failed instead"
maestro hierarchy > ~/.maestro/debug_hierarchy.txt
ALL_PASS=false
fi
fi

###
### Run passing tests
###
Expand Down
2 changes: 1 addition & 1 deletion e2e/workspaces/demo_app/commands_tour.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This flow exercises as many commands as possible, using as many configurations as possible.
appId: com.example.example
tags:
- passing
- debugging
- android # TODO: Make this iOS compatible (or skip platform-specific tests)
env:
THING: "five"
Expand Down

0 comments on commit 56e3b1d

Please sign in to comment.