Forum Discussion

avidCoder's avatar
avidCoder
Super Contributor
7 years ago
Solved

How to get the DataSink property values printed?

Can we print the datasink property values?

  • Oh, I got the solution:--

     

    def data = context.testCase.getTestStepByName("DataSink");

    propToGet = data.getPropertyNames();
    for ( int j = 0 ; j < propToGet.size(); j++ ){
    def value = data.getPropertyValue(propToGet[j])

    }

3 Replies

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    What do you mean by "print the datasink property values"? 

    • avidCoder's avatar
      avidCoder
      Super Contributor

      Oh, I mean, How to get the propertyValue and propertyName from the DataSink.. using groovy code.

      • avidCoder's avatar
        avidCoder
        Super Contributor

        Oh, I got the solution:--

         

        def data = context.testCase.getTestStepByName("DataSink");

        propToGet = data.getPropertyNames();
        for ( int j = 0 ; j < propToGet.size(); j++ ){
        def value = data.getPropertyValue(propToGet[j])

        }