SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    63
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Data Driven Tests and TestData Designing

    Hi!
    I have Web Registration form with 10 Text-Box Fields,

    Question 1 -
    How to create TestData and write Data-Driven script?

    Answer/Approach 1- Create different Data for each and every Testcase of each TextBox fields, i.e I may have to write same data for 10 times(say for checking Max length)
    e.g - My TestData will contain following Columns
    1) TestCase No
    2) TestCase Descriptiopn
    3) TestData
    4) Expected Result

    I will repeat this 10 Times i.e for every field.

    And also I will have to write some-what same script for 10 times
    -----------------------------------------

    Answer/Approach 2- Write reusable functions for same Testcases of fields, so that i don't have to repeat TestData

    e.g
    I will create one generic function for checking max. length which will accept object name, max.length and Based on Max Length my function will create TestData

    And My TestData will contain following columns

    1) Object Name
    2) MaxLength

    *I can repeat it for many properties of the object

    Which is more suitable and Practical or any other Approach?

    ----------------------------------------

    Question 2- How to Design Test Script, means should I write different Testscripts for every field?
    what I am thinking is- I will write 1st TestScripts at Field Level(like for Name, Address) then at Combination of Field level (like Age and Registration/Birth Date) and then at Form Level(like Can Not Submit Blank Form, etc.)

    Which is more suitable and Practical or any other Approach?


    Thanx
    -amit

    ------------------

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Data Driven Tests and TestData Designing

    Think of the whole process as if you were a pit boss responsible for testing different fuel mixtures in a race car. You have 10 chemicals (field) possibilities for fuel mixture (data), but only 1 engine (the form). You define mixtures and expectations based on product specifications and personal experience. If your expectations are met, the test passes.

    1. FUEL:
    Create a record type that contains all 10 fields (chemicals that make up the fuel) and an expected result (pass/fail messages).

    2. GAS CANS:
    Generate a list of records containing relevant combinations (representing mixtures of the chemicals including your expectation of the result). *

    3. ENGINE:
    Write ONE testcase function to process the form (the engine). This routine will invoke the form, fill out the fields, press the OK button and perform pass/fail determination.

    4. RACE DAY:
    Feed data (fuel) entries from the list to the testcase (engine) and watch what happens.


    Now look at what we've accomplished. The record and record list completely separate the data from the testcase code that'll use it. Having only one testcase also isolates all future maintenance, enhancements and extensions to only one code block.


    John

    * = There are many ways to automate this step too based on your knowledge of the characteristics of the fields which might include: default values, maximum length, minimum length, allowed contents, character set limitations if any, form-required inter-field dependencies, etc...)


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:24 AM.

Copyright BetaSoft Inc.