Category Archives: Software Testing

How to test that you are doing ‘AGILE TESTING’?

There are some stories that some companies or teams say they are following ‘Agile Testing’ methodologies in Software Development process but they are not sure if they have been following the process properly or not. There are project specific requirements for which specific process to follow in the development. But once we start to follow a process (say Agile Testing), we need to check if we have been following it properly or not on regular basis.

Agile Testing
Agile Testing is integrated part of the software development – it’s not just a separate phase. As the Agile Software Development is incremental and should be flexible enough to adapt the changes, the Agile Testing is also an incremental one and also should be flexible enough to adapt the changes that might be brought in the software. Another major feature of Agile Testing is once we follow this method, Test/QA team should be providing a regular deliverables – let’s say at least once in a sprint test team should deliver part 1/part 2/ part 3 or whole feature has been tested fully.

Well, that’s all about the definition. In the course of development, especially due to deadlines or various other factors, team might be sidetracked from Agile Testing methodologies. If we do not notice the team being side-tracked earlier, it might be costlier later.
The following are the questions which can help if a team is following Agile Testing –

  • Are you testing the tool and providing regular deliverables?
  • Is the Scrum being held on regular basis (at least 3 times a week)?
  • Is everyone in the team is attending the meeting regularly?
  • Are you keeping an eye of testing back-logs and raising them in the meetings on regular basis?
  • Are you getting feedback from customers/users for the features you have implemented on the regular basis (usually in every sprint)?
  • Are you doing the regression test on regular basis (usually once a week – depends on project)?
  • Are you tallying the requirement from client and actual feature implemented on regular basis (at least once in a sprint)?
  • Are you considering the priority and severity of bugs on regular basis?

If any of the answers for the above questions is NO, you’ve gotta do something from being sidetracked from Agile Path. If all of the answers for the above questions are YES, you are following Agile Testing … enjoy it.

