mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
Tracing and integration test tweaks (#3336)
* Disable image and document picker integration tests as they randomly fail to load and are flakey. * Delete any pre-existing log files * Various tracing tweaks and fixes: - delete the custom tracing log levels as we can't control their ouput - implement comparable on them - change default levels only if the new chosen level increases their verbosity * Make logging targets mandatory and fix their logging levels * Switch back to using the `run_tests` reset simulator flag as `fastlane snapshot reset_simulators` was too generic and slow * Switch all integration test taps to `tapCenter` (nee forceTap) after noticing missed taps on CI. * Make the logging file prefix explicit, let the main app not use one. * Rename tracing configuration `target` to `currentTarget`
This commit is contained in:
+10
-5
@@ -80,12 +80,15 @@ lane :alpha do
|
||||
end
|
||||
|
||||
lane :unit_tests do |options|
|
||||
reset_simulator = ENV.key?('CI')
|
||||
|
||||
run_tests(
|
||||
scheme: "UnitTests",
|
||||
destination: "platform=iOS Simulator,name=iPhone 16,OS=18.0",
|
||||
ensure_devices_found: true,
|
||||
result_bundle: true,
|
||||
number_of_retries: 3,
|
||||
reset_simulator: reset_simulator
|
||||
)
|
||||
|
||||
if !options[:skip_previews]
|
||||
@@ -95,6 +98,7 @@ lane :unit_tests do |options|
|
||||
ensure_devices_found: true,
|
||||
result_bundle: true,
|
||||
number_of_retries: 3,
|
||||
reset_simulator: reset_simulator
|
||||
)
|
||||
end
|
||||
|
||||
@@ -102,10 +106,6 @@ lane :unit_tests do |options|
|
||||
end
|
||||
|
||||
lane :ui_tests do |options|
|
||||
# Use a fresh simulator state to ensure hardware keyboard isn't attached.
|
||||
# Not necessary when running on GitHub.
|
||||
# reset_simulator_contents()
|
||||
|
||||
create_simulator_if_necessary(
|
||||
name: "iPhone 16",
|
||||
type: "com.apple.CoreSimulator.SimDeviceType.iPhone-16",
|
||||
@@ -124,6 +124,8 @@ lane :ui_tests do |options|
|
||||
test_to_run = nil
|
||||
end
|
||||
|
||||
reset_simulator = ENV.key?('CI')
|
||||
|
||||
run_tests(
|
||||
scheme: "UITests",
|
||||
devices: ["iPhone 16", "iPad (10th generation)"],
|
||||
@@ -132,6 +134,7 @@ lane :ui_tests do |options|
|
||||
result_bundle: true,
|
||||
only_testing: test_to_run,
|
||||
number_of_retries: 3,
|
||||
reset_simulator: reset_simulator
|
||||
)
|
||||
end
|
||||
|
||||
@@ -145,12 +148,14 @@ lane :integration_tests do
|
||||
runtime: "com.apple.CoreSimulator.SimRuntime.iOS-18-0"
|
||||
)
|
||||
|
||||
reset_simulator = ENV.key?('CI')
|
||||
|
||||
run_tests(
|
||||
scheme: "IntegrationTests",
|
||||
destination: "platform=iOS Simulator,name=iPhone 16 Pro,OS=18.0",
|
||||
ensure_devices_found: true,
|
||||
result_bundle: true,
|
||||
reset_simulator: true
|
||||
reset_simulator: reset_simulator
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user