SiriKit + Testing: Add support for communication of siri response
| Originator: | designatednerd | ||
| Number: | rdar://32678698 | Date Originated: | 09-Jun-2017 11:15 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | iOS 11.0.0, Xcode 9.0.0 |
| Classification: | Enhancement | Reproducible: | Always |
Summary: In the advanced SiriKit session, the presenter showed off the updated API for UI testing Siri intents. It looked awesome, but it seems to be missing a key piece: Being able to know that Siri has responded. To test this with just UI is fragile, because it depends on UI that Apple controls and can change whenever y’all want, so that’s not really a viable option. The presenter’s solution during WWDC ’17 was to add a 5 second sleep during which time the UI would appear and respond. Even in the presentation, this was a little goofy because Siri would respond well before the 5 seconds elapsed. In talking to the presenter afterwards, he mentioned this was because he was trying to avoid using the Apple UI for that. What would probably be better than just a `sleep` of a random duration is some kind of expectation or predicate which could use the same cross-process communication as the updated APIs for XCUI testing to pass back a) that Siri has responded and b) What Siri’s response is. This would allow faster testing and for the developer to handle the user’s intentions more clearly. Steps to Reproduce: Watch towards the end of WWDC 2017 video for session 228, Making Great SiriKit experiences, for the presenter’s example. Expected Results: Not have to depend on either Apple UI or sleeps to be able to validate that Siri was invoked. Actual Results: You have to depend on either Apple UI or sleeps to be able to validate that Siri was invoked. Version: iOS 11.0.0, Xcode 9.0.0 Notes: The stuff to *send* an intent is awesome, but not having anything where we can validate that it was received or how it was handled makes that whole interaction a LOT more awkward to test.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!