Wednesday, 29 February 2012

Quality Assurance Vs Quality Control

Most people and organizations are confused about the difference between Quality Assurance, Quality Control and Testing. The are closely related, but different concepts.

All three are useful to manage risks of developing and managing software.

Quality Assurance[QA]: It represents the set of activities designed to ensure that the development and maintenance is adequate to ensure a software will meet the objectives.

Quality Control[QC]: It represents the set of activities performed to evaluate a developed work product.

Testing: It represents the process of executing the system with the intention of finding issues.

QA activities to ensure that the process is defined and appropriate. Standards and Methodologies are examples of QA activities. QA review should focus on the process elements of a project.

QC activities focus on finding defects for every specific deliverable. So, Testing is part of QA activity. Testing for quality isn't assuring quality. It's controlling it.

So we can simply say that QA is Process Oriented and QC is Product Oriented.

Tuesday, 28 February 2012

Boundary Value Analysis Vs Equivalence Partitioning

In this article we are going to know the difference between Boundary Value Analysis and Equivalence Partitioning.

Boundary Value Analysis: This is technique in which the boundary values are tested instead of hitting in the middle. For example, we can take a bank application. Assume that we can withdraw the minimum of 1000 and maximum of 20000. So, we can test the application by entering the values less than 1000 and greater than 20000.These two test cases will cover the entire application. We may test with some values like 1001 and 1002 etc. But it'll not make any sense as the result will be the same.So, the boundary values are considered for testing is called as Boundary Value Analysis.

Equivalence Partitioning: In this method we can eliminate the test cases which are treated in the same way and produces the same result.So, this method is mainly useful to eliminate the redundant test cases. For example we can take the above bank application.In this we can consider the following scenarios.
   01. Value < 1000
   02. Value > 20000
   03. Value = 1000
   04. Value = 10000
As per the above examples, test cases 3 and 4 produces the same result. So, this is redundant. So we can eliminate either 3 or 4. 

We can consider the equivalence partitioning in any of the following scenarios.
  • All test cases should produce the same result.
  • All test cases should test the same thing.
  • If one test case catches a bug, other test case also should catch the same bug.
  • If one test case misses a bug, other test case also should miss the bug.
I hope the above explanation explains the difference between the BV and EP.

Monday, 27 February 2012

Types of Software Testing

Software Testing is mainly divided into two types.

01.Functionality Testing
02.Non-Functionality Testing

Functionality Testing:

As the name suggests we need to test the Software against the well defined requirements. It means we are going to test the logical part of the software.For example, we can take Calculator. Assume that a user enters 0, Presses + button, enter 1, Presses = Button. The result should be 4. It means the programming logic should follow the actual requirment. This is called Functionality Testing.

Non-Functionality Testing:

Non-functionality is not really about the programming logic. It's all about how the same application behaves under different circumstances.

For example, we can take the same Calculator application. Assume that the application was tested with 1GB RAM, 40GB HDD with single user login.SO,the application worked perfectly as expected.Assume that more than 1,000 users are going to access the application at the same time.

So, it's possible for that the application crash. If that happens, either resources of the machine on which the application is running should be improved, like increasing the RAM or CPU, etc in such a way that the application code has been improved to handle n-number of users.

Unless we run such a test, we'll be at risk of the application crash in production when it comes under heavy load. This kind of testing is called as Non-Functional.

It's very important to gather both Functional and Non-Functional requirements during requirement phase itself to avoid such kind of issues.

This is the main responsibility of the Test Engineer to get clarity on these requirements.

Sunday, 26 February 2012

What/Why/How/When - Software Testing

As we all aware that the Software Testing obviously plays a major role in IT industry. In this article am going to explain about What/Why/How about Software Testing.

Software Testing means Testing a Software before use. The main intention of the software testing is to make sure that the software is working as expected.

Software should be thoroughly testing before usage. It may be life threatening if the software Malfunctions. For example we can take flight applications/ Bank applications. So, it's better to test the software thoroughly before using it.

Software should be tested in such a way that it meets the requirement.For example we can take a Calculator application. It should perform all operations as expected.

Testing of the application should be started once the requirements are clear. Depending on the size and complexity of the project or company, various methodologies, processes and strategies will be adopted.Fundamentally software should be tested against well defined requirements.

Thursday, 16 February 2012

Naming conventions in QTP

