Subscribe by Email


Showing posts with label Data Driven Testing. Show all posts
Showing posts with label Data Driven Testing. Show all posts

Tuesday, November 6, 2012

What is data driven automation testing? What are data driven automation frameworks and data driven scripts?


What is Data Driven Automation Testing

- Data driven automation testing or DDT as the term itself explains is a type of testing that involves tests which are exclusively driven by data. 
- A set of conditions is directly fed to the application as input and the output obtained is verified.
- The process which involves soft coded test environment controls and settings is also verifiable. 
- Input is supplied in the form of a row of the table by the tester in its utter simplest form. 
- This table consists of the values corresponding to the partition or boundary input spaces.
- According to the control methodology of data driven testing the test configuration is read from the data base. 
- This is one king of software testing for which you have so many methodologies to implement it. 
- All the methodologies call for different efforts for creation and subsequent maintenance and hence these methodologies are known to co -exist.
- The basic benefit one can get from the data driven testing is the ease with which the additional inputs can be added to the table on the discovery of the new partitions in it or addition to the SUT or system under test or software product. 
- One aspect of the data driven testing that makes it quite popular in the field of test automation is the cost. 
- Though being quite cheap when it comes to automated testing, the data driven testing can soar high on the cost if carried out manually. 

Methodology of Data Driven Testing

- Data driven testing can be considered to be a testing involving the creation of test scripts to be executed along with the data sets corresponding to them in a frame work. 
- A re-usable test logic is offered by the testing frame work that helps a lot in the reduction of the maintenance part of the software system or application and brings about improvement in the test coverage. 
- For an application, there can be one or more than one central data sources where all this stuff such as input and result data values can be stored. 
- In data driven testing the actual organization and format can be made specific to implementation. 
- Both input and output verification values are included in the test data.
- The facility of harvesting data from a running system has been provided via a ‘sniffer’ or a purpose – built custom tool for the automation environments which are quite advance or we can say mature. 
- The play back of the harvested data is performed by the frame work of data driven testing thus resulting in a automated regression testing tool that is quite powerful. 
- There are certain tasks that are to be carried out during the data driven testing and are coded in the test scripts:
  1. Navigation through the program
  2. Performing read operations on the data sources
  3. Logging of the test status
  4. Logging of the test information and so on.
- Anything that carries a potential to vary or to change variably (for example, end points, locations, test data, environment and so on.) are segregated from the test scripts or logic. 
- These elements are then placed in what is called an external asset. 
- This external asset comprises a test data set or configuration. 
- The logic which the test scripts execute is operated by the data values. 


Monday, October 8, 2012

How many ways we can parameterize data in QTP?


Parameterization is one of the important provisions we have in quick test professional which has enabled the passing of the values to the tests very simple. This parameterization feature enables one to pass multiple values at a time to a test.
And what more? 
The process of parameterization has proven to be a great helping hand while carrying out the data driven testing. Data driven testing is the kind of testing that involves working with multiple sets of data on the same tests. 
The quick test professional comes with various ways for carrying out the process of parameterization:
  1. Parameterization via loop statements
  2. Parameterization via data table
  3. Dynamic test data submission
  4. Obtaining test data via front end objects
  5. Getting test data directly from the spread sheets, flat files or we can say external files.
  6. Getting test data directly from the oracle, MSaccess or we can say data bases.
Now we shall discuss the above 6 different ways of parameterizing the tests in detail.
1. Parameterization via loop statements
In this method the sequential numbers or logical numbers can be passed via the loop statements however you cannot pass strings to the tests.

2. Parameterization via data table: 
One data table or spread sheet is provided along every test in quick test professional. The provided data table along with the test can be used very well for the data driven testing. Furthermore the following 3 purposes are served by the data table:
a)   To import the test data from external spread sheets: for doing this open the data table and place the pointer. Then right click and select the import from file option. Then you need to enter the path of the spread sheet to be imported from and hit ok. Later connect to the test.
b)   To import the test data from the external flat files: for doing this open the data table and place the pointer. Then right click and select the import from file option. Then you need to browse the path of the file to imported and press ok. Later connect to the test.
c)   To import the test data from the data bases: for doing this the user needs to first create a DSN of the data base i.e., the data source name by making use of the SQL commands. This can be done by creating a test data base and saving the created data base with .mdb extension in msaccess. Next step involves creation of a data table and filling it up with data. The last step is to create a DSN and you can start importing the data.

    3. Dynamic test data submission: 
   This also involves the use of the loop statements however the data has to be entered again and again by the user.

    4. Obtaining test data via front end objects

   5. Getting test data directly from the spread sheets, flat files or we can say external files.

   6. Getting test data directly from the oracle, MSaccess or we can say data bases.

There is one more method for parameterizing the data apart from those mentioned above and is also less followed. The method makes use of the dictionary object for the purpose of parameterization. There are several types of parameterization namely:
  1. Data table
  2. Environment variable
  3. Random number
  4. Test and action
The data table consists of the following parameters:
  1. Input parameter
  2. Out put parameter
  3. Random number
  4. Environment variable. 


Sunday, September 12, 2010

Data Driven Testing - Automation Frameworks

Data driven testing is a very important aspect of test automation. In data-driven testing, the scripts read data from an external storage site like a file or database, rather than use values hard-coded in the script. A data-driven test includes the operations like retrieving input data from storage, entering data in an application form, verifying the results and continuing with the next set of input data. It significantly increases test coverage and also helps reduce the need to create more tests with different variables.

The data-driven testing approach can be used with unit, functional and load testing. Data-driven testing separates the test data from the test itself. This makes both the test and the data more flexible and reusable and certainly much more easy to maintain.

Data driven scripts are those application-specific scripts captured or manually coded in the automation tool’s proprietary language and then modified to accommodate variable data. Variables will be used for key application input fields and program selections allowing the script to drive the application with external data supplied by the calling routine or the shell that invoked the test script.

Data-driven testing is built around the need to test how an application deals with a range of inputs. An important use of data driven tests is ensuring that applications are tested for boundary conditions and invalid input. A data-driven test alleviates the pains of testing with large sets of data by separating test input from the test itself.


Facebook activity