On trying to store a value from response in a variable ,to use it for the next post call and facing "no step-definition method match found for: def referenceId= response.referenceId" this error.
Feature: To test GET /leads/{id} API
# To generate test data for getLeads
Scenario: Test with valid flow
Given url baseUrl+leads
And request {some valid request body}
When method post
Then status 200
* assert response.referenceId != null
* def referenceId= response.referenceId
Scenario: Test with get call
Given url baseUrl+getLeadsByID+referenceId
When method get
Then status 200
Till the assert step working fine. While trying to set referenceId getting this ."no step-definition method match found for: def referenceId= response.referenceId"