Skip to content

Commit da0abbf

Browse files
Add extra log messages to help debug UI test in CI
1 parent 9945868 commit da0abbf

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

UITests/UITests.App/App.AppService.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ private async void OnAppServiceRequestReceived(AppServiceConnection sender, AppS
5050
return;
5151
}
5252

53+
Log.Comment("Received Command: {0}", cmd);
54+
5355
switch (cmd)
5456
{
5557
case "OpenPage":

UITests/UITests.Tests.Shared/TestAssembly.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,14 @@ private static async Task<bool> SendMessageToApp(ValueSet message)
9898

9999
internal static bool CheckResponseStatusOK(AppServiceResponse response)
100100
{
101+
object message = null;
102+
var hasMessage = response?.Message?.TryGetValue("Status", out message) is true;
103+
104+
Log.Comment("[Harness] Checking Response AppServiceResponseStatus({0}), Message Status: {1}", response.Status.ToString(), message?.ToString());
105+
101106
return response.Status == AppServiceResponseStatus.Success
102-
&& response.Message.TryGetValue("Status", out var s)
103-
&& s is string status
107+
&& hasMessage
108+
&& message is string status
104109
&& status == "OK";
105110
}
106111

0 commit comments

Comments
 (0)