Monday, June 02, 2008

Agile Testing and Test Automation

Agile Testing and Test Automation goes hand in hand; without automated tests, agile testing becomes almost impossible.

Agile testing is all about evaluating software changes as soon as possible and as often as possible during the software release cycle. The key success to agile testing is to automate the tests that are executed most often, and in most cases the smoke test and the priority-1 tests are executed most often.

The way to introduce agile testing in an organization the first step is to put together a plan to move toward the agile testing approach. The plan will need to identify specific tasks and goals in meeting this goal, which is to test early and often.

A plan may look like this:-
  1. Identify system smoke test, and system priority-1 tests.
  2. Automate System smoke test and system priority-1 tests.
  3. Identify area specific smoke test, and area specific priority-1 tests.
  4. Automate area specific smoke test, and area specific priority-1 tests.

In large systems, critical areas within the system gets to be automated first.

The result will be a repository of automated set of tests that will provide evidence that the software is OK from the testing side. Of course, prior to running this tester level automated tests, a set of developer level automated tests is run to provide evidence that the software is OK from the developer side. Both automated tests, tester tests and developer tests are executed together. This what makes agile testing possible.

Wednesday, May 28, 2008

Is Vista a failure?

I am getting sick and tired of reading about how failure Vista is. Vista being late is one thing, but stating that Vista is failure and XP is better, is totally wrong. I have Vista running on four of PCs running in my house and all are running very well. And no I don't have the latest hardware on all four of my PCs

This notion that Microsoft talking about Windows7 indicates Vista failure is also wrong. Microsoft have indicated regardless how success the current OS is that they will have a two year release cycle.

In all these reports that talk about how bad Vista is, never mention any specifics why Vista is a failure. It seems that picking on Vista without providing any details is becoming a popular trend

Multi-touch in Windows 7 demo


Video: Multi-Touch in Windows 7

I love the Mapping Application multi-touch experience, and the piano part is amazing.

Saturday, May 10, 2008

iPhone Arabic support is available now

I just installed it and it appears to be working better than the previous one. The good news it is currently provided for free from iphoneislam. From reading Tariq's blog this will be only available for free for only one month period. So I suggest you install it ASAP.

Sunday, May 04, 2008

Dubai skyline

Forwarded from a friend:
========================================================

An amazing view on one of Dubai 's city skylines.
This picture was not taken from an airplane, but from the world's tallest building:
Burj Dubai @ 2,620 ft / 801m!!!
===================================================================
I drove by Dubai Tower last week at night and definitely it can not be missed from a far distant. Driving through Dubai after four years of leaving was a shocking experience. Starting from the under development Dubai Metro system , The Emirates Mall with the in-door ski, to the massive development along Sheikh Zayed Road.


Tuesday, April 15, 2008

Thursday, April 03, 2008

Using The Microsoft UI Automation Library to Drive UI Automation

The UI Automation Library is included in the .NET Framework 3.0. The concept seems to be straightforward. Every UI control is an "AutomationElement" which can be found through searching from the Parent "AutomationElement". The top AutomationElement is defined as the "RootElement", which is the Desktop. Another way to get the AutomationElement Object to a given Window is by starting a "Process", and then using the Process MainWindowHandle to get the AutomationElement object.

The code shown below is basically a test that Invoke Notepad, Enters an input text, and then it compares with the text which is read from Text property of the Notepad Text Field, and then closes Notepad without saving.
using System;
using System.Windows.Automation;
using System.Diagnostics;
using System.Threading;
using System.Collections.Generic;
using System.Text;

namespace UIAuto_01
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Starting Notepad!!!");

// #1 Start Notepad
//
Process notepadProcess = Process.Start("notepad.exe");
Thread.Sleep(500);
AutomationElement aeDesktop = AutomationElement.RootElement;

// #2 Find Notepad
//
AutomationElement aeNotepad = AutomationElement.FromHandle(notepadProcess.MainWindowHandle);

if (null == aeNotepad)
{
throw new Exception("Notepad not found!");
}
Console.WriteLine("Found Notepad !!!!");

// #3 Find Notepad Text Field Control
//
AutomationElementCollection aeAllTextBoxes =
aeNotepad.FindAll(TreeScope.Children,
new PropertyCondition(AutomationElement.ControlTypeProperty,
ControlType.Document));

if (0 == aeAllTextBoxes.Count)
{
throw new Exception("Notepad Edit field not found!!");
}

Console.WriteLine("Found Notepad Edit Field!!!!");

AutomationElement aeNotepadDoc = aeAllTextBoxes[0];

// #4 Type the input value
//
aeNotepadDoc.SetFocus();
string InputValue = "Hello World!";
System.Windows.Forms.SendKeys.SendWait(InputValue);

// #5 Get the Text from the Text Field
//
TextPattern tpNotepadDoc = (TextPattern)aeNotepadDoc.GetCurrentPattern(TextPattern.Pattern);
string ActualValue = tpNotepadDoc.DocumentRange.GetText(-1).Trim();

