Apidog Docs
🇺🇸 English
  • 🇺🇸 English
  • 🇯🇵 日本語
HomeLearning CenterSupport CenterAPI References
HomeLearning CenterSupport CenterAPI References
Discord Community
Slack Community
X / Twitter
🇺🇸 English
  • 🇺🇸 English
  • 🇯🇵 日本語
  1. Automated tests
  • Apidog Support Center
  • Import/Export
    • How to import API data into Apidog?
    • How to import cURL in Apidog?
    • How to migrate Postman environments to Apidog?
    • How to auto - group endpoints on Swagger/OpenAPI import?
  • Sending requests
    • Does Apidog support Socket.IO?
    • Why is the "+" in the parameter value decoded as a space?
    • How to send a request in Apidog?
    • How to send a graphQL request in Apidog?
    • How to send a gRPC request in Apidog?
    • How to send a SOAP/WebService request in Apidog?
    • How to send a WebSocket request in Apidog?
    • Does Apidog support pre-request/test scripts and assertions in WebSocket APIs?
    • How to send a SSE request in Apidog?
    • How to add default headers at the folder level?
    • Does Apidog support pre-request/test scripts and assertions in gRPC APIs?
    • Why am I getting a "socket hang up" error when sending a request?
    • ELANREFUSED.DNS Resolver Error
  • Designing APIs
    • How do I use variables in the path?
    • Can I use a response component as the default response?
    • How to check who has modified an endpoint?
    • How can I bulk delete endpoint folders in Apidog?
    • How can I bulk add/remove prefixes to the path of endpoints?
    • How to move a Property's level in the Schema Editor?
    • If a string property has multiple enumerated values and is used in various locations, how can this enum be consistently referenced throughout?
    • How to get Apidog resource folder ID?
    • How do I get the resource floder ID of Apidog?
    • How do I use variables in a URL path?
    • What should I do if an endpoint, document, or test scenario is accidentally deleted?
    • Does Apidog support request code for custom endpoints?
  • Debugging APIs
    • How does Apidog integrate with third-party key management systems?
    • Why does the same request work correctly in other tools (such as Postman) but not in Apidog?
    • How to fetch variable values from database in Apidog?
    • How to migrate environments from other tools to Apidog?
    • How to assert using scripts in Apidog?
    • JSONPath can only extract arrays. How can we extract a single element from within them in Apidog?
    • How to configure database operations in Apidog when different environments have different database account credentials?
    • How to get service base URL in custom script?
    • Why does Apidog report an error exceeding the maximum Node.js string length when the API response is too large?
    • What is the size limit for console printing?Why do I get an error when printing large files?
    • How to resolve DB2 database connection errors on Windows?
    • How to Generate Dynamic Values in Apidog Custom Scripts?
    • Why does the client request for the same endpoint succeed, but an error occurs when debugging on the web side: "Unable to request address"?
    • Why does Apidog report an error when the response is too large?
    • How do I use the Apidog recording endpoint?
    • When defining an endpoint response, is it allowed for the endpoint to have no response content?
    • How do I get the service baseURL in a custom script?
    • How do I view the original packet in Apidog?
    • How do I make an asynchronous request in an Apidog script?
    • What is the console print size limit? Why Do I Get an Error When I Print a Large File?
    • How do I upload a file on an endpoint request?
    • What to Do If Apidog crashes or Response Data Isn’t Showing ?
  • Mock API data
    • How to mock APIs automatically?
    • What can Apidog mocking do?
    • How to mock fixed API data in Apidog?
    • How to mock conditional data in Apidog?
    • How to enable cloud mock in Apidog?
    • How to enable self-hosted mock in Apidog?
    • Does Apidog support mocking WebSocket APIs?
    • Why Is the Browser Not Returning Content When Requesting the Mock endpoint?
  • Automated tests
    • Why do test scenarios run without issues on my local client, but errors occur when running them in the Apidog CLI or runner?
    • How to create a test scenario in Apidog?
    • How to pass data between test steps?
    • Why am I not able to successfully reference pre-step data?
    • How to use foreach loop in Apidog?
    • What are the differences between sync data from endpoints/endpoint cases?
    • How to use test data in Apidog?
    • How to retrive test data in scripts in Apidog?
    • How to run test scenarios in batch in Apidog?
    • How to schedule test tasks in Apidog?
    • How to run performance test in Apidog?
    • How can I view the actual requests and responses in the performance tests?
    • How can I export performance test reports in Apidog?
    • How to use database query results as parameters for looping API requests?
    • Capture and Validate Stripe Webhooks in ApiDog During CI/CD
    • How to resolve the "Error: unable to verify the first certificate on runner" error?
    • General Runner Docker Container "Not Found" Error.
    • How to Set the Server Host for the General Runner in Apidog Web Version?
    • Why Scheduled test scenario endedup with 0 request?
    • What should I do if the file upload parameter cannot be found in Runner or CLI?
    • How to use Runner to run a test scenario with an upload file step?
    • How do I resolve the "Error: unable to verify the first certificate on runner" error?
    • How do I access and search the runner logs to identify the issue when a problem arises with a runner?
    • What should I do if the endpoint parameter is an upload file and cannot be found in Runner or CLI?
    • Why Aren't Test Steps Automatically Synchronized When the API Use Case Changes?
    • Why Does Using Multiple Dollar Signs in a Markdown Document Cause Some Content to Not Display Correctly?
  • Publish API Docs
    • How to hide all Apidog logos in published documents?
    • When the API spec is updated, will the API doc change?
    • How to share APIs to collaborators in Apidog?
    • How to customize domain of Apidog documentations?
    • How to create multi-version documentation in Apidog?
    • Scope of sharing for Publish Docs Sites in Apidog
    • Scope of sharing for Share Doc list in Apidog
    • Why publlished Share Docs is not showing the hostname?
    • How Can Document Users Modify the Base URL in Shared Docs ?
  • Markdown
    • How to use cards to link to various pages or endpoints within Apidog?
    • Why is some content not displayed correctly when using multiple $ symbols in Markdown documents?
    • How to use transparent background images in Apidog Markdown?
    • How to set the column width of a Markdown table?
  • Branches
    • How to access the sprint branch?
  • Administration
    • How to install Apidog client silently?
    • Why am I seeing a 'No Permission' error despite having admin access?
    • How do I check the runner version number?
    • Does Apidog support win7?
    • Why does Apidog show the error "Cannot locate program entry point DiscardVirtualMemory in dynamic link library KERNEL32.dll" after installation?
    • Can I set up a separate billing account for my team in Apidog?
  • Billing
  • On-premises
    • User and Access Management in Apidog Self-Hosted (Enterprise) Version
  • Apidog Europe
  1. Automated tests

