Forum Discussion

sparrowenclave's avatar
sparrowenclave
Occasional Contributor
4 years ago
Solved

How to read data from properties test step and add assertion

I have properties test step with some data which is generating on runtime based on the request message, I wanted to read the data from Properties test step and adding a assertions on groovy test step.

  • def name = context.expand( '${Properties#Name}' )

    or
    def name = testRunner.testCase.getTestStepByName("Properties").getPropertyValue("Name")

2 Replies

  • PrathapR's avatar
    PrathapR
    Frequent Contributor

    def name = context.expand( '${Properties#Name}' )

    or
    def name = testRunner.testCase.getTestStepByName("Properties").getPropertyValue("Name")

    • sparrowenclave's avatar
      sparrowenclave
      Occasional Contributor
      Hi Reede,
      Thanks,
      Is there any way we can get mutiple value from properties test step using loop?