// #6 Compare input and actual
//
if (ActualValue == InputValue)
{
Console.WriteLine("Test Passed!");
}
else
{
Console.WriteLine("Test Failed: Expected={0} Actual={1}", InputValue, ActualValue);
}

// #7 Now close Notepad
//
WindowPattern wpNotepad = (WindowPattern)aeNotepad.GetCurrentPattern(WindowPattern.Pattern);
wpNotepad.Close();

// #8 Find The Save, Don't Save, Cancel Dailog
//
AutomationElement aeSaveDailog = findElement(aeNotepad, "Notepad", 10);
if (null == aeSaveDailog)
{
throw new Exception("Notepad Save dailog was not found!");
}

// #9 Find the "Don't Save" button and Click it
//
AutomationElement aeDontSaveBtn = findElement(aeSaveDailog, "Don't Save", 10);
if (null == aeDontSaveBtn)
{
throw new Exception("Notepad Don't Save Button was not found!");
}
InvokePattern ipDontSaveBtn = (InvokePattern)aeDontSaveBtn.GetCurrentPattern(InvokePattern.Pattern);
ipDontSaveBtn.Invoke();

// #10 Done
//
Console.ReadLine();
}

// Returns a Automation Element based on the parent AutomationElement, and caption.
//
private static AutomationElement findElement(AutomationElement parent, string caption, int timeout)
{
AutomationElement aeNew = null;
int numWaits = 0;
do
{
aeNew = parent.FindFirst(TreeScope.Children,
new PropertyCondition(AutomationElement.NameProperty, caption)
);
++numWaits;
Thread.Sleep(100);
} while (aeNew == null && numWaits < timeout);
return (aeNew);
}
}
}

Wednesday, April 02, 2008

iPhone full Arabic support is here



Requirements:
1- Firmware version 1.1.3/1.1.4
2- Arabic Keyboard setup following instructions provided by Tariq @ http://www.iphoneislam.com/
Setup instructions:
1- Add the following Source in your Installer. This can be done by going to the Sources Tab, and selecting the Edit button. Then, type the following URL in the source field: http://repo.aakqtr.com/
2- After the sources are refreshed, navigate to BiOsS Modz category in the Install Tab, and select: iPhone Arabizer 1.0 and choose Install.
3- Reboot the Phone
4- At this point Safari can render the Arabic text to any Arabic website, Email, Contacts, and Calander also support Arabic text at this point
5- Go to Settings > General > International > Language: and choose Arabic (this will change your UI Language)
6- Go to Settings > General > International > Region Format and Select Arabic and the Country.
Now you have Full Arabic support in the iPhone.

Friday, March 07, 2008

iPhone SDK Announcement: SEGA on the iPhone


From what was presented on the special keynote the SDK looks promising. The only bad part the entire toolset are native Mac OS tools, no Windows.


The most impressive thing is the SEGA game that was developed in two week period using the SDK, and the comment about the quality of the game is console quality not cell phone quality.


Friday, February 29, 2008

Monday, February 18, 2008

Scripting with C# Script

I have been playing cscript recently and I have found it a better alternative to Jscript. With C# Script you have the power of C# Language with the scripting capability. Hence, you don't have to compile your code when making modification to it.

You also have the option to create an executable out of the script.

Here is an example of accessing COM from C# Script. Notice the include tag on the first line

//css_prescript com(SYSINFO.SysInfo.1, SisInfoLib);
using System;
using SisInfoLib;
class Script
{
[STAThread]
static public void Main(string[] args)
{
SysInfoClass sysInfo = new SysInfoClass();
switch (sysInfo.ACStatus)
{
case 0:
Console.WriteLine("Not using AC power");
break;
case 1:
Console.WriteLine("Using AC power");
break;
default:
Console.WriteLine("Unknown AC power status");
break;
}
if (sysInfo.BatteryLifePercent != 255)
Console.WriteLine("Battery life " + sysInfo.BatteryLifePercent + "%");
else
Console.WriteLine("Battery charge status not known");
}
}

Thursday, December 27, 2007

Arabic iPhone




This is very promising. I have already installed the Arabic font, and Arabic keyboard and now I can read/write Arabic SMS, Email, and open most of Arabic web sites.


The good news, more programs are in in the works right now including prayer program, Quran, and more. For more information visit this website: www.iphoneislam.com.
Also, for more inforation about the full Arabic support watch the following video: http://www.iphoneislam.com/?p=22


Also, I have been experimenting with writing a prayer program myself, and I am planning to post it soon on this blog. The program will play the athan at prayer times, and it will display the prayer times for the current day. More information will follow soon.


I am planning to put it as open source under google code portal

Tuesday, October 30, 2007

Native iPhone Applications: the first Quran App


Developed by Zoosware. But first you have to install either AppTap, or AppSnapp.
Reviews to be followed soon. Stay tuned

Thursday, September 20, 2007

3D Virtual Desktop

Check it out

This brings back memories about when Central Point, the company behind PC Tools, released Central Point Desktop for Windows and introduced the idea of Virtual Desktops. At that time I got really used to it especially Windows 3.1 at that time did not have a useful desktop (it was called Program Manager)

Anyway, so far I am loving this tool, and will be evaluating for a possible purchase.