How to create a test scenario in Apidog?

Create a test scenario#

Upon opening Apidog, navigate to “Tests” module, and then click the + next to the search bar to create a new test scenario. Select the appropriate directory for it, and set the priority to complete the creation.

Add test steps#

Once you have set up your test scenario in Apidog, you can start populating it with requests. There are several ways to add requests, each tailored to different needs and flexibility:
1.
Requests linked to the API spec—These requests could be updated as the API specification changes:
a. Import from endpoint spec: This method involves importing requests straight from the structured definition within the API spec. It ensures your tests align with the API's documented interface, although you may need to manually adjust request parameters to meet specific testing conditions.
b. Import from endpoint case: Utilize this option to pull requests from predetermined endpoint cases that already contain configured parameters. This is particularly useful for standardized tests that simulate real-world API usage, enabling consistency across test runs.
2.
Independent requests not associated with the API spec—These requests do not update in response to changes in the API spec. They allow for greater customization:
a. Add custom request: Craft requests from scratch to tailor test scenarios to specific requirements. This approach offers maximum flexibility to explore beyond the bounds of the existing API specification.
b. Add from cURL: Leveraging cURL lets you import or sculpt customized requests efficiently. It's a handy way to quickly create requests that mimic complex or unique API interactions without being constrained by the API spec.
3.
Reference other test scenarios:
a. Include requests from other test scenarios: This method allows you to import specific requests from different test scenarios already defined in your project.
b. Reference other test scenario: For comprehensive testing, you might need to employ the entirety of another test scenario. This capability ensures that you can integrate all related tests and configurations, avoiding the need to duplicate setup efforts and fostering unified testing strategies.

Import from endpoint spec#

You can import endpoint specs from the current project as steps in the test scenario. There are two modes when importing endpoints: "Manual" and "Automated." For more detailed instructions, please refer to Sync Data from APIs/API Cases.
Manual
In "Manual" mode, modifications to the endpoint documentation within the project do not have an immediate impact on the endpoints in the test steps. Synchronization of test data only occurs when testers activate the "Manual" button. It is important to note that alterations made to the test step data will not update the endpoint documentation, even when clicking for "Manual Sync". Instead, clicking this button enables the test scenarios to retrieve information from the endpoint documentation for synchronization purposes.
Automated
In the "Automated" mode, any changes in the endpoint documentation within the project will be updated synchronously in the test steps.
If you need to test endpoints from other projects in one test scenario, please refer to Import Endpoints/Cases from Other Projects to Test Steps.

Import from Endpoint Case#

You can choose to import endpoint cases from the current project or other projects. There are two modes when importing endpoint cases: "Copy" and "Reference".
Copy
When importing an endpoint case as "Copy", the parameters in the endpoint case will also be copied into the test steps. They will be independent of each other, and changes in each will not affect the others. Manual sync can be selected.
Reference
When importing an endpoint case as "Reference", it will directly use the endpoint case from the original project for the request.

Add Custom Request#

In a working process, you may need to call an endpoint outside of the project, such as a third-party payment endpoint.
You can add a custom API request in the test steps. The custom request can be any HTTP request, including common GET, POST, PUT, DELETE, etc.

Add from cURL#

In a real working processes, many endpoint requests are presented in the form of cURL command lines. You have the option of importing cURL requests into the test steps, with just a single click.

Include steps from Other Test Scenarios#

You can clone the test steps or process control conditions by importing from other test scenarios within the same project.

Reference Other Test Scenarios#

You can reference other test scenarios as a test step. There are two use cases:
1.
If your business process has some common, reusable API test steps, you can compile these steps into a small test scenario and then reference it directly in other wider test scenarios.
2.
If you need to regress the mainstream process of the entire product, you can refer to the various sub-test scenarios in the test scenario for assembly, and complete the test regression work of all mainstream processes with one click.
To prevent infinite loops and situations where the test scenario cannot stop running normally, the feature of referencing other test scenarios cannot reference the original test scenario itself.

Orchestrate the test scenario#

Clicking any test step will enter the orchestrate mode. In this mode, you have a larger operating page to better and more efficiently fill in the detailed content of each test step. The left side of the page is the overall flow of the test scenario, and the right side is the details of the selected test step. Endpoint requests and testing process control components will have different display panels.
You can adjust the order of the steps by dragging the ≡ in front of the step.
You can use the "⬆️" and "⬇️" keys to quickly switch between the selected test steps in this mode.
In the orchestrate mode, you can edit multiple steps and then click the "Save All" button in the top left corner to save all the changes.
If any step has unsaved changes, the step will be marked with a dot in the list bar on the left. Remember to always save the changes you have made.
Previous
Why do test scenarios run without issues on my local client, but errors occur when running them in the Apidog CLI or runner?
Next
How to pass data between test steps?
Built with