tomkuijsten / restup

Webserver for universal windows platform (UWP) apps
MIT License
114 stars 48 forks source link

Unit Tests on Local Machine #101

Closed ghost closed 7 years ago

ghost commented 7 years ago

I don't think this is an issue with Restup specifically (and I'm sorry if I'm breaking protocol here) but have you ever tried to run any of the the Restup unit tests on your local development machine ("Local Machine") rather than deploying them to an external source (Pi or emulator or whatever)? There's some type of exclusion for UWP on Local Machine to be able to access localhost of every the local ip address that I can't quite figure out and I was wondering if you have had the same issue. If so, how do you configure the solution?

tomkuijsten commented 7 years ago

Those unit tests are actually performed during our build, no issues there.

dapug commented 7 years ago

I'm also not seeing how to run this from local dev machine (works ok on Pi of course). For example: using the HeadedDemo, set platform to x86 and launch locally. In the browser, go http://192.168..:8800/api/simpleparameter/2/property/propname and I get nothing. (ip of local machine)

So then I tried fiddler and enabled loopback for UWP, but not only does that not work, but simply running fiddler actually kills the HeadedDemo from pinging itself on 127.0.0.1.

What's the trick?

UPDATE: I posted this before I saw the FAQ: https://github.com/tomkuijsten/restup/wiki/FAQ (I can't connect to restup / HeadedDemo / HeadlessDemo from my local machine)

Dang it, what I am attempting is not supported (deliberately blocked even for dev scenarios) by MS. Sucks.

Jark commented 7 years ago

@jamoeder it's possible to run the unit tests locally. You have to make sure the unit tests are built after you switch the architecture of the project to x86 (or x64) by right-clicking the "Solution->Configuration Manager". I rarely work on restup using the Raspberry PI and always run the unit tests locally first.

@dapug yeah it is pretty annoying, if you really need it you could maybe try letting the one process start the other process to have both in the same process? It's still quite a hacky solution.

Jark commented 7 years ago

closing this since there is no reply. If you still have problems with restup, feel free to open a new issue.