Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for running test on UWP runtime #302

Open
ivanz opened this issue Jul 30, 2016 · 1 comment
Open

Support for running test on UWP runtime #302

ivanz opened this issue Jul 30, 2016 · 1 comment

Comments

@ivanz
Copy link
Contributor

ivanz commented Jul 30, 2016

MSpec 0.11 is .NET Standard 1.3+ compatible, which means one can happily add the NuGet package to a UWP project.

I ported "dotnet-test-mspec" to target UWP in a spike ( https://github.com/ivanz/dotnet-test-mspec/tree/uwp-support )- however when I run dotne test it appears UWP has a security model which is makes things a bit more complicated: https://xunit.github.io/docs/getting-started-uwp.html.

@NameOfTheDragon
Copy link
Contributor

Xunit has the "runner for devices" that can run tests on (for example) a Raspberry Pi running Windows 10 IoT Core (under UWP).

What I've been doing lately is putting all my testable code into a .NETStandard class library (which I can test directly) and then referencing that from my UWP code via NuGet. My tests are in a .NET Core class library and I use MSpec with NCrunch to run the tests, this works well for me.

However, where the problem comes is where you need to reference namespaces that are not available in NETStandard, such as the Windows.Devices namespace that is specific to IoT Core. I haven't found any way to reference that namespace outside of a UWP application or library, so any such code can only be tested running under UWP - so some sort of UWP test runner is probably going to be needed.

I wonder if, rather than hacking at the UWP security model, it might be better to approach it by having a UWP specific test runner and discovery engine that communicates with the actual test runner using some sort of RPC mechanism. I confess, I don't really have a goo d grasp of all the subtleties of UWP so this may be a crazy idea!

@robertcoltheart robertcoltheart added this to the 2.0.0 milestone Jun 12, 2019
@robertcoltheart robertcoltheart modified the milestones: 2.0.0, 3.0.0 Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants