Fields Playbooks
Fields playbooks focus on testing the overall validation and handling of individual request fields. These playbooks are essential for verifying type safety, boundary enforcement, Unicode handling, and structural resilience at the field level.
There are 67 fields playbooks, which can be grouped into the following categories:
Boundary and Constraints
IntegerFieldsLeftBoundaryPlaybook: Out-of-range integers on the left boundaryIntegerFieldsRightBoundaryPlaybook: Out-of-range integers on the right boundaryDecimalFieldsLeftBoundaryPlaybook: Out-of-range decimals on the left boundaryDecimalFieldsRightBoundaryPlaybook: Out-of-range decimals on the right boundaryExtremePositiveNumbersInIntegerFieldsPlaybook: Extreme positive integer valuesExtremeNegativeNumbersInIntegerFieldsPlaybook: Extreme negative integer valuesExtremePositiveNumbersInDecimalFieldsPlaybook: Extreme positive decimal valuesExtremeNegativeNumbersInDecimalFieldsPlaybook: Extreme negative decimal valuesMinLengthExactValuesInStringFieldsPlaybook: Exact string minLength valuesMaxLengthExactValuesInStringFieldsPlaybook: Exact string maxLength valuesMinimumExactNumbersInNumericFieldsPlaybook: Exact minimum numeric valuesMaximumExactNumbersInNumericFieldsPlaybook: Exact maximum numeric valuesStringFieldsLeftBoundaryPlaybook: Out-of-range strings on the left boundaryStringFieldsRightBoundaryPlaybook: Out-of-range strings on the right boundaryMinGreaterThanMaxFieldsPlaybook: Lower-bound field greater than upper-bound field
Type and Format Validation
StringsInNumericFieldsPlaybook: Strings sent to numeric fieldsDecimalNumbersInIntegerFieldsPlaybook: Decimals sent to integer fieldsRandomStringsInBooleanFieldsPlaybook: Random strings sent to boolean fieldsStringFormatAlmostValidValuesPlaybook: Almost-valid formatted stringsStringFormatTotallyWrongValuesPlaybook: Totally invalid formatted stringsIterateThroughEnumValuesFieldsPlaybook: Valid enum values iterationInvalidValuesInEnumsFieldsPlaybook: Invalid enum valuesEnumCaseVariantFieldsPlaybook: Case-variant enum valuesHomoglyphEnumFieldsPlaybook: Homoglyph-altered enum valuesEmptyStringsInFieldsPlaybook: Empty string valuesNullValuesInFieldsPlaybook: Null values in fields
Unicode, Emojis, Special Characters
AbugidasInStringFieldsSanitizeValidatePlaybook: Abugidas characters in fieldsHangulFillerFieldsSanitizeValidatePlaybook: Hangul filler charactersBidirectionalOverrideFieldsPlaybook: Bidirectional-override charactersZalgoTextInFieldsSanitizeValidatePlaybook: Zalgo textZeroWidthCharsInValuesFieldsSanitizeValidatePlaybook: Zero-width characters in valuesLeadingSingleCodePointEmojisInFieldsTrimValidatePlaybook: Leading single-codepoint emojisLeadingMultiCodePointEmojisInFieldsTrimValidatePlaybook: Leading multi-codepoint emojisTrailingSingleCodePointEmojisInFieldsTrimValidatePlaybook: Trailing single-codepoint emojisTrailingMultiCodePointEmojisInFieldsTrimValidatePlaybook: Trailing multi-codepoint emojisWithinSingleCodePointEmojisInStringFieldsTrimValidatePlaybook: Emojis within values (single codepoint)WithinMultiCodePointEmojisInStringFieldsTrimValidatePlaybook: Emojis within values (multi codepoint)OnlySingleCodePointEmojisInFieldsTrimValidatePlaybook: Single codepoint emojis onlyOnlyMultiCodePointEmojisInFieldsTrimValidatePlaybook: Multi codepoint emojis onlyUppercaseExpandingBytesInStringFieldsPlaybook: Strings that expand bytes when uppercasedUppercaseExpandingLengthInStringFieldsPlaybook: Strings that expand length when uppercasedLowercaseExpandingBytesInStringFieldsPlaybook: Strings that expand bytes when lowercasedLowercaseExpandingLengthInStringFieldsPlaybook: Strings that expand length when lowercasedFullwidthBracketsFieldsPlaybook: Fullwidth ' < ' and ' > ' characters
Size and Structure Stress
VeryLargeStringsInFieldsPlaybook: Very large stringsVeryLargeUnicodeStringsInFieldsPlaybook: Very large Unicode stringsVeryLargeIntegersInNumericFieldsPlaybook: Very large integersVeryLargeDecimalsInNumericFieldsPlaybook: Very large decimalsOverflowArraySizeFieldsPlaybook: Overflow array sizesOverflowMapSizeFieldsPlaybook: Overflow map sizesReplacePrimitivesWithObjectsFieldsPlaybook: Replace primitives with objectsReplacePrimitivesWithArraysFieldsPlaybook: Replace primitives with arraysReplaceObjectsWithPrimitivesFieldsPlaybook: Replace objects with primitivesReplaceObjectsWithArraysFieldsPlaybook: Replace objects with arraysReplaceArraysWithPrimitivesFieldsPlaybook: Replace arrays with primitivesReplaceArraysWithSimpleObjectsFieldsPlaybook: Replace arrays with simple objectsAdditionalPropertiesMassAssignmentFieldsPlaybook: Unexpected extra properties in objects
Schema Semantics and Discriminators
SwapDiscriminatorValuesFieldsPlaybook: Swap discriminator valuesTemporalLogicFieldsPlaybook: Semantically invalid temporal values
Defaults, Examples, Field Names
ExamplesFieldsPlaybook: Contract-defined examplesDefaultValuesInFieldsPlaybook: Use defaulted valuesInsertWhitespacesInFieldNamesFieldPlaybook: Insert random whitespaces in field namesZeroWidthCharsInNamesFieldsPlaybook: Zero-width characters in field namesDuplicateKeysFieldsPlaybook: Duplicate JSON keys (RFC 8259 ambiguity)
Path and Reference Edge Cases
InvalidReferencesFieldsPlaybook: Invalid path parameter/reference values
Add/Remove Fields
RemoveFieldsPlaybook: Systematically remove fieldsNewFieldsPlaybook: Add unexpected field (dochiaFuzzyField)
How to Use Fields Playbooks
Running All Fields Playbooks
Use the built-in flag to run only Fields playbooks:
# Run only Fields Playbooks
dochia test -c api.yml -s https://api.example.com --fields-only
# Short form
dochia test -c api.yml -s https://api.example.com -F
For completeness, you can also target other categories:
# Only Body playbooks
dochia test -c api.yml -s https://api.example.com --body-only # or -B
# Only Header playbooks
dochia test -c api.yml -s https://api.example.com --headers-only # or -A
Running Specific Fields Playbooks
# Validate constraints and formats
dochia test -c api.yml -s https://api.example.com \
--playbooks IntegerFieldsLeftBoundaryPlaybook,StringFormatTotallyWrongValuesPlaybook,InvalidValuesInEnumsFieldsPlaybook
# Stress with very large values (use responsibly)
dochia test -c api.yml -s https://api.example.com \
--playbooks VeryLargeStringsInFieldsPlaybook,VeryLargeIntegersInNumericFieldsPlaybook \
--large-strings-size 60000
# Focus on shape mutations
dochia test -c api.yml -s https://api.example.com \
--playbooks ReplaceObjectsWithArraysFieldsPlaybook,ReplacePrimitivesWithObjectsFieldsPlaybook,OverflowArraySizeFieldsPlaybook
Use Case: Input Validation Hardening
Before a production release, run a suite of fields playbooks to ensure strict validation and sanitization at the field level.
# A good suite for hardening against invalid and edge-case inputs
dochia test -c api.yml -s https://api.example.com \
--playbooks IntegerFieldsLeftBoundaryPlaybook,MinLengthExactValuesInStringFieldsPlaybook,InvalidValuesInEnumsFieldsPlaybook,ZeroWidthCharsInValuesFieldsSanitizeValidatePlaybook
See Also
- Body Playbooks - Body structure, HTTP methods, and logic
- Headers Playbooks - Header manipulation and security
- Playbooks Overview - General introduction to playbook types
Detailed Guide to Fields Playbooks
Boundary and Constraints
IntegerFieldsLeftBoundaryPlaybook
- Description: Tests integer fields with out-of-range values on the left boundary (below minimum)
- Example: For a field with minimum 1, sends value 0
StringFieldsRightBoundaryPlaybook
- Description: Tests string fields with out-of-range values on the right boundary (above maximum length)
- Example: For a field with maxLength 10, sends an 11-character string
MinGreaterThanMaxFieldsPlaybook
- Description: Tests semantic validation by setting lower-bound fields greater than upper-bound fields
- Example:
{"minAmount": 100, "maxAmount": 50}
Type and Format Validation
StringsInNumericFieldsPlaybook
- Description: Sends string values to numeric fields to test type validation
- Example:
{"price": "not-a-number"}
InvalidValuesInEnumsFieldsPlaybook
- Description: Sends invalid values to enum fields
- Example: For enum ["red", "green", "blue"], sends "purple"
HomoglyphEnumFieldsPlaybook
- Description: Tests enum fields with visually similar but different characters
- Example: For enum value "admin", sends "аdmin" (with Cyrillic 'а')
Unicode and Special Characters
ZalgoTextInFieldsSanitizeValidatePlaybook
- Description: Tests fields with zalgo text (combining characters that create distorted appearance)
- Example:
"H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ"
BidirectionalOverrideFieldsPlaybook
- Description: Tests fields with bidirectional override characters that can manipulate text direction
- Example:
"useradminname"(appears as "useradminname" but contains hidden characters)
Size and Structure Stress
VeryLargeStringsInFieldsPlaybook
- Description: Tests fields with very large string values (default 40,000 characters)
- Example: A string with 40,000 'A' characters
OverflowArraySizeFieldsPlaybook
- Description: Tests array fields with extremely large arrays to test memory limits
- Example: An array with thousands of elements
AdditionalPropertiesMassAssignmentFieldsPlaybook
- Description: Tests objects by adding unexpected extra properties to test mass assignment vulnerabilities
- Example:
{"name": "John", "unexpectedField": "malicious"}