Subscribe by Email


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

Sunday, September 2, 2012

What are data driven tests and how they are created in WinRunner?


When you go for testing of your software system or application, it serves good if you check the performance of your software system or application with multiple sets of different data for some set of same operations. 
For doing so you can go for creating a data driven test! Let us see in detail what actually the data driven tests are and how you can create one in the winrunner. 

What are Data Driven Tests?

- Data driven tests cuts down on the difficulty of manually executing the same test over and over again. 
- The data driven test is created with a loop that iterates exactly the same number of times as there are sets of data to be implemented. 
- Say the loop executes 20 times, so in all these 20 iterations the loop executes with a different set of data and drives the test with it. 
- Since every time the test is driven by a different set of data, the test has been termed as the data driven test. 
- However, in order to make the winrunner run a data driven wizard, use parametrization which involves the linking of the data to the test script which it is to drive. 
- After parameterization, the data is stored in a table called data table. 
- It is up to you that whether you carry out this whole process on your own manually or you take the assistance of the data driver wizard. 
- Usually a non driven test consists of the following three steps:
  1. Creation of a test
  2. Execution of the test
  3. Analyzation of the test results.
- In data driven testing there are two additional steps are there in addition to the above mentioned 3 steps. 
- These two extra steps lie between the creation of the tests and execution of the tests. 
- These two extra steps are as mentioned below:
  1. Conversion of the test in to a data driven test and
  2. Creation of a corresponding data table.

Stages involved in creation of data driven test

The below stated are all the stages that are involved in the process of data driven test creation:
  1. Creation of a test
  2. Conversion of a data driven test
  3. Preparation of data table
  4. Running the test
  5. Analyzation of the test results.
- You cannot directly convert a test in to a data driven test. 
- For doing so, first it is required that you should create a basic test and then convert it in to a data driven test. 
- This basic test can be created by recording a test with only a single set of data. 
- Now this test is recorded by going to the insert menu, then selecting GUI check point, then “for single property” command.
- This is to ensure that the correct order is open. 
- This order can be later modified and updated. 
- There is an alternative to this, which is that you can create bitmap check points, bitmap synchronization points and data driven GUI check points. 
- Firstly, the values contained in the check point statements and recorded statements with parameters are replaced and a data table is created which stores the values that are to be assigned to the parameters. 
- This is the parameterization process. 
- The functions and statements are added to the test scripts so that they can be read from the data table. 


Wednesday, July 4, 2012

Define the scripting techniques for test automation?


The main goal of the test automation process is that a highly maintainable and modular frame work should be developed. In a good automated test framework all the modules are independent and distinct from each other and what is happening inside the frame work are not a thing to be bothered by the outsiders. This is all possible with good test scripts. 

Why Scripts are useful?


- With the help of the scripts, the functionality contained inside each module can be readily expanded without causing any impact on other parts of the software system and application.
- Such scripting makes the maintenance of the program code much easier than ever it would be. 
- In addition to this, the complexity of the module will also be reduced with such good scripting. 
- However, maintaining the modularity of the frame work alone will not help, the test scripts should be fully documented. 
- Without adequate documentation, no body will be able to understand properly the working of the test scripts. 
- If this scripting has not been done properly than our test automation process is sure to become a negative statistic for us. 

What are different Scripting Techniques for Test Automation?



1. Linear scripting technique: 
- This scripting technique is quite a simple one and follows simple recording and playback. 
- This is often used by the testers and developers for carrying out the automation of the test cases as well as test flows of the software system or application under question. 
- This technique consists of some redundant functions that are not always required. 
- Some other features of this technique are:
(a)   It is a non structured way of scripting.
(b)   Scripts define the test cases.
(c)    Low development costs.
(d)   Scripts are not shared.
(e)   Scripts are fragile.

     2. Structured scripting: 
     - This scripting technique employs the control structures in the scripts. 
   - With these control structures the testers are able to control the flow of the test cases and scripts. 
    - This one unlike the linear technique is a structured way of scripting and costs a little more. 
    - Its other features are:
     (a) Scripts define the test cases.
     (b) Testers require intermediate programming skills. 
      (c)  Some planning is required.
     (d)  Scripts consist of data as hard core. 
      (e)  Scripts are robust and require less maintenance.
     (f)   Scripting knowledge and programming knowledge is required.

    3. Shared scripting:
   - In this scripting technique, the scripts represent the behavior of the application that is shared among the other scripts. 
    - The functionality is scripted as shared scripts which are then called by the other scripts. 
    - Using technique can make the scripts modular in terms of the functionality that is common.
    - Other features of this scripting technique are:
    (a)  Structured scripts.
    (b)  Scripts define test cases.
    (c)  Low development costs.
    (d)  More planning required.
    (e)  Low script maintenance.

    4. Data driven scripting: 
  - In this scripting technique, the data is kept separated from the scripts and stored in to the external repository as files. 
   - We can say that these scripts are constituted of just programmed code. 
   - Other features of this scripting technique are:
   (a)  Scripts are programmed.
   (b)  Scripts are structured.
   (c)  Test scripts define test cases.
   (d)  High development costs when compared to shared scripting.
   (e)  High programming skills required.
   (f)  Data is isolated. Low script maintenance.
   (g)  Is used where both negative and positive data testing is required.

   5. Key word driven testing: 
   - This scripting technique develops scripts that are used to check and execute the operations that are maintained with the externalized data files. 
   - We can call it as an extension of the data driven scripting technique.  


Facebook activity