Sunday 15 May 2016

Mind maps: A killer way to increase your test coverage

What is a mindmap?


A mind map is a diagram used to visually organize information. It can be called a visual thinking tool. A mind map allows complex information to be presented in a simplified visual form. A mind map is created around a single concept. The concept is represented as an image in the centre to which the associated ideas are added. Major ideas are connected directly to the central concept, and other ideas branch out from those.

Mind maps are great for note taking, planning, studying, brainstorming, etc. The term 'mind map' was first used by Tony Buzan in 1974. I drew my first mind map when I was in school. I preferred mind mapping over text notes and it proved to be a great aid to revise and recall the concepts quickly. This is because the information in mindmap is structured in a way that mirrors exactly how the brain functions - in a radiant rather than linear manner. A Mind Map literally ‘maps’ out your thoughts, using associations, connections and triggers to stimulate further ideas.

How to draw a mind map

Tony Buzan the "Father of Mind Mapping" suggests the steps below:

1. Start in the centre of a page.
Why? Because starting in the centre, gives your brain freedom to spread out in all directions and to express itself more freely and naturally.

2. Use an IMAGE or PICTURE for your central idea.
Why? Because an image is worth a thousand words and helps you use your Imagination. A central image is more interesting, keeps you focused, helps you concentrate, and gives your Brain more of a buzz!

3. Use COLOURS throughout.
Why? Because colours are as exciting to your Brain as are images. Colour adds extra vibrancy and life to your mind map, adds tremendous energy to your Creative Thinking, and is fun!

4. CONNECT your MAIN BRANCHES to the central image and connect your second and third level branches to the first and second levels, etc.
Why? Because your Brain works by association. It likes to link two (or three, or four) things together. If you connect the branches, you will understand and remember a lot more easily.

5. Make your branches CURVED rather than straight-lined.
Why? Because having nothing but straight lines is boring to your Brain.

6. Use ONE KEY WORD PER LINE.
Why? Because single keywords give your mind map more power and flexibility

7. Use IMAGES throughout.
Why? Because each image, like the central image, is also worth a thousand words. So if you have only 10 images in your mind map, it’s already the equal of 10,000 words of notes!

PRO TIPS
  • If a mind map is getting too big or complicated try splitting it.
  • Do not use long detailed sentences in mind maps. Using one word per line improves clarity and understanding. Using single keywords will make your mind maps more powerful and flexible.
  • Develop your own personal style of mind mapping.
How to use mind mapping techniques in software testing

Mind maps can be used in all the test stages from test planning to test case execution. They can be used for:
  • Test Planning
  • Requirement analysis
  • Impact analysis
  • Task allocation
  • Test case design
  • Traceability
  • Test reporting -Quick test reports
Test Planning


While test planning, you can draw an initial mindmap keeping in mind the list of tasks, schedules, tools, roles, responsibilities, milestones,etc. Present the mindmap and discuss it with your stakeholders. Modify the mindmap if any changes are required. One thing you will love about mind maps is its flexibility to adapt to changes. All you might have to do is to add or remove a node/branch. This flexibility might not happen when you draw on a paper, but mind mapping software assists any changes easily.

The final mind map shows you the scope of testing in one glance. This mindmap can be used as a blueprint and later converted into a plan. This ensures that no test activity is missed.


Test case design

Mind maps are an efficient way of creating lean test cases. It reduces the time required for creating test cases yielding better results. Mindmaps are very easy to maintain and are flexible to changing requirements.
Draw branches from every user story/epic and associate all its functionalities as sub-nodes.Start adding test ideas/test case for each functionality.



I created a mindmap covering test ideas for the major functionality. My team started to expand the mindmap by branching out more and more test ideas. We kept adding new nodes when we found unique scenarios that uncovered the bugs during our test sessions. This drastically increased our test coverage.The final mindmap can be used as the basis for test case document or it's cool if it's used as it is.
The good result of mind mapping is that you generate more ideas when drawing them. Collaborative mind mapping with the team gives you the best results.

Traceability mindmap


A traceability matrix is an essential tool for every tester to analyse and improvise the test coverage. You can use a mindmap instead of a tabular traceability matrix.

To create a traceability mindmap - add nodes of all the Epics. Draw branches from every module and associate all its user stories as subsequent nodes. Now link the test cases for all functionality. You can link the requirement number of the test management tool.

This ensures that you have not missed out writing test cases for any user story. This mindmap gives you the birds-eye view of your test coverage. You can identify the areas where you need to strengthen your coverage.


You can use mind maps anywhere and everywhere!

Below is a mindmap for "App store compliance-iOS":


Tools
There are tons of commercial and open-source tools that let you visualize your ideas as a mindmap. I prefer the following tools:
  • Xmind(Windows/Mac/Linux)- Probably the most popular and free mind mapping tool.
  • Coogle(Web app) - Coogle is a web app that lets your team collaborate and work on a single mindmap.
The use of mindmaps is getting popular with agile testers and lean test practitioners. When will you start using mindmaps?

About the Author



Prashant Hegde is a passionate tester. He leads the QA team in Razorthink software and ensures that the products he works on meet the highest standards in tight schedules and deadlines. Prashant loves to write and he has authored articles for leading software testing magazines. He writes a blog on best practices in software testing in his spare time. Prashant is a gamer, a biker, and an author.

Follow Prashant on his website - prashanthegde.in
Subscribe to his blog – guide2mobiletesting.blogspot.com

Saturday 14 May 2016

How to Configure & Use JMeter Plugins

