Simulate user input with Windows Phone 7 Emulator - windows-phone-7

I've seen examples of using the Microsoft.Smartdevice.Connectivity.dll library to deploy WP7 applications to the emulator.
Is it possible to then automate user input to the device as well to perform UI testing of the application running in the emulator?

The emulator doesn't include support for this.
However, if you were using a UI test automation tool you may be able to simulate the clicks/UI interaction from a script runnign on the host PC.
I've never used a UI automation test tool with a VM/emulator but that's currently the only option available to you.
Unless you have a very complicated application it may be quicker and easier to test the UI manually though as a tool wouldn't be able to query the state of the app running in the emulator and so would only have limited usage.

Related

Multitasking while UFT run

I would like to work on other applications when UFT is running on an application. Presently I don't see any option like this, is there a way to accomplish this?
For some applications (typically windows based) UFT takes control of the mouse and keyboard which interferes with normal work on the computer. For most technologies this is not an issue since UFT does not interfere with the input devices. If possible it's always better not to work on the computer that's running tests, you can install UFT on a virtual machine and continue working on your physical machine.

Hardware Integration Testing in Xamarin Test Cloud

We would like to have functional tests which require our app to connect with external hardware device.
We know that we can record the test cases and run then with mobile device connected via USB from Visual Studio.
But, can anybody confirm if Xamarin Test Cloud provides any way of setting up Test Server with set of mobile devices to perform Hardware connectivity/bluetooth communication testing with Mobile App under Test?
Thanks
Dhavan
No, they do not provide this at the moment.

Windows Phone Test Framework by Expensify

Does the Windows Phone Test Framework by Expensify support testing on real mobile devices running windows phone 7 OS ?
If yes, which devices does it support? Please reply.
It depends what functionality you want to test.
The framework uses 3 different APIs to talk to the apps:
a COM API to talk to install/uninstall and start/stop apps
Silverlight automation peer support (communicated to using HTTP) to
talk to the silverlight controls within the apps - this allows get
and set of values, some list manipulation and inspection of the
visual tree.
Mouse and keyboard emulation to control the emulator
device - this is needed to do things like physical touches, hard
button presses (and other emulator interactions when the app isn't
running - e.g. taking photos).
For devices attached using USB: 1 and 2 are available
For devices attached using a network: 2 only is available
In summary, you can do some things if you want to... but I don't use the test framework to test real phones - I stick to the emulator. When external inputs (e.g. camera or gps) are needed then I find a way to mock them
according to the first few seconds of http://www.youtube.com/watch?v=2JkJfHZDd2g "there is some support for devices".
I would hope/expect all devices to devices to behave the same way, subject ot how they're configured.

desktop app (windows app) connect windows phone

is there a assembly or API to get isolated storage in windows phone using WPF or win form while connecting the windows phone device via USB?
please note the devise will be running offline so cannot use web service or WCF
thanks
Check out this article on emulator automation. It includes details of adding and removing files from isolated storage and should also work on an actual device as well as the emulator.
This isn't really a supported activity. I too have been thinking about what to do when you want a desktop version with extended features and you want the two to share data.
I think the key here is to think about how Microsoft achieves this with email and calendaring. There's no shared filesystem, rather Outlook on the desktop and Outlook on the phone both function as clients for the same Exchange server.
At one point I considered running a webservice in a desktop app so that the phone app could push data to the desktop app, but that would be a very manual process. The common-server model will provide a much better UX.
It's not an exact match to your situation, but a good tool is the Windows Phone 7 IsolatedStorage Explorer.
The reason I say it may not be the best match is this note from the documentation:
The WP7 Isolated Storage Explorer
supports connections from the emulator
or actual devices. For applications
running on devices a data connection
must be enabled (WiFi or the mobile
data connection).
It's at least a great start and keeps you from having to do the heavy lifting. Is there any reason you have to be offline and check the contents of IsolatedStorage? If you elaborate on why you have that requirement, we might be able to offer some work arounds.

How to hook api in windows phone 7?

Is there something allow me to develop a software in wp7 just like API MONITOR in windows?
Windows Phone has some native API hooks (although undocumeted):
http://blog.walshie.me/2010/11/12/windows-phone-7-native-apps-the-missing-link
However, due to the restrictive nature of the OS you might have problems in tracking down API calls from other applications, since you will need to have your own app running in the background, and that is currently the privilege given to system apps only.

Resources