Data Source - Run Time Change

tapan1986tapan1986 Posts: 25

Is there any way we can change the data during run time in Excel Data Source.

Tagged:

Comments

  • benken_parasoftbenken_parasoft Posts: 664 ✭✭✭
    edited December 2018

    The Excel Data Source only provides the values from your Excel spreadsheet on disk. The contents of the spreadsheet is loaded into memory at the very start of test execution. Perhaps you can explain in more detail about what you are ultimately trying to accomplish? There's probably a different way of achieving things that doesn't involve modifying spreadsheet data.

  • tapan1986tapan1986 Posts: 25

    First we need to get 10000+ records of data from data base(10000+ rows) and send it to API for test.I just need to call DB for Data once before start of test.

  • jakubiakjakubiak Posts: 497 admin
    edited January 2

    SOAtest has the ability to configure a DB data source that can make the query and then iterate over all the rows. The data source will only call the DB once at the start of the test. This is ideal when you want to iterate row by row. See https://docs.parasoft.com/display/SOA9106/Adding+a+Data+Source+at+the+Test+Suite,+Project,+or+Global+Level#AddingaDataSourceattheTestSuite,Project,orGlobalLevel-ConfiguringaDatabaseDataSourceConfiguringaDatabaseDataSource

    If instead you want to get all data and send in a single payload for example, then you could query the database and convert the result set to CSV. You would use a DB Tool to make the query, which would capture the result set within an XML structure. You would then attach an XML Converter tool to the DB Tool to convert the XML structure to a CSV file. See https://docs.parasoft.com/display/SOA9106/DB and https://docs.parasoft.com/display/SOA9106/XML+Converter

  • benken_parasoftbenken_parasoft Posts: 664 ✭✭✭

    First we need to get 10000+ records of data from data base(10000+ rows)

    Use a DB Tool. I imagine you would probably have something like "LIMIT 10000" as part of your SQL statement.

    and send it to API for test.I just need to call DB for Data once before start of test.

    It depends on how you need this sent to your API. The DB Tool provides any SQL result sets as an XML document. You would need to transform or covert that XML document to the format you require, perhaps using XSLT tool or XML Converter tool. The Extension Tool can also be used to script things as needed.

Sign In or Register to comment.