Forum Discussion

pankajlalsare's avatar
pankajlalsare
Occasional Contributor
14 years ago

Data Driven Test case

Hello,

I am trying data driven test with TestComplete. I am successful in retriving the data from csv file and enter in the text field in my application, now here what i wish to execute some other command and then return back to the text field to enter next value from the csv file..

How this can be done??

Right now all the values are entered one after another..but i want to execute another command after every value.



Thanks

Pankaj

3 Replies

  • Hi,



    Insert the needed command after the one which enters a value to your text field. The new command should be in the same loop.
  • pankajlalsare's avatar
    pankajlalsare
    Occasional Contributor
    Thanks..This helped..

    My second question is 'Can we have non required data in the xls..Non required data here means which is not used in the ddt in a perticular function, but is used somewhere else in other function..?'

    Example : My xls sheet contains Name, Address, Amount

    and my function is



    Function test1()

    {

    ....keys(DDT.CurrentDriver.Value("Name"));

    }



    Address and amount from xls are used in other function which i ll run after this..

    Right now i am getting Name entries as expected, but after those its typing as null in my text field??



    Thanks!

    -Pankaj
  • Hi,



    In each DDT test, you can use values of the columns you need. DDT doesn't oblige you to use all available columns - it will use only those which you address in your script.

    If you want to run a test after performing another test with the same file, close the current DDT driver and create a new one (see the "Using DDT Drivers" help topic).