Naming convention is a good practice to trace Use cases , Test Cases, Test Scripts, Action(s), Object repositories etc. Since each of the above mentioned items have relation with others, it’ll be good if a unique naming convention is used across the Automation Test suite.
Test Case: 
Test cases should be named in such a way that the corresponding Use cases can be traced for which the test case is written. Other users should be able to trace the Test Cases based on the Use Case or Scenario or Test condition. Consistency should be maintained when naming the Test Cases.
For example, we can name the Test case as TC_001. So, the corresponding Use case naming convention would be UC_001.

Script & Action: 
Similar to the Test cases naming, script should also be named with clarity in such a way that the script is traceable. Typically each Test Script is prepared corresponding to each Test Case. Every Test can contain one or more conditions. Each condition can be represented by Action in the script.
For example, we can name the script name as “QTS_001” for the Test case number “TC_001”.
Action Naming:
 Each test can have one or more conditions. It can be represented by one or more Actions. We can name the Actions in two ways.
Naming based on the functionality of the Action and Hierarchy of the action in the script.
We can name the action based on the function in such a way that it’s easily traceable. For example, we can name the logout functionality action as “Logout_User”. Like this we can have different names for each actions in such a way that it’s reflecting the functionality as well as Traceable.

Hierarchy of the Action in Script: One test case may have one or more conditions. It can be represented by one or more actions. 

Based on the above examples, we can have the following naming conventions.
First Test Case: TC_001
First Use Case: UC_001
Test Script: QTS_001
First action in script: QTA_01_01
Tenth action in script: QTA_01_10
Variables and Constants: QTP uses VB script. So, we can use the same convention used in VBScript for variables and constants.

 We have Global and Local data sheets in QTP. Global data sheet can be used by all actions available as part of QTP automation framework. In general we used to mention the Global data sheets as “dt_globalsheet”. We can rename the global data sheet as “Global” to maintain the consistency.

Local data sheets can be used by the action to which it belongs to. This can be named after the action to which it belongs. So, we can name the data sheet by using the name of the action. For example, we can use the naming for “Login” action sheet as “Login_DataSheet”.

Parameter Naming:
We have different types of parameter in QTP.
Test Input Parameter: We can name the input parameters something like “IN_uName”.
Test Output parameter: Output parameter can be named something like “ACTOUT_actNo”
Action Input Parameters: These are local to the action.These can be named as “ACTION_varname”.
Action Output Parameters: These can be named as “ACTOUT_varname”.

Environment variables: 
These variables can be user defined or built in.  Built in variables are internal.So, we can’t name the Built In Environment variables.
User defined variable are Internal and External. We can name the internal user define environment variables as “ENV_INT_variablename” and the external user defined environment variables can be named as “ENV_EXT_variablename”.
Functions: Functions can be named as “Func_name”. For example we can name the Login function as “Func_Login".

Tuesday, 7 February 2012

How to handle Multiple Browsers in QTP

At times we need to handle or work with Multiple Browsers when executing the test scripts. QTP provides a mechanism to handle this kind of situation.We can use the ordinal identifiers "INDEX" and "CreationTime" to differentiate the browsers at runtime.
I am going to explain the above mentioned scenario with some examples.

Example: 01
SystemUtil.exe "iexplorer.exe" // Line 1
Browser("micClass:Browser"). Navigate " // Line 2

The above code snippet will launch a new browser and open the site mentioned in line 2.

Launch second browser.
SystemUtil.exe "iexplorer.exe" // Line 3
SystemUtil.exe "iexplorer.exe" // Line 4 Launch a dummy browser
Wait 15  // Waiting for the browsers to load properly

Now try to navigate to some site.This time we can't use the string "micClass:Browser" as there are 2 browsers are opened. In this case we need to go for the ordinal identifier "CreationTime" as I previously mentioned.Use the following code snippet to open a site with CreationTime identifier.

Browser("CreationTime:=0").Navigate ""  // Line 5

We'll get the error "multiple objects found" once the Line 5 is executed.Because "micClass:=Browser" is common for both the browsers.

To eliminate this error we can use the ordinal identifier "index" or "CreationTime" as follows to differentiate the browsers.

To represent the 1st Browser we can use the following code snippet.
Browser("micClass:=Browser","index:=0").Navigate ""
Browser("micClass:=Browser","creationtime:=0").Navigate ""
Browser("index:=0").Navigate ""
Browser("creationtime:=0").Navigate ""

To represent the 2nd Browser we can use the following code snippet.
Browser("micClass:=Browser","index:=1").Navigate ""
Browser("micClass:=Browser","creationtime:=1").Navigate ""
Browser("index:=1").Navigate ""
Browser("creationtime:=1").Navigate ""

Back To Top