Click here to Skip to main content
13,451,773 members (44,755 online)
Rate this:
Please Sign up or sign in to vote.
Hello All ,

I have developed one windows application which has 4 text boxes to display calculated values from sql server query.

I am following below process for data validation.
1) Take each query which has been used behind each text box.
2) Run each query manually into sql server and manullay match result of sql server with the values of repestive text box on application .

Now I want to automate this process and looking for freeware GUI testing tool which will do like this :
I will create test case like
a) Start gui testing tool
b) whch will record text box value from application
c) Automatically run respective query into sql server (Or using OLDB connection internally)
d) Match both values return back test result.

Pleae suggest me.
Posted 8-Jan-13 22:28pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


See here, there are plenty to choose from:[^]

There is an interesting article on Codeproject that describes how to use the White framework to perform the tasks you want to do.
White: An UI Automation Tool for Windows Application[^]

The White framework can be found there:[^]

Another tool you could use is AutoIt. it's not open-source, but it is a freeware and should be able to do the job you want to do:[^]

If you are using Visual Studio (premium and ultimate editions), have a look at CodedUI. This is really good and powerful.[^]

Rahul Dhoble 15-Jan-13 23:40pm
Thanks Valry . But none of above helpful for me not suited for my requirement.
Andreas Gieriet 16-Jan-13 0:00am
If you can spend a few hundred dollars, there is at least Ranorex that covers your requirements as stated above: Record, Playback, Assert, Log.
I use it since several years.
Works like a charm!
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

To consider:

  1. Assuming you have separated the GUI from the business logic, I strongly suggest to test the businesslogic independent from the GUI. E.g. in .NET by means of MVVM and run tests based on the provided commands.
  2. GUI Test is then only for checking if the GUI properly connects to the business logic (e.g. if the open menu really triggers the open function and not for example the save function, etc.)
  3. Finally, you don't get away without manual GUI tests: rendering, color, readability, clipping, etc. needs visual inspection. I.e. I doubt that you get robust automation for these topics.

E.g. in your example, you would have a ViewModel that provides the SQL queries (not the GUI, the GUI in this scenario does not know anything about SQL...). You would test the ViewModel without the GUI and check the proper response from the business logic again in the ViewModel. The GUI test then only checks if the correct function is triggered, i.e. if each text box is bound to the right ViewModel property.

Separate GUI from the rest - DFT (Design-For-Test)!

Rahul Dhoble 15-Jan-13 23:40pm
Not helpful
Andreas Gieriet 15-Jan-13 23:54pm
Right, not a direct answer to your questions.
Still, "to consider", I think, that design-for-test is a crucial tool for effectively testing business logic as you describe in your question.
If you just run one or two business logic tests over GUI, that's fine. If you run millions of variations or if you want to test error handling, etc. you simply do not have the time to wait that long. My experience is that a GUI tests is about 100-1000 times slower than a pure algorithmic test.

Reason: you have to wait for the UI manager to react. The round-trip of keypress, mouse move/click, dialog/menu/textbox/combobox/listbox/... rendering etc. lasts some fraction of *seconds* each (*not* fractions of milliseconds).

So, GUI test are needed (either manual or automated), and you got plenty of good links in the other solution, but I consider business logic tests over GUI not as an effective approach.

Just my 5 cents.

Rahul Dhoble 16-Jan-13 0:02am
Good Explanation Andi . I like it . My 5
Andreas Gieriet 16-Jan-13 3:06am
Thanks for your 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01-2016 | 2.8.180318.3 | Last Updated 13 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100