Writing Automation Tool for Web Based System Testing (using Selenium, C#.Net, Internet Explorer)

This tutorial will help to start writing Automation Tool for Testing Web Based System in Internet Explorer.  If you are planning to write a tool to do periodic testing automatically, this tutorial might be helpful.

Step I : Download Selenium Internet Explorer driver from Selenium WebSite

  1. Open the Selenium WebSite
  2. Download ‘The Internet Explorer Driver Server’ .
    Download the matching bits  i.e. 32-bit driver if your system is 32 bit or 64-bit driver if   your sytem is 64-bit driver.
  3. Download ‘Selenium Client & Web Driver Binding’ (Browser:  Internet Explorer and Language: C# ).

    The latest driver at this time of writing can be found at http://selenium.googlecode.com/files/selenium-dotnet-2.39.0.zip . If it is not latest, download the latest version.
  4. After the zip files are downloaded, extract them to local folders.

Step II: Setting Internet Explorer Options

In order to make the tool run smoothly with IE browser, we need to enable the Protected Mode for IE. Follow the steps below to set IE –

  1. Open IE -> Tools -> Internet Options -> Go to Security Tab
  2. Select Internet in the Select Zone pane
  3. Check Enable Protected Mode
  4. Repeat steps ii and iii for Local Intranet, Trusted Sites, Restricted Sites
  5. Click Apply

Step III: Coding

 Now, time to play some code. Excited ? Follow these steps –

  1. Create a Console Based Application in Visual Studio
  2. Add References ( Right Click the Project -> Add Reference -> Browse to Selenium DLL folder in your local computer -> select right version ( e.g. net40 if your .net version is latest -> Select all of the DLLs
    Selenium.WebDriverBackedSelenium.dll
    ThoughtWorks.Selenium.Core.dll
    WebDriver.dll
    WebDriver.Support.dll )
  3. Add Selenium namespaces

    Add following lines at the top of Program.CS

    using OpenQA.Selenium;
    using OpenQA.Selenium.IE;
    using OpenQA.Selenium.Support.UI;

  4. Create WebDriver instance and navigate to Site to be tested

    Add following lines in the Main method

    // path of folder containing webDriver
    IWebDriver driver = new InternetExplorerDriver(@"D:\ananta-tutorial\IEDriverServer_x64_2.37.0");
            driver.Navigate().GoToUrl("http://anantasharma.com");

  5. In the website ( http://anantasharma.com ) , find ‘Software Testing’ link and click it.

    Add following lines at the Main method. WebDriver API provides functions to find the element by ID.

    // find 'Software Testing' link in the website http://anantasharma.com
          IWebElement softwareTestingLi = driver.FindElement(By.Id("menu-item-11"));
    IWebElement softwareTestingLink = softwareTestingLi.FindElement(By.TagName("a"));
      // click on the software Testing link
    softwareTestingLink.Click();

  6. Verify the navigated link

    Add following lines in the Main Method.

      //verify the current link
               //get current URL
                string currentLink = driver.Url;
               if (currentLink.Equals("https://anantasharma.com/category/software-testing/"))
               {    
             Console.Write("Navigated to the expected URL");      
        }
               else
      {
                   Console.WriteLine("Could not navigate to the expected URL");    
         }


  7. Now whole code looks something similar

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using OpenQA.Selenium;
    using OpenQA.Selenium.IE;
    using OpenQA.Selenium.Support.UI;

    namespace TestFramework
    {   
    class Program
    {
      static void Main(string[] args)      
      {
         // create driver instance 
            // provide path of folder containing webDriver   
             IWebDriver driver = new InternetExplorerDriver(@"D:\ananta-tutorial\IEDriverServer_x64_2.37.0");     
            driver.Navigate().GoToUrl("http://anantasharma.com");       
         // find 'Software Testing' link in the website http://anantasharma.com  
            IWebElement softwareTestingLi = driver.FindElement(By.Id("menu-item-11"));
             IWebElement softwareTestingLink = softwareTestingLi.FindElement(By.TagName("a"));  
            // click on the software Testing link          
      softwareTestingLink.Click();       
    //verify the current link           
    //get current URL          
    string currentLink = driver.Url;
             if (currentLink.Equals("https://anantasharma.com/category/software-testing/")) 
            {
                 Console.Write("Navigated to the expected URL");   
           }     
           else
             { 
                Console.WriteLine("Could not navigate to the expected URL");
             }
            }   
    }
    }

  8. Run the Program.

    This tool should open the provided URL i.e. http://anantasharma.com and click to ‘Software Testing’ link. If the navigated URL is the expected one, it writes expected message on the console.

Happy Automation using Selenium !!

5 important skills a Software Test Engineer needs to have

Software Testing is not just finding defects in Software. It’s an art to make a quality product. There is no doubt that Software Testing starts at the very beginning of project life cycle. So, the role of Software Test Engineer starts vitally from very beginning of Software Development. The sole aim of Software Testing is to make sure all of the required scenarios are covered by the Software and are working fine.

The following are the important skills that a Software Test Engineer needs to have.

1.        Act as an End User

Software are for users. In many cases, Software Test Engineers are technical guys with sharp technical knowledge.  So, those guys having strong technical knowledge (programming knowledge) most probably start seeing that Software in technical perspective.  This will prevent in finding many defects in a system.

As a Software Test Engineer, assume that you are a real End User and start seeing it with end-user perspective.

2.        Participate heavily in all the phases of Software Development

Generally, Software development process follows phases like feature request, feature specs, dev specs, test specs, etc chronologically.  As a Software Test Engineer, push yourself in into all the phases of the development cycle. Indulging in those phases helps you to know the know-how of system thereby providing a wide vision range to find the defects.  Ideally, Software Test Engineer should go through and know all the specs in Software Development cycle.

3.        Politely use WH questions

In scrum, project meeting, feature/dev specs review meeting etc developers or Project Managers provide some approaches of solution.  Sometime those ideas are driven by unidirectional thought of a particular person.  If a Software Test Engineer fires a right WH question that will definitely prevent a lot of hassles in future.  For an example, if a developer or PM proposes one approach for implementing a feature, we can use following WH questions –

  • What are the benefits of this approach over others?
  • How will end users be benefited from this approach?
  • What are the limitation of this approach?
  • Who will have to put more efforts in managing this approach?
  • When can this be accomplished?
  • Why not using other alternative approaches?

Remember, the WH questions may sound irritating to the people. So, we should politely fire these questions.  In most of cases, those questions reveal the limitation of the approach from very beginning.  This saves a lot of time and efforts.  Be polite and fire WH questions appropriately.

4.         Treat the System you are testing as your favorite game

Every time you sit on a chair and start testing a system, assume that you are gonna play your favorite game. More we enjoy testing the system, more probably we cover all the areas of Software and more probably we go to the depths of the system.

5.        Habit of taking break  

Specially rookie Software Test Engineers spend whole day by testing the system continuously. This is a unidirectional way of testing. In such pattern, many defects in the system are skipped. Do not force yourself in a continuous unidirectional path. Take breaks!! . Taking break brings solace to the brain and does contribute to stop walking in unidirectional path.

Software is usually intended to large number of people. So, Software Test Engineer should start thinking in a multi-directional way. Do not test continuously for a long time. If you feel that you have been sitting on a chair and focusing on one single feature testing for a long time, STOP immediately. Take at least few minutes break and come back – the defects in the system will start floating in front of the screen.