Forum Discussion

678's avatar
678
Regular Contributor
7 years ago

JSON Request Parametrization

I am looking how to do a json Request parameterization as I am holding a hundreds of JSON if I can't create every single json as a Test case/Rest request so I want to pass JSON from Excel File / Text file - Appreciate the help I i am

9 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Ok.

    Are you using data-driven testing?
    What is the skeleton of the test case / steps with their type?
    • 678's avatar
      678
      Regular Contributor

      Yes I am using Data Driven testing 

       

      JSON String is in Files  and Parameters are in Excel 

       

      I need to Get JSON String from Files set parameters from Excel based on the json string and form a JSON Request dynamically 

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    If you have an excel or text file, I've found a datasource step using a file as the input worked best for me.

      • groovyguy's avatar
        groovyguy
        Champion Level 1

        678: I don't have a direct example to share. It looks like you have two files that work together, which may not work with a single File DataSource. If you can provide a sample of the txt file and excel file, I may be able to work up a set of DataSources and/or a groovy script.