An automation Testing framework which provides UI testing for both legacy and UIAutomation Clients.
  • Simple Spy tool for identifying controls on your application. It can be customized by writing your own plugin extenders where in one can manipulate controls whether it has UI automation support or not.
  • Can be used with any popular Unit Test Framework or Fitnesse type of fixtures. For example you can write simple UnitTest cases using MSTest or NUnit (or) you can use Fitnesse type of fixtures to automate your application tests.
  • Support for Native , WINFORMS, and WPFs thru plugin architecture

Why this tool developed?

The primary reason is, I wanted a simple and cleaner way of automating UI tests. And often time, controls on the screen does not come with proper UIAutomation peer support or often time you fight with commercial tools with unsupported 3rd party controls. so what, just imagine about custom developed controls or legacy controls on the projects which does not aware of anything about something called UI automation!. It would be even harder if you end up with controls that renders data on paint events only and no way to read that display isn't it? Here is the cool solution for you. I introduced something called plugin extenders where write your own to manipulate controls easily the way you want.

uiautomation.jpg

There are multiple ways that you can use this framework to automate your UI Test. Some suggestions are MSTest, NUnit or Fitnesse Slim. Use of Fitnesse Slim tool to write automation scripts are ideal for Testers who do not want to deal with programming.

Here is an example of an MSTest:-


using Microsoft.VisualStudio.TestTools.UnitTesting;
using QAPro.TestControl.Framework;
using QAPro.TestControl.Framework.NativeControls;
using System;

namespace QAPro.TestControlTests
{
    [TestClass]
    public class FindControlTest
    {
        private const String DemoAppWorkingDir = "";
        private const String DemoExename = "DemoApp.exe";
        private const int TwoSecWait = 2;
        private TestApplication _testApp;

        [TestInitialize]
        public void BaseState()
        {
            _testApp = new WinFormTestApplication(DemoAppWorkingDir, DemoExename);
            _testApp.Terminate();
            _testApp.ShowDesktop();
            _testApp.Run();
        }

        [TestCleanup]
        public void Cleanup()
        {
           _testApp.Terminate();
        }

        [TestMethod]
        public void TestButtonControl()
        {
            var button = new ButtonControl(_testApp);                
            button.SystemUnderTest(new ControlDef<FindControl>(
                                                () => new FindWindow("Demo Form"),
                                                () => new FindByAutomationId("buttonOk")
                    ));
            button.Click();
        }

        [TestMethod]
        public void TestTextControl()
        {           
            var textBox = new TextBoxControl(_testApp);
            textBox.SystemUnderTest(new ControlDef<FindControl>(
                                                () => new FindWindow("Demo Form"),
                                                () => new FindByAutomationId("textBox1")
                    ));
            textBox.Text = "";
            Assert.AreEqual("", textBox.Text);
            textBox.Text = "all is well";
            Assert.AreEqual("all is well", textBox.Text);
        }
    
    }
}


SimpleSpy

simplespy.jpg































Last edited May 6 at 3:28 PM by senips, version 32