xunit / devices.xunit

xUnit.net Runners for Devices
Other
73 stars 36 forks source link

When I click on the test summary line, the runner quits instead of showing the tests #50

Closed NameOfTheDragon closed 6 years ago

NameOfTheDragon commented 7 years ago

I'm running this on a Raspberry Pi 3, with Windows 10 IoT Core 10.0.14393.576 "Anniversary update".

My unit test app builds, deploys and runs as expected. I can click "Run Everything" and all the tests run (some fail, this is expected).

However, if I click on the summary bar where it tells me how many tests there are, the runner app simply quits instead of showing the test details. It doesn't matter whether I do this before or after running the tests, the app always just quits.

xunit.runner.devices 2.1.0

clairernovotny commented 7 years ago

@NameOfTheDragon Does this repro on "regular" Desktop windows or Mobile? Is there an IoT Core emulator? Not sure how I can repro this otherwise.

Happy to take a PR or otherwise more info?

NameOfTheDragon commented 7 years ago

@onovotny No, this doesn't reproduce on desktop Windows 10. However, since this is a device runner, I wouldn't have thought that was really the prime use case. It is 100% reproducible on my Raspberry pi, though, even with an new test runner. The minimum code required to reproduce is here: https://bitbucket.org/tigra-astronomy/xunit.pirunner

I'm not sure that I'm really set up to investigate this myself but I will try to have a go at it over the next few days. Alternatively, if it would help, I can arrange to publish my Raspberry Pi through the firewall so you can debug it remotely. It wouldn't be ideal but it would at least make an investigation possible, and probably more realistic that me getting up to speed on building and debugging xunit.

NameOfTheDragon commented 7 years ago

I was able to build and deploy test.xunit.runner.uwp to my Raspberry Pi and when clicking on a list item, I get the following unhandled exception: image

The stack trace is:

   at Windows.UI.Xaml.Application.LoadComponent(Object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
   at Xunit.Runners.Pages.AssemblyTestListPage.InitializeComponent()
   at Xunit.Runners.Pages.AssemblyTestListPage..ctor()
   at Xunit.Runners.xunit_runner_uwp_XamlTypeInfo.XamlTypeInfoProvider.Activate_5_AssemblyTestListPage()
   at Xunit.Runners.xunit_runner_uwp_XamlTypeInfo.XamlUserType.ActivateInstance()

I found an occurrence of SearchBoxin AssemblyTestListPage.xaml and noticed this when hovering the mouse: image

NameOfTheDragon commented 7 years ago

OK, sure enough, removing that SearchBox from AssemblyTestListPage.xaml fixes the problem and allows me to expand the list items. I don't think there's much point in me submitting a PR with just that deletion, ideally we would need to find a replacement for the SearchBox control but I'm not sure how to mitigate this at the moment, so that's as far as I think I can take it. I think you have your 'smoking gun' though.

clairernovotny commented 7 years ago

Thanks, let me check with a few others about this. SearchBox is still documented as supported in the universal contract; just that the experience on Mobile may not be as good.

NameOfTheDragon commented 7 years ago

There’s no rush… enjoy Christmas! ☺

Best regards, Tim Long

From: Oren Novotny [mailto:notifications@github.com] Sent: 25 December 2016 20:00 To: xunit/devices.xunit devices.xunit@noreply.github.com Cc: Tim Long Tim@tigranetworks.co.uk; Mention mention@noreply.github.com Subject: Re: [xunit/devices.xunit] When I click on the test summary line, the runner quits instead of showing the tests (#50)

Thanks, let me check with a few others about this.

Sent from my Windows 10 phone

From: Tim Longmailto:notifications@github.com Sent: Sunday, December 25, 2016 1:26 PM To: xunit/devices.xunitmailto:devices.xunit@noreply.github.com Cc: Oren Novotnymailto:oren@novotny.org; Mentionmailto:mention@noreply.github.com Subject: Re: [xunit/devices.xunit] When I click on the test summary line, the runner quits instead of showing the tests (#50)

OK, sure enough, removing that SearchBox from AssemblyTestListPage.xaml fixes the problem and allows me to expand the list items. I don't think there's much point in me submitting a PR with just that deletion, ideally we would need to find a replacement for the SearchBox control but I'm not sure how to mitigate this at the moment, so that's as far as I think I can take it. I think you have your 'smoking gun' though.

- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/xunit/devices.xunit/issues/50#issuecomment-269132790, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABXHVFjlq42FVxZgasDch7Wk6nVQ8vmCks5rLrVqgaJpZM4LVHZK.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/xunit/devices.xunit/issues/50#issuecomment-269135491, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABNbCvDfS_nZpb1Nr9OKToUgNHeysJjrks5rLstZgaJpZM4LVHZK.

clairernovotny commented 7 years ago

I tried to fix this by using the AutoSuggestComboBox as recommended. Can you try the CI feed and let me know if it works for you on IoT?

The CI feed is https://www.myget.org/F/xunit-xamarin/api/v3/index.json and the fix is in 2.2.0-rc2-build0002 or later.

NameOfTheDragon commented 7 years ago

Thanks Oren, I will do my best. My Raspberry Pi system is not set up at the moment but I should be able to try something soon. --Tim