Answered by:
Running metro apps headlessly

Question
-
Hi there. I've hit a bit of a roadblock, and I'm hoping someone can help!
I've written a metro application that serves as a unit test runner, and I now need to be able to call this application headlessly so that it can be used for validation in the build process. The way the metro app works is it runs a bunch of unit tests, generates an xml file that contains the test results, and displays the results to the user.
Ideally, I would have a simple script that would run the metro app, and execute the tests, exit the app, and then have the ability to read the results in the generated xml file. Is this possible, and if so, what's the best way to do it?
Here are some more specific questions:
- How can one start a metro app headlessly, and in the metro app is there a way to detect this so that it does not wait for user input?
- Is it possible to access files within the package of a metro app from an outside process?
Thanks in advance!
Monday, April 16, 2012 5:49 PM
Answers
-
Hello,
•How can one start a metro app headlessly, and in the metro app is there a way to detect this so that it does not wait for user input?
You can use UI automation tool for metro style app
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/498588ae-51c0-43c9-8f31-e3d960f00297/•Is it possible to access files within the package of a metro app from an outside process?
Please check this thread
http://social.msdn.microsoft.com/Forums/en/winappswithcsharp/thread/0268dbe3-4ea9-4889-bc26-583ff2760708Best regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
- Proposed as answer by Jesse Jiang Wednesday, April 25, 2012 7:07 AM
- Marked as answer by Jesse Jiang Tuesday, May 1, 2012 8:04 AM
Tuesday, April 17, 2012 7:19 AM
All replies
-
Hello,
•How can one start a metro app headlessly, and in the metro app is there a way to detect this so that it does not wait for user input?
You can use UI automation tool for metro style app
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/498588ae-51c0-43c9-8f31-e3d960f00297/•Is it possible to access files within the package of a metro app from an outside process?
Please check this thread
http://social.msdn.microsoft.com/Forums/en/winappswithcsharp/thread/0268dbe3-4ea9-4889-bc26-583ff2760708Best regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
- Proposed as answer by Jesse Jiang Wednesday, April 25, 2012 7:07 AM
- Marked as answer by Jesse Jiang Tuesday, May 1, 2012 8:04 AM
Tuesday, April 17, 2012 7:19 AM -
Thanks Jesse. It seems like what I'm trying to do is not easy. Since the purpose of my app is to run unit tests through with a nice GUI, I think I'll just a custom Visual Studio test runner to handle the automation side... *sigh*Tuesday, April 17, 2012 5:15 PM