I'm not sure what is going on when I execute a test scenario for PATCH restful API

As you can see in assertion result, all condition are resolved but the tag show “Unknown”
When go back to the “All scenarios” result, it shows result-tag as “Failed”


image.png

and when I try to run it alone, it show infinite loading


I’m sure that the api has response properly, as you can see in the post-processing result, it can test assertion for the response

I’m not sure what is going on when execute a test scenario for PATCH

I’m not sure what is going on when I execute a test scenario for PATCH restful API

Is there a custom script or database operation involved in this step of your test scenario?

Yes there are

I have 3 pre-processing scripts here


  1. To set initial parameters for a dummy record
  2. To execute insert-SQL statement with the initial parameters
  3. To set a parameter using in calling PATCH to update a paramter in the dummy record

Then another 3 post-processing scripts here


  1. get the dummy record to do double check later (to check that the result has changed as I expect or not)
  2. to check behavior of API response (i.e. http code, etc.)
  3. delete the dummy record (to reset state of automate-testing)

Do you want any other information?

We have released a new client version of Apidog. You can try the new version to see if the issue persists. If it does, it could be due to the logic in the custom or public script affecting the callback results, resulting in an unknown state.

Additionally, one of the issues you previously reported was regarding the usage scenario of using liveRequire import faker to create mock data in custom scripts, and you mentioned that it was loading slowly.

In the custom script of the new client version of the app, we have added a new pm API. You can now use await pm.variables.replaceInAsync() to generate replacements.

Here is an example script that uses the same syntax as Dynamic Values Dynamic values - Apidog Docs.

const uuid = await pm.variables.replaceInAsync('{% faker datatype.uuid %}')
pm.variables.set("_uuid", uuid);
console.log('print variable _uuid', pm.variables.get("_uuid"));




Is the latest version 2.4.0?

The problem still does exists in 2.4.0

But when run it alone has no infinite loop anymore

Anyway it’s still show unknown state and make running stop when I try to run the whole folder of test scenarios