Results 1 to 4 of 4
  1. #1

    "Calling DataDriven Testcase from Main"

    Hi All,
    I have a data driven testcase which behaves as expected while running individually as a testcase. I am binding only a few fields in the excel sheet to my scripts.
    When i tried calling this testcase from Main()function,it asks for the parameter of type record, when i tried passing sample data( hard coded) it does fine, but how to make it work from Main() by taking the entries(parameter to the data driven testcase) from Excel sheet.

    Thanks for any help in advance

  2. #2

    Re: "Calling DataDriven Testcase from Main"

    in the main function call the database calls to get the data from the spreadsheet and then call the testcase passing in the data. Something like:

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">main
    rData = GetDataFromExcel ()
    MyTestcase (rData)</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

  3. #3

    Re: "Calling DataDriven Testcase from Main"

    Hi Jamesso,
    Thanks for your inputs, when i tried using the same, compilation fails saying "Function GetDataFromExcel() is not defined". Do i need to include any specific inc file for using this function.


  4. #4

    Re: "Calling DataDriven Testcase from Main"

    I was writing an example using pseudo-code. You'll need to write the function GetDataFromExcel yourself just as you'll have to write your own testcase function. If you do a search on this site there are numerous posts on how to get data from excel and sample code to go with it.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:53 PM.

Copyright BetaSoft Inc.