Is there a way to automate testing Windows forms?

I am familiar with nunit for unit testing the business layer, but now I am looking to automate the gui win win level test.

I saw watin and the watin recorder to automate tests in a web application, accessing and automating controls. However, I do my best to find the batting equivalent for window forms (written in C # or vb.net), preferably open source.

Is there one or all of the products based on recording mouse clicks and keyboards?

Update: I looked at this blog post on white and it looks like what I'm looking for. A blog post causes some problems, but since whites are only in version 0.6, this can be resolved. Be interested if others used white or any other for comparison.

+49
c # winforms automated-tests
Aug 24 '08 at 21:10
source share
7 answers

Check out http://www.codeplex.com/white and http://nunitforms.sourceforge.net/ . We have successfully used the White project.

Same answer to previous question

edit

The White project has been ported and is now on GitHub as part of TestStack.

+24
Aug 24 '08 at 21:15
source share
β€” -

AutomatedQA TestComplete is a good test application for automating GUI testing. It supports more than just Windows Forms, so you can reuse it for other applications. This is not an open source, and this is the best I have found. I have not seen an open source equivalent to WatiN. He has a free trial because you decide whether you like it or not. The main reason I went is that it is really economical compared to other test applications.

+7
Aug 24 '08 at 21:12
source share

As a new alternative, I can give you FlaUI ( https://github.com/Roemer/FlaUI ). This is basically a complete rewrite of white with a lot of features and a clean code base.

+4
Mar 11 '17 at 21:31 on
source share

As far as I know, White is an abstraction layer on top of Microsoft UI Automation . I wrote a similar layer that we use inside our projects and it works great. So White will certainly be worth a look.

Microsoft has released a source for automating the user interface, so if necessary, you can debug the entire contents of the stack, if necessary.

It's really great that with the cost of a license, you can scale and run as many machines as you want to run.

We run inside VSTS and associate our results with requirements, but you can use C # express and nUnit and get first-class tools and languages ​​with virtually no cost.

+2
Dec 26 '08 at 6:18
source share

Here are some links from MSDN Magazine to the automated test code:

  • Using UIAutomation Bugslayer March 2007
  • Using PowerShell Test Run December 2007
  • Tester, a utility for recording mouse clicks and keystrokes, then playing them back and checking programs. Great for unmanaged code. Uses Windows handles, so it may not work well for managed code. Bugslayer in March 2002.
+2
08 '09 at 7:14
source share

You can check out Microsoft UI Automation . This has been included in .NET since version 3.0. This is actually what the white structure uses.

+1
Oct. 14 '08 at 13:06
source share

You can use the Coded UI , the Visual Studio built-in function, and part of the user interface automation:

Automated tests that run your application through its user interface (UI) are known as coded user interface tests (CUITs) . These tests include functional testing of user interface elements. They allow you to verify that the entire application, including its user interface, is functioning correctly. Coded user interfaces are especially useful where there is validation or other logic in the user interface, such as the network page. They are also often used to automate an existing test guide.

[...] a typical development experience may be one where, initially, you just (F5) and click on the user interface controls to make sure everything is working correctly. Then you can decide to create a coded check so that you do not need to continue testing the application manually. Depending on the specific functionality tested in your application, you can write code for a functional test or for an integration test, which may or may not include testing at the user interface level. If you just want to access some kind of business logic, you can enter the unit test code. However, in certain circumstances, it may be useful to include testing various user interface elements in your application. A coded UI test can automate the initial (F5) script by verifying that code rejection does not affect the functionality of your application.

More details: https://docs.microsoft.com/en-us/visualstudio/test/use-ui-automation-to-test-your-code

0
Mar 31 '17 at 0:50
source share



All Articles