Page 1 of 2
Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 6:11 pm
by vasudha.c8
Hi,
I am trying to test my windows 8 metro style app through ranorex trial version, which needs me to invoke the .exe version of the app. I wanted to know how to invoke my application which is in C# developed in Visual Studio 2012 through ranorex for testing it.
I would really appreciate if my query is resolved.
-Thanks
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 6:27 pm
by Ciege
Did you happen to read this yet?
http://www.ranorex.com/blog/automating- ... -aka-metro
Does that answer your question? Or could you be a little more specific about what it is you can't do right now and what (if any) errors you are receiving...
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 6:35 pm
by vasudha.c8
Thank you for a quick reply.
Yes I have read that and also followed the steps too but i am constantly getting an error saying
System.ComponentModel.Win32Exception (0x80004005): This application can only run in the context of an app container at System.Diagnostics.Process.StartWithShellExecuteEx.
if i try to invoke a live tile of my application.
And also i dont know how to invoke the app from visual studio.
Basically what I am trying to do is to test the UI of the application before submitting to Windows store.
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 6:38 pm
by Ciege
Can you post the code you are using to start your app (that is causing this error) please?
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 6:41 pm
by vasudha.c8
I am trying to start the app by the following code in the Program.cs class of ranorex test file.
System.Diagnostics.Process.Start("C:\\Users\\Vasundhara\\Desktop\\BookStore.exe");
It comes at this point and i get the error.
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 6:53 pm
by Ciege
Hmm, that looks OK.
Some thoughts:
*) Make sure you an the administrator on the machine.
*) Launch the app in administrator mode.
*) Try turning off UAC.
*) Try disabling any anti virus.
*) Verify the path to the exe is correct.
*) Try the same test on a different OS (i.e. Win7).
*) Google search that error and see if you can find something else...
To be fair, I've not done any Win8 testing yet so I am not sure if this is something specific to Win8.
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 6:55 pm
by vasudha.c8
I am trying find out more about it but very less information is available. Thanks .
if anyone knows how to test Visual studio applications in ranorex then it would be helpful.
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 9:33 pm
by odklizec
Maybe you should try the most recent Ranorex 4.0 with direct Windows 8 support.
See the release notes here:
http://www.ranorex.com/download/release ... html#c4772
You can get the version here:
http://www.ranorex.com/download/downloa ... html#c4773
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 10:07 pm
by vasudha.c8
Thanks.
Is there any documentation or web links where i can get to know the detailed procedure of how to test the win 8 metro style apps?
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 10:23 pm
by odklizec
As far as I know, there are only two Metro-related documents provided by Ranorex. The blog mentioned by Ciege and the General Troubleshooting section:
http://www.ranorex.com/support/user-gui ... html#c4709
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 11:42 pm
by vasudha.c8
Thank you.
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 11:43 pm
by vasudha.c8
If anyone has faced similar kind of issue plz let me know how to resolve it.
Re: Testing Metro style windows 8 app
Posted: Fri Dec 07, 2012 11:52 pm
by Ciege
Did you try any of the tips I put up above?
Try also launching a different app instead of your test app since the System.Diagnostics.Process.Start should work. Trying a different app (like calculator or notepad or something) will help determine if there is an issue with you app and UAC or permissions, etc...
Re: Testing Metro style windows 8 app
Posted: Sat Dec 08, 2012 12:06 am
by vasudha.c8
Yes and also i tried launching another app but still i got the same error message.
Re: Testing Metro style windows 8 app
Posted: Sat Dec 08, 2012 12:18 am
by Ciege
Are you writing your tests in VS using the Ranorex references or are you using the Ranorex IDE?
Are you doing record & playback or are you writing your own code?
If using the Ranorex IDE, have you tried just adding a run an application step in your test suite?
http://www.ranorex.com/support/user-gui ... html#c2947
Can you start the app manually?