"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

February 24, 2012

Note on success of GUI automation

There are plenty of blogs which recommend
  • When to Automate, At what stage of project execution (working feature set, stable application etc..)
  • What to Automate, How to identify a test case for automation (repeatable steps, stable feature, regression cases, BVT cases etc..)
This post is a example on determining quality of automation suite. This stackoverflow answer is my motivation for this post
 
Joe Strazzere answer is simple, straight forward and portrays real world scenario. Below is snap of the answer underlined important lines in my perspective
 
 
What to focus on Automation 
  • Tests focusses on basic scenarios and slowly extending to cover end to end functionality
  • Execute 10~15 core functional scenarios
What not to focus on automation
  • Merely focussing one existence of ids
  • Testing the front end without connecting underlying layers
What is good automated test case ?
  • Login to online shopping portal
  • Search for products (query the DB to fetch products)
  • Invoke web service involved to fetch results
  • Compared returned results in UI vs Web Service Results
What is not efficient automated test case ?
  • Login to online shopping portal
  • Search for products which are hardcoded
  • Compared returned results in UI with predetermined hardcoded results
If you find your automation tests pass and your manual test identifies bugs then it is a indicator for automation test cases improvement. What matters is Quality not Quantity !!
 
Happy Learning!!! 

February 11, 2012

Telerik Test Studio Webinar

There are lot of test Tools available in market. I attended Telerik Test Studio session. The tool is focussed on Microsoft Platform (Web Testing WPF/Silverlight). Session was useful to understand Product Portfolio, features

Notes from the Session
  • Overview and benefits of test automation covering rerunning test cases, reduce test execution efforts, eliminate human error etc..
Test Studio
  • Inbuilt Scheduling Engine
  • Performance Test Support
  • Integration withing TFS
  • Cross browser testing support
  • Microsoft Platform focussed test product (WPF/Silverlight)
  • Data Driven Testing Support
More Details - Link
 
Express Edition Features
  • Available as a VS plugin
  • Generate unit test cases which can be run using NUnit, XUnit, MbUnit
Demo
  • Record and playback of Web Test was demonstrated in the session
  • This made me to remember VSTT web test record and play back feature
It would be interesting to download and Evaluate Telerik Free Testing Framework
 
Happy Learning!!

February 09, 2012

Tool Developer Notes - Part III

[Previous Post in Series - Tool Developer Notes - Part II]
[Next Post in Series - Tool Developer Notes - Part IV]

Adding few more interesting notes based on learning's

Tip #1 - Working with DateTime Picker in C#. Requirement was to write in specific format. Provided below is an example using WinForms Application


For the Submit button try out the sample code for Setting date, Adding Duration

        private void btnSubmit_Click(object sender, EventArgs e)
        {
            int duration = 0;
            DateTime CurrentTime;
            String CurDate;
            duration = Convert.ToInt32(txtDuration.Text);
            CurrentTime = dTPTimeSet.Value;
            for (int i = 0; i < 10; i++)
            {
                CurDate = CurrentTime.ToString("MM/dd/yyyy hh:mm");
                MessageBox.Show(CurDate);
                CurrentTime = CurrentTime.AddMinutes(duration);
            }
        }


Tip #2 - Check if string is GUID. Tweaking the code from Stackoverflow question

public static bool IsGuid(string guid)
        {
            if (!string.IsNullOrEmpty(guid))
            {
                Regex regex = new Regex(@"^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$");
                return regex.IsMatch(guid);
            }
            return false;
        }

Tip #3 - Loop through all files in a directory
How to loop through all files in a folder using C#

Tip #4 - Last File Created time in a directory
using System.IO.DirectoryInfo we find last file created time in a directory

string Folder = @”C:\Test”;
DirectoryInfo dinfo = new DirectoryInfo(Folder).GetDirectories("*", SearchOption.AllDirectories).OrderByDescending(d => d.LastWriteTimeUtc).First();
//Find the Last File Created Time in Directory
DateTime LastCreatedTime = dinfo.LastAccessTime;

Happy Learning!!!