The Problem
One challenge while working on JMeter is managing plug-in. It is a tedious task to download appropriate *.jar file, store jar file at relevant folder. If new version of plug-in comes, as a JMeter user, I need to repeat all the steps. In addition, I have to visit JMeter plugin website & check if any new version is released or not.

A Solution
The idea of JMeter Plugins Manager is simple, Install Plugins Manager once and it will do it all for you – like installing, upgrading, uninstalling of JMeter plugins.
       
  • In order to install JMeter Plugins Manager, we need to Download the Plugins Manager JAR file and store it into JMeter's lib/ext directory.  JMeter Plugins Manager can be downloaded from link jmeter-plugins-manager.
  • Restart JMeter and go to “Options” menu to access Plugins Manager


  • In case any of your installed plugins have upgrades, The label on the menu item will say "has upgrades".


  •      Clicking on menu item will bring up the plugins manager dialog:

  •       The dialog has two tabs, "Installed Plugins" and "Available Plugins" button.
  •       Removing ticks from plugins on "Installed Plugins"  & click on button “Apply Changes and Restart JMeter” tab will uninstall them. Same way, setting ticks on "Available Plugins" tab and click on “Apply Changed and Restart JMeter” will install the plugin.

Outro
Keep in mind that JMeter Plugin Manager is still in beta phase, so in coming time many more new feature might get added.


Happy Testing

Monday 2 May 2016

Does QTP testing require in depth knowledge of VB script

You need to understand what you are trying to do with QTP. Generally, QTP testers work on three different levels -

1. User - Framework and automation test scripts are created by other people in this scenario. The user only executes the prewritten scripts and analyze the results. You will need little knowledge of vbscript in this case, just to be able to troubleshoot if something goes wrong. You should know following in VB Script - Focus on flow controls, creating methods, basic string operations, date operations, variables type, reading and writing to Excel, and commonly used VB script methods.

2. Script developer - In this case, you will need to prepare test scripts, adhering to the guidelines of the framework in your organization. You will need deeper understanding of VBScript and programming in general to play this role.

3. Framework designer/developer - This is a highly specialized role. You will need in depth knowledge of VBScript and at least another high level language, understanding of design patterns and good grasp of data structures and algorithms to play this role.

Think where you want to be in your career. In case you want to opt for #3, You should start learning VBScript.


You can visit W3Schools Online Web Tutorials and complete online tutorial on VB. 

Sunday 24 April 2016

Write Positive and Negative test cases for login page

This is one of frequent question asked by interviewer. In order to answer this question, you need to understand the difference between what a positive test case and a negative test case is.

  •       A positive test case confirms some expected functionality. E.g.: A user with a valid username and the corresponding password can log in successfully.
  •      A negative test case tests for unexpected or invalid conditions, and confirms that the code can hold up in these circumstances. 
·         Positive Test Case
               1.       Verify the Correct username, Correct password - Login Successfully.
·         Negative Test Cases
                            1.       Verify the Incorrect username, incorrect password- Can't Login
                            2.       Verify valid username and empty password. -Can't Login
                            3.       Verify empty username and valid password. - Can't Login
                            4.       Verify some password(can be a registered/unregistered)- Can't Login
                            5.       Verify case changed username /password.- Can't Login
                            6.       Verify registered user's login id and password -Can't Login
                            7.       Verify registered username and password.- Can't Login
                            8.       Verify to enter disable(Blocked) email address.- Can't Login
                    9.     Verify to unverified Email address. - Can't Login

Wednesday 13 April 2016

How To Continue With Script Even If NoSuchElement Exception is Thrown

The Problem
If you selenium script fails to find element on page by provided locator, it throws NoSuchElement exception. NoSuchElement is an exception which is basically like crashing the program into a wall. Whenever this error comes, script execution gets stopped.

A Solution
As an automation developer, I can ensure uninterrupted script execution in two ways
1.       Using try/catch block

Let’s try to implement it in an example –

NoSuchElement error without Try/Catch Handling
     public static void main(String[] args) {
                                WebDriver driver = new FirefoxDriver();

                                driver.get("http://thebuddhatree.blogspot.in/");

                                driver.findElement(By.id("name")).click();
                }

Note – This program will generate error and script execution gets stopped if element with provided locator is not on page.

NoSuchElement error with Try/Catch Block

import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class NoSuchElementError {

                public static void main(String[] args) {
                                WebDriver driver = new FirefoxDriver();
                                driver.get("http://thebuddhatree.blogspot.in/");
                                try {
                                                driver.findElement(By.id("name")).click();
                                } catch (NoSuchElementException e) {
                                                System.out.println("In Catch Block");
                                }
                                System.out.println("Outside Block, resume executing other code");
                }
}

Note – This program will generate error but script execution will continue for remaining code.

2.       Using FindElements() method
Build into Selenium is an ability to search multiple elements using single action
findElements() method behavior can be summarized as follows  -

·         On Zero Match : return an empty list
·         On One Match : returns list of one WebElement only
·         On One+ Match : returns list with all matching elements

NoSuchElement error using FindElements()
public static void main(String[] args) {
                                WebDriver driver = new FirefoxDriver();
                                driver.get("http://google.in/");
                               
                                List <WebElement> elements  =driver.findElements(By.id("name"));
                                if (elements.size() == 0){
                                                System.out.println("Element Not Found");
                                }
                }
Expected Behavior
  • ·         Open the Browser
  • ·         Load the page
  • ·         Search for an element
  • ·         Fails to find element
  • ·         Script execution continued

Conclusion
Happy Learning

Please ask questions on Testing Forum, in case of any issues or doubts or questions.