Question

We are writing a relatively heavyweight C# GUI with some syncFusion(GUI framework) components. I would like to add client logging capability that QA could later use to playback client events in order to analyze bugs or other workflow the client used in production.

Does such a ready made module for record and playback of all client keystrokes, mouse events etc. exist? (C++ module might work too if it can easily be integrated into the windows C# client.)

I would also like to use the logs generated for analysis of what features of the client were used the most and what features are rarely ever used in order to decide what bugs should get priority and what features should be dropped/enhanced? So basically I'd like the client to write a log to local disk or over the network back to server.

I am also somewhat worried about performance, some hit is acceptable, but any idea how much would logging of every event degrade the client performance?

Point here is to have logging of all client events in production, not QA testing per-se.

Edit based on Aydsman's comments: After reading old similar discussion as well as Benji's site looks like there is lot of interest in this type of "dashboard", but no open or closed product or solution exist at this time. I posted a question on the status on Benji's site, but site looks rather quiet, no responses since June. Benji's ideas are more or less exactly what I was looking for, but no product seems to exist yet, which is rather surprising, I suppose lack of existing products means implementing such a system must be more complicated than I initially thought. Will keep looking and hope to find something later.

Was it helpful?

Solution

As has been alluded to by other posters here, there are commercial products that do this sort of thing. If you want to write your own you need to create what is called a System Hook DLL. This can be done in C++ fairly simply. If you create one, you can probably integrated it easily using pinvoke. In fact, I would start by look at pinvoke.net for people who have already done something similar.

A hook DLL allows you to intercept all mouse and keyboard events. You can also inject mouse and keyboard events. So if you put these two together: intercept = record, and inject = playback.

Here's a good list of articles to get you started: Code Project Hook DLLs

OTHER TIPS

Why write code, when you can buy a product to perform automated GUI testing?

Have you heard of log4net? I have used it on a small scale in one project- it may suit your needs. I have also done some research into Aspect-Oriented and IoC techniques for logging. There is some performance impact depending on the particular technique, but it can make the maintenance of logged code easier. The Spring.NET port for the Spring Framework offers some options for general purpose, method-level logging. You could use some combination of these to generate "script" files of activity, and a "replay" module that could read and re-execute logged actions in a test environment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top