Apidog Docs
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
HomeLearning CenterSupport CenterAPI References
HomeLearning CenterSupport CenterAPI References
Discord Community
Slack Community
X / Twitter
πŸ‡ΊπŸ‡Έ English
  • πŸ‡ΊπŸ‡Έ English
  • πŸ‡―πŸ‡΅ ζ—₯本θͺž
  1. Learning Center
  • Back to home
  • Dynamic values Modules
  • Airline
  • Animal
  • Color
  • Commerce
  • Company
  • Database
  • Datatype
  • Date
  • Finance
  • Food
  • Git
  • Hacker
  • Helpers
  • Image
  • Internet
  • Location
  • Lorem
  • Music
  • Number
  • Person
  • Phone
  • Science
  • String
  • System
  • Vehicle
  • Word
  1. Learning Center

Dynamic values Modules

Apidog Dynamic Values, built upon Faker.js v9.0.0-rc.1, are enhanced and optimized specifically for API testing workflows. While retaining the robust functionality of Faker.js, Apidog offers a more intuitive and efficient experience for generating realistic test data. If you're already familiar with Faker.js, transitioning to Apidog Dynamic Values will be a breeze.

Comprehensive Dynamic Value Library#

For easy reference, Apidog provides documentation with examples for each dynamic value category, mirroring the structure of Faker.js:
Airline
Animal
Color
Commerce
Company
Database
Datatype
Date
Finance
Food
Git
Hacker
Helpers
Image
Internet
Location
Lorem
Music
Number
Person
Phone
Science
String
System
Vehicle
Word

Key Enhancements in Apidog Dynamic Values#

Here are the key changes that make Apidog Dynamic Values even more powerful and user-friendly:

1. Simplified Expression Syntax for Easy Access#

Apidog uses a concise and intuitive syntax for calling dynamic values:
Faker.js: faker.finance.accountName()
Apidog: {{$finance.accountName}}
Simply type {{% within Apidog to trigger auto-completion and effortlessly explore the available dynamic values.

2. Optimized Output for Objects and Arrays - Increased Flexibility#

Apidog simplifies data handling by returning JSON strings for methods that originally returned objects or arrays in Faker.js, enabling direct access to specific values:
Example 1: Extracting Airport Data
Faker.js: faker.airline.airport() returns an object:
Apidog: Access specific fields directly:
Example 2: Handling Multiple Dates
Faker.js: faker.date.betweens() returns an array:
Apidog: Returns a JSON stringified array for straightforward data processing:
For a comprehensive overview of adjusted methods and their parameters, refer to the Apidog documentation.

3. Enhanced Locale Control for Localized Data Generation#

Apidog provides enhanced control over Locale settings for generating region-specific data:
Function-Level Settings: Define Locale settings individually for each dynamic value function.
Project-Level Defaults: Set a default Locale for your entire Apidog project.
Date Formatting Overrides: Utilize the format method within date-related functions to apply Locale-specific formatting overrides.

4. Preset Parameters for Common Use Cases - Streamlined Workflows#

Apidog boosts your efficiency by providing preset parameters for frequently used methods (customizable as needed):
{{$helpers.fromRegExp('[A-Z0-9]{4}-[A-Z0-9]{4}')}} // Generates strings matching a regular expression
{{$helpers.arrayElement(['abc','123'])}} // Randomly selects an element from an array
{{$helpers.arrayElements(['abc','123'])}} // Selects multiple random elements from an array
{{$helpers.replaceSymbols('##??**')}} // Replaces special symbols with random characters
{{$helpers.slugify('abc 123')}} // Generates a URL-friendly slug

5. Expanded Dynamic Value Library for Extended Coverage#

Apidog enriches your data generation capabilities with new categories and methods:
New Category: food for generating diverse food-related data. Example: {{$food.vegetable}}
New Methods:
{{$date.timeZone}} for generating time zone data.
{{$music.album}} for creating realistic music album names.
{{$music.artist}} for generating artist names.
Enhanced Method Parameters:
{{$phone.number(style='human')}} for generating human-readable phone numbers, such as: (555) 123-4567.
{{$number.int(multipleOf=3)}} for generating integers divisible by a specified number.

6. Unlimited Concatenation - Unleash Your Creativity#

Apidog provides ultimate flexibility by allowing you to seamlessly combine Mock data and dynamic values without limitations, enabling the creation of rich and realistic test scenarios.

7. Expanded Date Functionality for Powerful Date Manipulation#

Apidog extends date-related functions with new parameters for formatting, offset calculation, and more, catering to diverse and complex testing requirements.

Built with