diff --git a/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json b/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json index a3206629d..1bb75ba41 100644 --- a/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json +++ b/src/assets/json/en/ios/wwdc/ios-wwdc-listnota11y.json @@ -87,6 +87,17 @@ "raccourcis": "2023/2310244", "profils": ["All","DocC"] }, + { + "themes": "WWDC 2023", + "title": "Debug with structured logging", + "type": [], + "tests": [], + "verifier": [], + "resultat": [], + "exception": "", + "raccourcis": "2023/23DebuggingAndTesting", + "profils": ["All","Debugging"] + }, { "themes": "WWDC 2023", "title": "Design dynamic Live Activities", @@ -131,6 +142,17 @@ "raccourcis": "2023/2310037", "profils": ["All","Swift","SwiftUI"] }, + { + "themes": "WWDC 2023", + "title": "Fix failures faster with Xcode test reports", + "type": [], + "tests": [], + "verifier": [], + "resultat": [], + "exception": "", + "raccourcis": "2023/23DebuggingAndTesting", + "profils": ["All","Debugging","Optimization"] + }, { "themes": "WWDC 2023", "title": "Generalize APIs with parameter packs", diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_1.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_1.png new file mode 100755 index 000000000..894af696d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_1.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_10.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_10.png new file mode 100755 index 000000000..25cae02a7 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_10.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_11.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_11.png new file mode 100755 index 000000000..8a2682c98 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_11.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_13.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_13.png new file mode 100755 index 000000000..c162a8bc5 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_13.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_14.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_14.png new file mode 100644 index 000000000..6b5f24d83 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_14.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_15.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_15.png new file mode 100755 index 000000000..f4abd34c9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_15.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_16.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_16.png new file mode 100755 index 000000000..ab8fa53b1 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_16.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_17.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_17.png new file mode 100755 index 000000000..18580f098 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_17.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_18.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_18.png new file mode 100755 index 000000000..50aaa2f0e Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_18.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_19.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_19.png new file mode 100755 index 000000000..fed12e218 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_19.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_2.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_2.png new file mode 100755 index 000000000..d240d580d Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_2.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_20.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_20.png new file mode 100755 index 000000000..aae78658b Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_20.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_21.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_21.png new file mode 100755 index 000000000..11c704624 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_21.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_3.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_3.png new file mode 100755 index 000000000..d37df92c7 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_3.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_4.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_4.png new file mode 100755 index 000000000..a7e3bfa54 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_4.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_5.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_5.png new file mode 100755 index 000000000..4667bfdd0 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_5.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_6.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_6.png new file mode 100755 index 000000000..4ed624cad Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_6.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_7.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_7.png new file mode 100755 index 000000000..0ca839979 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_7.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_8.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_8.png new file mode 100755 index 000000000..d9cd640c1 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_8.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_9.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_9.png new file mode 100755 index 000000000..b4f66fbe9 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_9.png differ diff --git a/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_Poster.png b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_Poster.png new file mode 100755 index 000000000..9cec73a38 Binary files /dev/null and b/src/en/mobile/images/iOSdev/wwdc23-DebugAndTesting_Poster.png differ diff --git a/src/en/mobile/ios/wwdc/nota11y/2023/23DebuggingAndTesting.md b/src/en/mobile/ios/wwdc/nota11y/2023/23DebuggingAndTesting.md new file mode 100755 index 000000000..b00ed4579 --- /dev/null +++ b/src/en/mobile/ios/wwdc/nota11y/2023/23DebuggingAndTesting.md @@ -0,0 +1,134 @@ +--- +title : "Debugging and testing" +abstract: "Improve your diagnostic experience through logging and learn how to use the test report in Xcode." + +displayToc: true +--- + +# WWDC 2023: Debugging and testing +Find hereafter a detailed summary of two WWDC videos that belong to a [taxonomy of some WWDC footages](../../). + +The original videos are available on the **Apple official website** ([session 10175](https://developer.apple.com/videos/play/wwdc2023/10175/), [session 10226](https://developer.apple.com/videos/play/wwdc2023/10226/)). + +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_Poster.png) + +"Discover the **debug console in Xcode 15** and learn how you can **improve your diagnostic experience** through logging. Explore how you can navigate your logs easily and efficiently using **advanced filtering and improved visualization**. We'll also show you how to use the dwim-print command to **evaluate expressions** in your code while debugging." + +"Discover how you can find, debug, and fix **test failures** faster with the **test report** in Xcode and Xcode Cloud. Learn how Xcode identifies failure patterns to help you find the right place to start investigating. We'll also show you how to use the UI automation explorer and video recordings to understand the events that led up to your **UI test failure**." + +Hereafter, the underlined elements **lead directly to the playback of the WWDC video** at the appropriate moment. + + +## Debugging +### [Console](https://developer.apple.com/videos/play/wwdc2023/10226/?time=49) +`Xcode 15` provides a brand **new `Debug Console`** with many features to be pointed out hereunder. + +#### [Metadata](https://developer.apple.com/videos/play/wwdc2023/10226/?time=73) +The metadata can be customized through an **options button** and its content is cleverly placed below each log. +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_1.png) + +#### [Log preview](https://developer.apple.com/videos/play/wwdc2023/10226/?time=112) +Besides the different options to be displayed below each log, it's also possible to have a quick overview of a single log by **pressing the space bar** after the selection thereof. +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_2.png) + +#### [Filtering methods](https://developer.apple.com/videos/play/wwdc2023/10226/?time=141) +The new `Debug Console` provides some methods for offering **various filterings**: use the [filter bar](https://developer.apple.com/videos/play/wwdc2023/10226/?time=160), select the sought [log types](https://developer.apple.com/videos/play/wwdc2023/10226/?time=175) and [second click](https://developer.apple.com/videos/play/wwdc2023/10226/?time=185) a log. +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_3.png) + + +#### [Examples](https://developer.apple.com/videos/play/wwdc2023/10226/?time=215) +1. Use the **category filter** from the displayed popup⟹ 🎬 +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_4.png) + +2. Locate the code linked to the log writing⟹ 🎬 +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_5.png) + + +### [LLDB](https://developer.apple.com/videos/play/wwdc2023/10226/?time=445) +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_6.png) +Using `po` or `p`might become cumbersome when there's [no conformance](https://developer.apple.com/videos/play/wwdc2023/10226/?time=400) to the `CustomStringConvertible` protocol on the specific element. +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_7.png) + +A new command called **[Do What I Mean Print](https://developer.apple.com/videos/play/wwdc2023/10226/?time=491)** has been added to be used at all times and to print the best possible description. +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_8.png) +The expression length has caused the `p` and `po` [aliases replacement](https://developer.apple.com/videos/play/wwdc2023/10226/?time=502) with this print command. + + +### Unified Logging +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_9.png) +Based on the rationale that `OSLog` is for [debugging](https://developer.apple.com/videos/play/wwdc2023/10226/?time=565), specific approaches to code writing may be [more appropriate](https://developer.apple.com/videos/play/wwdc2023/10226/?time=636)... +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_10.png) + +... to provide log information in the [most efficient manner](https://developer.apple.com/videos/play/wwdc2023/10226/?time=671) that can be easily parsed and examined later. +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_11.png) + + +## Testing +### [The basics](https://developer.apple.com/videos/play/wwdc2023/10175/?time=66) +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_14.png) +Highlighting key terms about the `Xcode` testing gives rise to a better understanding of the tests structure concepts. + +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_13.png) + +Refining the **runtime environment** for the tests and the **devices** on which they run are [critical parts](https://developer.apple.com/videos/play/wwdc2023/10175/?time=131) of testing. + +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_15.png) + +The combination of the above explained notions lead towards a [structured idea](https://developer.apple.com/videos/play/wwdc2023/10175/?time=196) of testing. + +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_16.png) + + +### [Overview](https://developer.apple.com/videos/play/wwdc2023/10175/?time=267) +![](../../../../../images/iOSdev/wwdc23-DebugAndTesting_17.png) + +The **test report** has been revised to provide a better user experience of what needs to be done for both the unit tests and the `UI` tests. + +
+ +