1

I want to create a re-usable feature which can be called by other feature files and that re-usable feature file should accept different json payloads

I want the analyticPayload to accept json file which is passed from createAnalytic.feature

1) createAnalytic.Feature -->

Given url xyz
And headers abc
And header Content-Type = 'multipart/form-data'
And multipart field analytic = analyticPayload
And multipart file file = templateJar
When method POST
Then status 200

2) createAnalytic.Feature -->

Scenario Outline:

* def analyticEntry= call read('classpath:tests/commonFeatures/createAnalytic.feature') {analyticPayload:<analyticPayload>}


Examples:
|analyticPayload|
|read('classpath:payloads/analyticCreation/createPowerAnalytic.json')|

Getting the error : :1:97 Missing close quote com/ge/KraftTests/commonFeatures/createAnalytic.feature') {analyticPayload:powerAnalyticTemplate} ^ in at line number 1 at column number 97

Sherry
  • 31
  • 8

1 Answers1

0

that re-usable feature file should accept different json payloads

In my opinion, no it should not. Can you please read this answer carefully - and if you still want to go down this path, open a new question.

https://stackoverflow.com/a/54126724/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248