How to set Severity and Priority for a bug?

How to set Severity and Priority for a bug?

Severity and Priority, these are often a confused concepts and are almost used interchangeably amongst not only test teams but also development teams. There’s a fine line between the two and it’s important to understand that there are indeed differences between the two.

Severity: Severity determines the defect’s effect on the application. Severity is given by Testers.
“Severity” defined as – The degree of something undesirable, something hard to endure, extreme plainness. Severity of a defect/bug tells us how undesirable the defect is. For example, a bug that causes the program to crash and terminate would be considered as high severity, while a minor spelling error might be of low severity.

Priority: Determines the defect urgency of repair.Priority is given by Test lead or project manager.              “Priority” as – Status established in order of importance or urgency. Priority of a defect/bug tells us how soon it is required to fix the problem. Priority reflects a business decision as to how soon that bug should be fixed. Priority of the bug determines what gets fixed next and what does not. The priority of a bug can be decided from either the Project management point of view or from the user’s point of view.

Defect-Priority-and-Severity-levels

Priority:Define defect priority value by level of urgency to be resolved for the defect.

Priority 1 – Critical (P1):This generally occurs in cases when an entire functionality is blocked and no testing can proceed as a result of this
Priority 2 – High (P2):defects must be resolved in this release.
Priority 3 – Medium (P3):defects would like to be fix, but won’t hold shipment for them.
Priority 4 – Low (P4):defects are not as strong as desirable.

Severity:Define defect severity value by impact of a bug.
Critical / Show Stopper (S1):Crash, loss of data, corruption of data, severe memory leak Prevents developers or testers from performing their jobs. Impacts the development process.An error which causes a program or system interrupt, or which causes program execution to abort. System personnel refer to this type of error as a “show stopper”. This error has the highest severity rating.
Major or Severe (S2):Major loss of function, as specified in the product requirements for this release, or existing in the current
Moderate/ Normal (S3):Non-major loss of function. 
Low or Minor (S4):Issue that can be viewed as trivial (e.g. cosmetic, UI, easily documented)or an enhancement.
Bugs that can be raised based on above category combinations like for example:

1). High Priority and Major severity

1.1) The application does not opening the home page after login

1.2) The application crashes whenever a person attempts to submit valid input on the registration page.

2). High Priority and low severity
2.1) The spell mistakes that happens on the cover page or heading or title of an application.
3). Major severity and low priority
3.1) The application generates a show stopper or system error, (for which there is no workaround) but on click of link which is rarely used by the end user.

3.2) An application crashes after multiple use of the functionality (For Ex. “Save” button use 200 times then that application will crash.)

4). low severity and low priority
4.1) Any cosmetic or spell issues which is with in a paragraph or in the report (Not on cover page, heading, title).

Introduction to Selenium Automation Testing

Introduction to Selenium Automation Testing

Automation testing is mostly helpful when a small change is made to the source code of the software, the tester has to manually test each and every functionality of the application, which takes lot of time for the testers to test the complete functionality from scratch. If instead the tester automates the complete software using any automation tool, he can just run the automation tests using the automation tool every time when a change is made to the source code of the project or when a new build is given for testing frequently. Ultimately it saves the testing time of testers and relives the testers from the stress.

Out of all the open source and commercial tools available in the market, the following are the two most popular tools:
  1. QTP  ( Commercial Tool – Supports Desktop and Web Applications )
  2. Selenium ( Open Source Tool – Supports only Web Applications )
Selenium is one of the most popular open-source automated testing Tools available today.

Selenium automates web applications for testing purposes, but is certainly not limited to just that.

Introducing Selenium: Selenium is not a single tool, instead it is a set of different tools each with a different approach to support test automation. Learning all the tools will give you different options for approaching different test automation problems.These tools when used together give many options for locating the UI elements and comparing expected test results against actual application behavior. The following  are the four tools that comprise the Selenium’s Tools Suite:

  • Selenium IDE
  • Selenium 1 (or Selenium RC)
  • Selenium 2 (or Selenium WebDriver)
  • Selenium-Grid

Few Good things about the Selenium Automation Tools:

1. Selenium is an open source tool i.e. Unlike the proprietary tools its available free of cost.
2. This is the best tool available in the market for web application testing
3. One of the selenium’s key features is the support for executing one’s tests on multiple browser platforms like Internet Explorer, Firefox, Google Chrome, Opera, Safari etc.
4. Selenium allows you to control a browser from a language of your choice. You can choose any one of these Six languages to write automation scripts -> Java, C#, Ruby, Python, Perl and Php
5. Selenium is available for Operating Systems such as Windows, Linux and Mac
6. Selenium can be used for functional, compatibility, regression testings and User Acceptance Testing (Mainly used for Regression Testing).

  • Functional Testing refers to the test that verifies a specific action of the software (Example – Logging into the Gmail is an action)
  • Compatibility Testing is performed to verify whether a software works with all other supported software and hardware.
  • Regression Testing is the repetition of the earlier successful tests in order to make sure that changes to the software has not introduced any new side effects
  • User Acceptance Testing is testing an application prior to customer delivery for functionality and usability  using real world scenarios which resemble how the application will be used by the end users.

