diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 83a5ccd..bc5dc54 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -88,8 +88,7 @@ steps: command: - "--app=/app/features/fixtures/mazerunner/build/ios/ipa/mazerunner-{{matrix}}.ipa" - "--farm=bb" - # Avoid iOS 17 for now as it will force us to Appium 2.5, where the Touch we perform will fail. - - "--device=IOS_14|IOS_15|IOS_16" + - "--device=IOS_17|IOS_18|IOS_26" - "--fail-fast" - "--no-tunnel" - "--aws-public-ip" @@ -133,7 +132,7 @@ steps: - "--fail-fast" - "--no-tunnel" - "--aws-public-ip" - - "--appium-version=1.22" + - "--appium-version=2.19" test-collector#v1.10.2: files: "reports/TEST-*.xml" format: "junit" diff --git a/.gitignore b/.gitignore index 8d3307a..44be144 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ Package.resolved Gemfile.lock Podfile.lock maze_output/ +maze-runner.log .idea/ bugsnag-flutter-performance.iml diff --git a/features/persistence.feature b/features/persistence.feature index 47a142b..77367b9 100644 --- a/features/persistence.feature +++ b/features/persistence.feature @@ -6,7 +6,7 @@ Feature: Persistence Scenario: Device Id Persists Between Launches When I run "ManualSpanScenario" * I wait to receive a trace - * I relaunch the app + * I stop and relaunch the app * I run "ManualSpanScenario" * I wait to receive 2 traces * every trace deviceid is valid and the same @@ -19,7 +19,7 @@ Feature: Persistence * I wait for requests to persist * I discard the oldest trace * I set the HTTP status code to 200 - * I relaunch the app + * I stop and relaunch the app * I run "StartSdkDefault" * I wait to receive at least 1 span * the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.spanId" equals the stored value "original_span_id" diff --git a/features/scripts/generate_fixture.sh b/features/scripts/generate_fixture.sh index bb5d67c..876ef8e 100755 --- a/features/scripts/generate_fixture.sh +++ b/features/scripts/generate_fixture.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash set -o errexit +# Use fvm if it is on the PATH +if [ `command -v fvm` ]; then + FLUTTER_BIN="fvm flutter" +fi + if [ -z "$FLUTTER_BIN" ]; then FLUTTER_BIN="flutter" fi diff --git a/features/steps/flutter_steps.rb b/features/steps/flutter_steps.rb index 3f4c70e..9faa108 100644 --- a/features/steps/flutter_steps.rb +++ b/features/steps/flutter_steps.rb @@ -30,9 +30,7 @@ def execute_command(action, scenario_name) command = { action: action, scenario_name: scenario_name, extra_config: extra_config } Maze::Server.commands.add command - touch_action = Appium::TouchAction.new - touch_action.tap({:x => 200, :y => 200}) - touch_action.perform + Maze::Api::Appium::UiManager.new.touch_at(200, 200) $extra_config = '' # Ensure fixture has read the command @@ -41,14 +39,16 @@ def execute_command(action, scenario_name) raise 'Test fixture did not GET /command' unless Maze::Server.commands.remaining.empty? end -When('I relaunch the app') do - Maze::Api::Appium::AppManager.new.launch +When('I stop and relaunch the app') do + manager = Maze::Api::Appium::AppManager.new + manager.terminate + manager.activate end When("I relaunch the app after a crash") do # Wait for the app to stop running before relaunching step 'the app is not running' - Maze::Api::Appium::AppManager.new.launch + Maze::Api::Appium::AppManager.new.activate end Then('the app is not running') do @@ -151,10 +151,7 @@ def execute_command(action, scenario_name) When('I invoke {string}') do |method_name| Maze::Server.commands.add({ action: "invoke_method", args: [method_name] }) - # Ensure fixture has read the command - touch_action = Appium::TouchAction.new - touch_action.tap({:x => 200, :y => 200}) - touch_action.perform + Maze::Api::Appium::UiManager.new.touch_at(200, 200) $extra_config = '' # Ensure fixture has read the command diff --git a/features/support/maze.all.cfg b/features/support/maze.all.cfg new file mode 100644 index 0000000..0e4c937 --- /dev/null +++ b/features/support/maze.all.cfg @@ -0,0 +1,2 @@ +--app-activity=com.bugsnag.mazerunner.MainActivity +--app-package=com.bugsnag.mazerunner