Testing Metro style windows 8 app

Best practices, code snippets for common functionality, examples, and guidelines.
vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Testing Metro style windows 8 app

Post by vasudha.c8 » Fri Dec 07, 2012 6:11 pm

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

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Testing Metro style windows 8 app

Post by Ciege » Fri Dec 07, 2012 6:27 pm

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...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Re: Testing Metro style windows 8 app

Post by vasudha.c8 » Fri Dec 07, 2012 6:35 pm

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.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Testing Metro style windows 8 app

Post by Ciege » Fri Dec 07, 2012 6:38 pm

Can you post the code you are using to start your app (that is causing this error) please?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Re: Testing Metro style windows 8 app

Post by vasudha.c8 » Fri Dec 07, 2012 6:41 pm

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.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Testing Metro style windows 8 app

Post by Ciege » Fri Dec 07, 2012 6:53 pm

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.
Last edited by Ciege on Sat Dec 08, 2012 12:19 am, edited 1 time in total.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Re: Testing Metro style windows 8 app

Post by vasudha.c8 » Fri Dec 07, 2012 6:55 pm

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.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Testing Metro style windows 8 app

Post by odklizec » Fri Dec 07, 2012 9:33 pm

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
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Re: Testing Metro style windows 8 app

Post by vasudha.c8 » Fri Dec 07, 2012 10:07 pm

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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Testing Metro style windows 8 app

Post by odklizec » Fri Dec 07, 2012 10:23 pm

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
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Re: Testing Metro style windows 8 app

Post by vasudha.c8 » Fri Dec 07, 2012 11:42 pm

Thank you.

vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Re: Testing Metro style windows 8 app

Post by vasudha.c8 » Fri Dec 07, 2012 11:43 pm

If anyone has faced similar kind of issue plz let me know how to resolve it.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Testing Metro style windows 8 app

Post by Ciege » Fri Dec 07, 2012 11:52 pm

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...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

vasudha.c8
Posts: 16
Joined: Fri Dec 07, 2012 6:05 pm

Re: Testing Metro style windows 8 app

Post by vasudha.c8 » Sat Dec 08, 2012 12:06 am

Yes and also i tried launching another app but still i got the same error message.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Testing Metro style windows 8 app

Post by Ciege » Sat Dec 08, 2012 12:18 am

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?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...