Your best course of action for the compact framework is to use
mouse_event(), keybd_event(), PostKeybdMessage(), etc. to send the user
actions to the application. Of course, you could, alternatively, just use
PostMessage() with suitable WM_COMMAND messages to tell the application that
a given button was pressed or something, rather than actually simulating the
mouse click down and then up again inside the outline of the button.
I see no way to use reflection to automate an application. You could use
reflection to find out about types, call methods, etc., but I think that
those types would all be instantiated inside your automation application,
not some other application on the device.
Paul T.
> hi Paul
>
[quoted text clipped - 34 lines]
>>> Thanks,
>>> Ink
ink - 14 Aug 2007 10:30 GMT
Thanks for getting back to me paul
These evernts (mouse_event(), keybd_event(), PostKeybdMessage() ) are they
framework events or do i have to use p/Invoke on the Corelib.dll?
You wouldn't happen to have an example of these being used?
Thanks,
ink
> Your best course of action for the compact framework is to use
> mouse_event(), keybd_event(), PostKeybdMessage(), etc. to send the user
[quoted text clipped - 49 lines]
>>>> Thanks,
>>>> Ink
Paul G. Tobey [eMVP] - 14 Aug 2007 16:08 GMT
They're native calls, so you'll have to P/Invoke them. I'm not sure about
mouse_event, but I'm pretty sure that the keyboard items are in OpenNETCF's
Smart Device Framework. I'll check...yes, they're in core.cs in v1.4 (no
sign of mouse_event). There are some example uses of the call in the
framework itself, so that might help. keybd_event() is the low-level call
and would mostly be used to press 'keys' like Ctrl and Alt.
PostKeybdMessage() works better for sending actual characters, like what
would happen if you pressed Shift+A or something.
Paul T.
> Thanks for getting back to me paul
>
[quoted text clipped - 59 lines]
>>>>> Thanks,
>>>>> Ink
<ctacke/> - 14 Aug 2007 23:52 GMT
mouse_event can be grabbed from my kluge code here:
http://blog.opennetcf.org/ctacke/PermaLink,guid,f281d989-ee71-4fdf-9ced-63fd37ac
731d.aspx

Signature
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com
> They're native calls, so you'll have to P/Invoke them. I'm not sure about
> mouse_event, but I'm pretty sure that the keyboard items are in
[quoted text clipped - 70 lines]
>>>>>> Thanks,
>>>>>> Ink
I'm not sure why you would want to test all 50 devices - unless they are
different devices and different versions of the OS.
But have you tried using Hopper:
http://msdn2.microsoft.com/en-us/library/bb158517.aspx
It's a fairly basic rugged tool that is quite good for basic testing.

Signature
Simon Hart
http://simonrhart.blogspot.com
> hi Paul
>
[quoted text clipped - 32 lines]
> >> Thanks,
> >> Ink
ink - 14 Aug 2007 10:26 GMT
I want to automate tests primarily for load testing.
We actually have closer to 1500 devices in use at any given time and waiting
until the pilot faze to do a decent load test is unacceptable.
And this kind of thinking has already caused a few embarrassing situations,
not necessarily problems with the code.
But we have had things like Wifi Drivers crashing, Key board crashing and OS
crashing after just a few hours of usage. And most of these issues are to do
with the OS setup on the Symbol devices.
I also want to automate them so that regression testing can be done over
night.
Thanks for the Link I will have a look at it now.
ink
> I'm not sure why you would want to test all 50 devices - unless they are
> different devices and different versions of the OS.
[quoted text clipped - 44 lines]
>> >> Thanks,
>> >> Ink
Simon Hart - 14 Aug 2007 22:46 GMT
You would be better office writing a unit test to simulate load as I am
assuming you want to test your back office/middleware?

Signature
Simon Hart
http://simonrhart.blogspot.com
> I want to automate tests primarily for load testing.
>
[quoted text clipped - 63 lines]
> >> >> Thanks,
> >> >> Ink