Apidog contains a Javascript-based scripting engine. You can use scripts (JavaScript code snippets) to add dynamic behavior to API requests or collection tests.What can be achieved with scripts:
1.
Test (assert) the correctness of the results returned by the request (postprocessor script).
2.
Modify API request parameters dynamically, such as adding API signature parameters, etc (preprocessor script).
3.
Pass data between API requests (using scripts to manipulate variables).
4.
Directly call programs written in other languages. We support java(.jar), python, PHP, JS, BeanShell, go, shell, Ruby, Lua, etc.
Apidog script syntax is compatible with Postman script syntax. Postman scripts can be seamlessly migrated to Apidog.See all pm syntax supported here.
For those unfamiliar with JavaScript, writing pm scripts can be challenging. To address this, we recommend using the Apidog Script Generator to simplify script writing. Simply describe the script you want in natural language, and the generator will create a runnable script for you.
Q: Does Apidog support pm.nextRequest()?A: Apidog does not have a "Run collection" functionality, so it cannot use pm.nextRequest(). The corresponding method is to create a test scenario in the Tests module, and then add an if condition, so that you can make different requests under different conditions.