public class RestApiHelper extends Object
| Constructor and Description |
|---|
RestApiHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
runApiContaining(String identifier,
String prefix,
String getApi,
String targetApiId,
String variable,
String targerApi)
runApiContaining("name", "zzz_","getCompanies",
"id","companyId","deleteCompany") get all companies with name containing
zzz_, Then gets id of these companies, stores them in companyId variable And
calls deleteCompany
|
static void |
runApiEquals(String identifier,
String value,
String getApi,
String targetApiId,
String variable,
String targerApi)
runApiEquals("name", "test123","getCompanies",
"id","companyId","deleteCompany") get all companies with name equals test123,
Then gets id of these companies And calls delete with id
|
public static void runApiContaining(String identifier, String prefix, String getApi, String targetApiId, String variable, String targerApi) throws org.json.JSONException
getApi: - api to search for identifier. eg. name containing "zzz"prefix: - value containing in getApi. eg. name containing "zzz"identifier: - api to call to get all values. eg. getCompaniestargetApiId: - id used to call target api.eg. id for deleteCompany apivariable: - variable the id is stored in csv keyword file. eg
companyIdtargerApi: - api to call. eg. deleteCompanyorg.json.JSONExceptionpublic static void runApiEquals(String identifier, String value, String getApi, String targetApiId, String variable, String targerApi) throws org.json.JSONException
getApi: - api to search for identifier. eg. name equals "test123"value: - value containing in getApi. eg. name equals "test123"identifier: - api to call to get all values. eg. getCompaniestargetApiId: - id used to call target api.eg. id for deleteCompany apivariable: - variable the id is stored in csv keyword file. eg
companyIdtargerApi: - api to call. eg. deleteCompanyorg.json.JSONExceptionCopyright © 2022. All rights reserved.