Validate parameters and automate tests
Hej from Sweden,
What we would like to achieve is to validate that the parameters are within our "AllowedValues". Currently we have hardcoded them, but our ambition is to automate as much as possible. Question is how can we achive the validation of parameters in a dynamic way.
Endpoint example
1.Ids API
https://{base-domain}/api/items/v1/ids?itemNoEnd=7&itemState=(Saleable)&itemType=((JH),(KH))
Endpoint
https://{base-domain}/api/items/v1/ids
Parameters:
-itemNoEnd=7
-itemState=Saleable
-itemType= [JH,KH]
Allowed Values:
Refer the documentation API (https://{base-domain}/api/items/v1/ids/params)
-itemType = [KH, JH, VH, SH, BH]
-itemNoEnd = {numeric}
-itemState = ["Saleable","Approved","Removed"]
Validate parameters in Service VPro APIs
https://{base-domain}/api/items/v1/ids?itemNoEnd=7&itemState=(Sales)&itemType=(XYZ) //Should NOT be valid//
Steps we want to verify:
1.Validate the input parameters.
2.Item Type & State:
Reponse contains only that item type and state.
3.Generate Item No: