Creating Multiple Webservice Requests for different parameters vs. One Webservice Request

RESTapi testing. Testing an image service that deletes, uploads, and edits images for the specified user.

I’m very new to API testing and katalon (like 3 days new) though I’ve been a tester for years. So, bare with me. I’m wondering if I’m going about the process wrong, or if I have the right idea.

I am testing this endpoint: GET /v1/users/d4b7e47051/images

here’s an example response from this: [
{
“id”:“f51fcf56803f7260aa4f88beded66a71”,
“userId”:“d4b7e47051”,
“status”:“available”,
“metadata”:{
“associations”:[
{
“reason”:“Disneyland is the greatest place on earth!”,
“type”:“url”,
“url”:“https://disneyland.disney.go.com/
}],
“location”:{
“gps”:{
“latitude”:{
“units”:“degrees”,
“value”:33.812101
},
“longitude”:{
“units”:“degrees”,
“value”:-117.918975
}
},
“name”:“Disneyland Park, Anaheim, CA, USA”
},
“metadata”:{
“animal”:“dog”
},
“name”:“Rover being funny!”,
“origin”:{
“id”:“AA5634B2-387A-415E-AB32-166C9EDAC32D”,
“name”:“com.apple.HealthKit”,
“type”:“service”
}
},
“contentIntent”:“alternate”,
“contentAttributes”:{
“digestMD5”:“LIRZqi9XBWBdiBHp4SsR9w==”,
“mediaType”:“image/jpeg”,
“width”:15000,
“height”:15000,
“size”:5037358,
“createdTime”:“2019-03-18T14:06:05.462Z”,
“modifiedTime”:“2019-03-18T14:06:05.462Z”
},
“createdTime”:“2019-03-18T14:06:01.737Z”,
“modifiedTime”:“2019-03-18T14:06:05.462Z”,
“revision”:1
},
{
“id”:“6d5948fbfc30deaa33d545cc14584443”,
“userId”:“d4b7e47052”,
“status”:“available”,
“contentIntent”:“original”,
“contentAttributes”:{
“digestMD5”:“AW/+m9Eyr488zzdJrolraw==”,
“mediaType”:“image/png”,
“width”:10000,
“height”:10000,
“size”:1774441,
“createdTime”:“2019-03-18T04:08:27.367Z”,
“modifiedTime”:“2019-03-18T04:08:27.367Z”
},
“createdTime”:“2019-03-18T04:08:25.611Z”,
“modifiedTime”:“2019-03-18T04:08:27.367Z”,
“revision”:1
},
{
“id”:“2f202d9075763c57b5eede2ff905cbb2”,
“userId”:“d4b7e47052”,
“status”:“available”,
“contentIntent”:“alternate”,
“contentAttributes”:{
“digestMD5”:“Zv1A3k98mEk1tgy9vkwqsg==”,
“mediaType”:“image/jpeg”,
“width”:10000,
“height”:10000,
“size”:1756798,
“createdTime”:“2019-03-18T03:59:16.584Z”,
“modifiedTime”:“2019-03-18T03:59:16.584Z”
},
“createdTime”:“2019-03-18T03:59:14.785Z”,
“modifiedTime”:“2019-03-18T03:59:16.584Z”,
“revision”:1
},
{
“id”:“d6b94b1a8a85961f777c9f1f83b44d00”,
“userId”:“d4b7e47052”,
“status”:“available”,
“contentIntent”:“original”,
“contentAttributes”:{
“digestMD5”:“AW/+m9Eyr488zzdJrolraw==”,
“mediaType”:“image/png”,
“width”:10000,
“height”:10000,
“size”:1774441,
“createdTime”:“2019-03-17T06:36:35.304Z”,
“modifiedTime”:“2019-03-17T06:36:35.304Z”
},
“createdTime”:“2019-03-17T06:36:32.329Z”,
“modifiedTime”:“2019-03-17T06:36:35.304Z”,
“revision”:1
},
{
“id”:“41c2f259151041aaac2d31f1dc9a5ca0”,
“userId”:“d4b7e47052”,
“status”:“available”,
“contentIntent”:“alternate”,
“contentAttributes”:{
“digestMD5”:“AW/+m9Eyr488zzdJrolraw==”,
“mediaType”:“image/png”,
“width”:10000,
“height”:10000,
“size”:1774441,
“createdTime”:“2019-03-17T06:35:22.791Z”,
“modifiedTime”:“2019-03-17T06:35:22.791Z”
},
“createdTime”:“2019-03-17T06:35:19.55Z”,

sending a request here allows you to pull all images stored for that user (regardless of content, file type, ect)
However, I want to test some parameters as well that have been defined such as “contentIntent” and “Status”.

Currently, this is my method of testing which involves creating seperate webservice requests for each parameter and then creating test cases for each of those…

  1. GET /v1/users/d4b7e47052/images
  2. GET /v1/users/d4b7e47052/images?status=created
  3. GET /v1/users/d4b7e47052/images?status=available
  4. GET /v1/users/d4b7e47052/images?contentIntent=alternate

I really don’t know if this is helpful, but…Screenshots of my current workflow…ignore the testing errors for right now lol

I’m wondering if its possible to create just the main GET /v1/users/d4b7e47052/images and use variables in my test cases to try out different parameters instead of creating multiple webservices and test cases off of those.

Hope this makes sense. If you need to see anything more let me know and thank you for your patience. We all have to learn somehow. my time is now :slight_smile:

Yes, it is possible, see this discussion:

Setting HTTP Body during runtime. < option 3 (is for POST request but same you can apply to GET, build the url in the test-case script and call the generic object with parameters).

You can parametrize also only parts of the URL, see the doc:

@Ibus Thanks! Your a lifesaver!