String json = "{ \n" +
" \"id\":\"\",\n" +
" \"type\":\"ENTERPRISE_ORG\",\n" +
" \"owner\":{ \n" +
" \"type\":\"ORGANIZATION\",\n" +
" \"identity_reference\":"+identityReference+"\n" +
" },\n" +
" \"license_type\":\"CONTRACTED\",\n" +
" \"contract_start_date\":\"2018-03-22T00:00:01\",\n" +
" \"contract_end_date\":\"2020-03-22T07:00:01\",\n" +
" \"effective_date\":\"2018-03-22T00:00:01\",\n" +
" \"originating_entity_id\":"+orginatingReference+",\n" +
" \"external_contract_id\":\"0047813102Gs2LOCCZ\",\n" +
" \"sold_to_id\":\"1041292\",\n" +
" \"sold_to_name\":\"BLOOMSOFT ARGENTINA SA\",\n" +
" \"sold_to_type\":\"RESELLER\",\n" +
" \"market_segment\":\"CR\",\n" +
" \"iso_3166_alpha2_code\":\"US\",\n" +
" \"eu_id\":\"22547302\",\n" +
" \"parent_org_id\":\"\",\n" +
" \"acm_id\":null,\n" +
" \"abn\":null,\n" +
"}";
I have post api for above request json and need to have same json with different set of data for various scenarios and need to capture values at run time and pass to next post api
Question:
Iām confused and worried how to call json request for easy maintenance and standard process.
Options
Create a Java String method and call in feature file and parametrize
Create json and read it and parametrize from feature file
Directly having json content in feature file for each scenario with various data. Not sure moving forward any changes in the json need lot of updates / maintenance
Any suggestions would be great