Forum Discussion

anupamchampati's avatar
anupamchampati
Frequent Contributor
6 years ago

insert query from excel or variable

need a suggestion
i have around 250 insert query and 50 databse checkpoint
so shall i read the insert query from excel or sqlfile? datadriven approach
or shall i save the query 20 per each variable in projrct global variables?
which would be recommended as per the performance and playback time
  • Yes, there are more than 81 columns in the Database, I have unique 250 insert queries as my Test Cases.

    After Insert1 , my application does some operations, which again I need to check with different Database Tables for which I am using Database Checkpoints.

     

    I did read from sql file using aqFile.ReadTextFile and it is very quick now.

     

    I would love to see the custom code for Database Checkpoint can you please give me any example in post or email : champatianupam@gmail.com whichever is easy for you.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What's different about the insert queries?  Why 250?  Are they so different that you need to actually have 250 queries written out verbatim?  Could you create a code routine that would have a template of an insert query that you would just replace values in that you can call?  That way anything you would have in a data driven structure would be more efficient: just values rather than whole SQL statements.

     

    Likewise for the database checkpoints, you can probably be more efficient to, again, write custom code to do the datatbase checkpoint rather than having to maintain 50 different ones.  Using, the same data source as generating the inserts, you could have code that does the proper comparisons of the data tables.

    • anupamchampati's avatar
      anupamchampati
      Frequent Contributor

      Yes, there are more than 81 columns in the Database, I have unique 250 insert queries as my Test Cases.

      After Insert1 , my application does some operations, which again I need to check with different Database Tables for which I am using Database Checkpoints.

       

      I did read from sql file using aqFile.ReadTextFile and it is very quick now.

       

      I would love to see the custom code for Database Checkpoint can you please give me any example in post or email : champatianupam@gmail.com whichever is easy for you.