Drawbacks of using Selenium Automation Tools:

1. Selenium is a browser based testing tool. It cant be used for automating the desktop applications. (i.e. It can be used only for automating the web based applications)

Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.

Object Identification In Selenium

Object Identification In Selenium:

Object identification is a very crucial part of any automation effort be it in QTP, selenium or any other tool for that matter. So it makes it very important for each one of the automation folks around to be able to identify the objects used in the automation effort

Identifying Objects is Selenium (WebDriver) is pretty simple if you are working on an application built on Firefox, but it gets very tricky if you are working on IE application. So it would be best to master the object identification techniques.

If you have used the Selenium IDE for any recording you would have noticed that there are multiple ways of identifying an object. By default the Selenium IDE tries to recognize the object by the ID or name attribute. Selenium IDE identifies the objects by the attributes mentioned in the order below

Object identification is very important part of automation activity. So the automation people should be able to identify the objects for automation purpose.

For identifying these objects Selenium uses a concept of ‘Locators’. These locators are used to identify the objects which are mostly used while automating the test cases using Selenium.

Locators: There are number of locators present. These are among them.

  •  ID
  •  Name
  •  Link Text
  •  CSS Selector
    Tag and ID
    Tag and class
    Tag and attribute
    Tag, class, and attribute
    Inner text
  •   DOM (Document Object Model)
    getElementById
    getElementsByName
    dom:name
    dom: index
  •  XPath

For testing different applications i.e. Application Under Test (AUT), we need to identify the object it is made of. All applications either it is Web Application or Desktop Application; it is consisting of different objects like below:

  • Button
  • Text Box
  • Link
  • Drop Down
  • Radio Button
  • List Box
  • Slider

Finding an element and confirming the expected result requires locators. Through locator, In Document Object Mode (DOM) i.e. webpage, we uniquely identify the object. The ‘By‘ class is used in WebDriver to locate the elements.

o identify the objects such as Links, Buttons, Edit boxes, Drop downs, etc on the application Selenium uses a concept called “Locators”. There are around 8 different types of locators. Out of them, I will be explaining only four as they are widely used while automating the test cases using Selenium.

1. id = id – By default Selenium IDE takes “id” as Locator Every Web Page will be having some HTML Source code. This can be viewed using “View –> Page Source / View source” on the browser. In the following picture we can see “id” attribute of a HTML tag is used as a locator to identify an object.

2. name = name (Second locator) We will do the following steps to understand how exactly Selenium identifies the objects

3. xpath = xpathExpression. Xpath is used as a Locator to identify an object. This is an expression which is formed by combining various HTML tags. For example: //a[contains(text(),’VRL travels’)], //div[@id=’shortcuts’]/span/span[2]/a/span

4. link=link text (in HTML source we can located this using “href” tag)

Here XPath and CSS are the most widely used locators.

It is very easy to identify the object of the application which is built on Firefox but same on the other way if that application is made on IE browser then it is pretty difficult to identify the object.

There are different tools available to identify the objects on different browsers like Firefox/Chrome/IE etc.

If we are using Selenium IDE there are different ways to identifying the objects. By default Selenium identify the object using ‘ID’ or ‘Name’.

Here I have taken the example of ‘Flipkart’ home page. Here for search text box on Flipkart home page the recording is done through Selenium IDE. We can see here the order of identification of text box via different locators as above.

We can see the code of above recording. For each locator the code will look like as below:

1. driver.findElement(By.id(“fk-top-search-box”)).click();
2 driver.findElement(By.name(“q”)).click();
3. driver.findElement(By.cssSelector(“#fk-top-search-box”)).click();
4. driver.findElement(By.xpath(“//input[@id=’fk-top-search-box’]”)).click();
5. driver.findElement(By.xpath(“//form[@id=’fk-header-search-form’]/div/div/div/input”)).click();
6. driver.findElement(By.xpath(“//form/div/div/div/input”)).click();

6 Tools to Help You with Object Recognition

Using one the six tools

  1. Firefox – Selenium IDE
  2. Firefox – Firebug
  3. Firefox – Firepath
  4. Google Chrome Developer Tools
  5. IE Developer tool bar
  6. fire-ie-selenium
  7. XPath Checker
  8. Fire Finder