Skip to content

Advanced Field Assignments

ASM's automatic field detection (powered by 300+ rules and AI analysis) handles 95% of field configuration automatically. But some applications use patterns ASM can't detect: custom JavaScript events, embedded field formats, URL path variables, or multi-part value assembly.

Advanced field assignments give you precise control over field extraction and assignment when automatic detection falls short. This guide explains when you need manual configuration, the techniques available, and how to configure them.


When ASM Automatic Detection Isn't Enough

What ASM Handles Automatically (95% of Cases)

ASM's rules-based engine + AI detection configure these automatically:

  • Session cookies: JSESSIONID, PHPSESSID, ASP.NET_SessionId
  • CSRF tokens: Form hidden fields, custom headers
  • OAuth Bearer tokens: 14 detection rules for JSON responses
  • ASP.NET ViewState: __VIEWSTATE, __EVENTVALIDATION
  • Standard form fields: Hidden inputs with predictable naming

If ASM configures these correctly, you don't need any of this. Review the Fields View after ASM runs. If fields have grey background and replay works, stop reading and go test.

When You Need Advanced Configuration

You need manual configuration when:

  1. Custom application patterns: JavaScript events ASM doesn't recognize
  2. Embedded fields: Values nested within other field values (e.g., JSON in form data)
  3. URL path variables: Dynamic segments in URL paths like /order/12345/details
  4. Multi-part assembly: Field value built from multiple extracted parts
  5. Conditional logic: Field assignment depends on response content
  6. Fragment extraction: Only part of a field value is dynamic

Symptoms that indicate you need advanced configuration:

  • ✅ ASM ran successfully but replay still fails with 404/403/500 errors
  • ✅ Fields View shows some fields as "Recorded" when they should be dynamic
  • ✅ Manual inspection reveals dynamic values ASM missed
  • ✅ Application uses custom JavaScript frameworks with non-standard field assignment

Ask the AI

ASM ran but my replay fails with 404 errors on /api/order/12345. The
order ID changes every session. Can you help me configure ASM to
extract and use the dynamic order ID in the URL path?

Advanced Techniques Overview

1. Multi-Part Assignments (Value Concatenation)

Use when: Field value is assembled from multiple dynamic parts.

Example scenario: Application sends client_id in two pieces: prefix ca- is hardcoded, suffix pub-1971486205579989 comes from server.

What ASM does automatically: Extracts complete values only.

What you configure: Extract the dynamic fragment, combine with static prefix during assignment.

2. Conditional Assignments (If/Then Logic)

Use when: Field assignment depends on response content or state.

Example scenario: Select first "Open" slot from a list; slot ID depends on which slots are open.

What ASM does automatically: Extracts all values, doesn't apply conditions.

What you configure: Regex pattern that matches only when condition is met.

3. Complex Extraction (Custom Detectors)

Use when: Standard boundary extraction (left/right delimiters) isn't precise enough.

Example scenario: Extract value from custom JavaScript function calls, XML with variable structure, or JSON with dynamic keys.

What ASM does automatically: Uses boundary extraction for common patterns.

What you configure: Custom detection rules (regex, string delimiters, fragment patterns).

4. URL Path Variables

Use when: Dynamic values appear in URL paths, not query parameters.

Example scenario: /widgets/14697302/index.html where 14697302 changes per session.

What ASM does automatically: Handles query parameters (?id=123), not path segments.

What you configure: Dynamic Path Segment Detector to extract and replace path values.

5. Embedded Fields (Fields Within Fields)

Use when: Field value contains other fields (e.g., JSON or custom format).

Example scenario: Form field query has value {x: 1, y: 2} where x and y are dynamic.

What ASM does automatically: Treats entire field value as single unit.

What you configure: Pattern to parse embedded fields from parent field value.


Multi-Part Assignments: Fragmented Values

The Problem

Some applications split dynamic values into multiple parts:

Example: Google AdSense client ID

  • Full value (what's posted): ca-pub-1971486205579989
  • Server sends: Only pub-1971486205579989 in JavaScript
  • Static prefix: ca- is hardcoded in application logic

ASM behavior: Looks for complete value ca-pub-1971486205579989 in responses, can't find it (only pub-1971486205579989 exists), so treats field as static.

Result: Replay uses hardcoded ca-pub-1971486205579989 instead of extracting fresh pub-XXXXXXXXXX.

The Solution: Fragment Pattern

Configure ASM to extract only the dynamic fragment and replace it within the full value.

Step-by-step:

  1. Identify the dynamic fragment: Which part of the value changes? (pub-1971486205579989)
  2. Identify the static parts: Which parts are always the same? (ca- prefix)
  3. Create custom detector with fragment pattern
  4. ASM extracts fragment and replaces it within the full field value during replay

Example configuration (Detection Rules preferences):

Parameter Value
detector sdd (Single Field String Delimited Detector)
detector.name Example Ad Client ID Detector
string.prefix google_ad_client = "
string.suffix ";
field.name client
fragment.pattern pub-\d{10,} (regex: match pub- followed by 10+ digits)

How it works:

  1. ASM scans responses for JavaScript: google_ad_client = "pub-1971486205579989";
  2. Extracts fragment: pub-1971486205579989 (matches regex pub-\d{10,})
  3. Stored field value: ca-pub-1971486205579989 (recorded)
  4. During replay:
  5. Extract fresh fragment: pub-2084567123 (from new response)
  6. Replace within full value: ca-pub-2084567123
  7. Post updated value to server

When to use fragment patterns:

  • ✅ Field value is assembled from multiple parts (some static, some dynamic)
  • ✅ Server sends only partial value in responses
  • ✅ Application logic concatenates prefix/suffix at runtime
  • ✅ ASM treats field as static because it can't find complete value

Help with Fragment Patterns

I have a field "client" with value "ca-pub-1971486205579989" but the
server only sends "pub-1971486205579989" in JavaScript. How do I
configure ASM to extract just the dynamic part?

Conditional Assignments: Selecting Based on Content

The Problem

Some field values depend on server response content, not just extracting what the server sends.

Example: Booking system with available time slots

Server sends HTML:

<li><a href="viewSlot.do?slot=1">Slot 1</a>, Status: Closed</li>
<li><a href="viewSlot.do?slot=2">Slot 2</a>, Status: Open</li>
<li><a href="viewSlot.do?slot=3">Slot 3</a>, Status: Open</li>

Requirement: Select the first Open slot, not the first slot overall.

ASM behavior: Extracts first slot=1 value (because it appears first), doesn't check status.

Result: Replay clicks on Slot 1 (Closed), application rejects the request.

The Solution: Regular Expression with Conditions

Use a regex pattern that matches only when the condition is met.

Example configuration:

Parameter Value
detector RegExAssignmentDetector (or read for short)
detector.name First Open Slot Detector
search.pattern <li><a href="viewSlot\.do\?slot=(\d+)">Slot \1</a>, Status: Open</li>
groups.count 1 (one capture group for slot ID)
group1.name.pattern slot (assign to field named "slot")
content_type.pattern text/html.* (only search HTML responses)

How it works:

  1. ASM scans HTML responses for pattern
  2. Regex matches only <li> elements with Status: Open
  3. Extracts first match: slot=2 (first Open slot, not first overall)
  4. Assigns to field: slot field gets value 2

When to use conditional extraction:

  • ✅ Field value depends on surrounding content (status, availability, flags)
  • ✅ Need to select from multiple options based on criteria
  • ✅ Server sends all options, client must pick correct one
  • ✅ Selection logic is based on text/HTML content, not JavaScript

Conditional Extraction Help

My application has a list of slots with "Open" or "Closed" status.
I need to always select the first Open slot, not just the first slot.
How do I configure a regex detector to handle this?

URL Path Variables: Dynamic Path Segments

The Problem

Most applications use query parameters for dynamic values:

✅ /order?id=12345          ← ASM handles this automatically
❌ /order/12345/details     ← ASM does NOT handle this by default

When path segments are dynamic (e.g., /order/12345/details where 12345 changes), ASM's standard field detection doesn't apply because there's no query parameter to extract.

ASM behavior: Treats URL as static, replays with hardcoded /order/12345/details.

Result: Replay fails with 404 Not Found (order ID 12345 doesn't exist for this session).

The Solution: Dynamic Path Segment Detector

Configure ASM to extract path segments from redirect responses and replace them in subsequent requests.

Example configuration:

Parameter Value
detector dpsd (Dynamic Path Segment Detector)
segment.pattern (\d{6,}) (match 6+ digits, replace entire segment)

How it works:

  1. Server redirects: Location: /widgets/14697302/index.html
  2. ASM extracts segment: 14697302 (matches pattern \d{6,})
  3. Next request to same path: Replaces 14697302 with newly extracted value
  4. Replay uses: /widgets/18304576/index.html (fresh segment)

Advanced segment patterns:

Replace entire numeric segment:

segment.pattern = (\d{6,})
Matches: /widgets/14697302/index.html → Extract 14697302

Replace only numeric part within segment:

segment.pattern = (\d{5})(?&gt;_\w)?
Matches: /order/64315_A/details → Extract 64315, keep _A suffix

When to use path segment detectors:

  • ✅ URLs contain dynamic IDs in path (not query parameters)
  • ✅ Server redirects to URLs with dynamic segments
  • ✅ Replay fails with 404 errors on paths with IDs
  • ✅ Application uses REST-style URLs (/resource/:id/action)

Limitation

Path segment detectors currently only extract from redirect responses (Location header). If dynamic segments appear without redirects, contact support for custom configuration.

URL Path Variable Help

I'm getting 404 errors on /api/order/12345 and that ID changes every
session. The ID doesn't appear as a query parameter. How do I configure
ASM to extract and replace path segments?

Embedded Fields: Parsing Fields Within Fields

The Problem

Some applications embed multiple dynamic values within a single field value.

Example: GraphQL query embedded in form field

  • Field name: query
  • Field value: {x: 1, y: 2, z: 3} (all three values are dynamic)

ASM behavior: Treats entire {x: 1, y: 2, z: 3} as single field value, extracts/assigns as unit.

Result: If server sends different values {x: 5, y: 7, z: 9} but they're assigned individually elsewhere, ASM can't correlate them.

The Solution: Embedded Field Parsers

Two types of embedded parsers:

  1. Named embedded fields: Fields with names (e.g., x: 1, y: 2)
  2. Anonymous embedded fields: List of values (e.g., {1, 2, 3})

Named Embedded Fields (Name and Value Patterns)

Example configuration:

Parameter Value
detector PatternizedNameAndValueUsageDetector (or pnavud)
detector.pattern (\w+): (\d+) (name is capture group 1, value is group 2)
parent.value.pattern \{.+\} (only parse fields with values matching this)

How it works:

  1. ASM finds field with value matching \{.+\}: query = {x: 1, y: 2}
  2. Applies detector.pattern repeatedly: Finds x: 1, y: 2
  3. Creates sub-fields: x (value 1), y (value 2)
  4. ASM correlates sub-fields separately using standard detection rules
  5. Replay assembles: Fresh values x: 5, y: 7 into {x: 5, y: 7}

Optional filters:

  • parent.name.pattern: Only parse fields with matching names
  • parent.value.pattern: Only parse fields with matching values
  • detector.pattern.name.group: Which capture group is the field name (default: 1)
  • detector.pattern.value.group: Which capture group is the field value (default: 2)

Anonymous Embedded Fields (Unnamed Values)

Example: Field value is a list {1, 2, 3} where each number is dynamic.

Example configuration:

Parameter Value
detector PatternizedAnonymousUsageDetector (or paud)
detector.pattern \d+ (match each integer)
parent.value.pattern \{.+\} (only parse fields with this format)

How it works:

  1. ASM finds field query = {1, 2, 3}
  2. Applies pattern: Matches each \d+ → Finds 1, 2, 3
  3. Creates anonymous sub-fields: query[0] = 1, query[1] = 2, query[2] = 3
  4. ASM correlates: Looks for assignments to each sub-field individually
  5. Replay assembles: Fresh values into {5, 7, 9}

When to use embedded field parsers:

  • ✅ Field values contain structured data (JSON-like, custom formats)
  • ✅ Individual components within value are dynamic
  • ✅ Server assigns components separately (not as complete string)
  • ✅ Standard extraction can't correlate embedded values

Embedded Field Help

I have a field "query" with value "{x: 1, y: 2}" where x and y are
assigned separately in the response. How do I configure ASM to parse
and correlate them individually?

Creating Custom Detection Rules

All advanced techniques above require creating custom detection rules via preferences.

How to Access Detection Rules Preferences

  1. Window → Preferences (or Load Tester → Preferences on macOS)
  2. Web Performance → Configuration Wizards → Application State → Detection Rules
  3. Click "Add Rule"
  4. Enter detector parameters (see examples above)
  5. Click "OK"

Detection Rule Categories

ASM uses four main detector types (plus two embedded field parsers):

Detector Type Abbreviation Use Case
Single Field String Delimited sdd Extract specific field with prefix/suffix boundaries
Variable Field String Delimited vdd Extract multiple fields matching same pattern
Regular Expression read Complex extraction with regex, conditional matching
Sticky Regular Expression sread Advanced regex with templates (rare, contact support)
Dynamic Path Segment dpsd URL path variables
Named Embedded Fields pnavud Parse name:value pairs from field values
Anonymous Embedded Fields paud Parse lists/arrays from field values

Most common: sdd (single field), read (regex), dpsd (path segments).

Single Field String Delimited Detector (sdd)

Use when: You know the exact field name and can identify prefix/suffix around the value.

Example: Extract sessionId from JavaScript

setField('sessionId', 'abc123');

Configuration:

Parameter Value
detector sdd
field.name sessionId
string.prefix setField('sessionId', '
string.suffix ');

Optional parameters:

  • fragment.pattern: Extract only part of value (see Multi-Part Assignments above)
  • encoding.required: TRUE/FALSE/URL/FORM (whether to URL-encode extracted value)
  • unescape.source: HTML, Javascript, None (how to decode escaped characters)

Variable Field String Delimited Detector (vdd)

Use when: Multiple fields use same extraction pattern (wildcard field names).

Example: Extract all fields assigned by setField('fieldName', 'value')

setField('TX_ID', '1234');
setField('TS_ID', '56789');

Configuration:

Parameter Value
detector vdd
string.prefix setField('{0}', ' (use {0} as placeholder for field name)
string.suffix ');
accept.fieldname .*_ID (optional: only extract fields matching regex)

How {0} works: Replaced with any field name matching the pattern. In this example, matches both TX_ID and TS_ID.

When to use vdd over sdd:

  • ✅ Many fields follow same pattern
  • ✅ Field names vary but structure is consistent
  • ✅ You want one rule to handle multiple fields

Regular Expression Detector (read)

Use when: Boundary extraction isn't precise enough, need conditional matching, or extracting multiple fields at once.

Example: Extract multiple fields from single regex

<input name="userId" value="12345" />
<input name="token" value="abc123xyz" />

Configuration:

Parameter Value
detector RegExAssignmentDetector (or read)
search.pattern <input name="(\w+)" value="([^"]+)" />
groups.count 2 (name = group 1, value = group 2)
group1.name.pattern userId|token (only match these field names)
content_type.pattern text/html.* (only search HTML responses)

How capture groups work:

  • Group 0: Entire matched pattern (implicit, not used for extraction)
  • Group 1, 2, N: Each (...) in regex becomes a capture group
  • Assign by name: Use groupN.name.pattern to match specific field names
  • Assign by value: Use groupN.value.pattern to match specific recorded values

When to use regex detectors:

  • ✅ Complex extraction logic (conditional, multi-field)
  • ✅ Need to match surrounding content (see Conditional Assignments above)
  • ✅ Boundary extraction (prefix/suffix) isn't precise enough
  • ✅ Want to extract multiple related fields with one pattern

Custom Detector Help

I need to extract a field from custom JavaScript that doesn't match
standard patterns. The code looks like:
setCustomData('fieldName', 'value123');

How do I create a detector for this?

Advanced Detector Options

Encoding and Escaping

Why it matters: Values extracted from HTML/JavaScript may be encoded or escaped. ASM needs to know whether to decode them.

encoding.required

Purpose: Should extracted value be URL-encoded before sending to server?

Values:

  • TRUE: Value must be URL-encoded (spaces become %20, etc.)
  • FALSE: Value is already encoded, don't encode again
  • URL: Encode using URL query parameter rules
  • FORM: Encode using form field rules

When to set:

  • ✅ Extracted value is plain text but needs encoding (set TRUE)
  • ✅ Extracted value is already URL-encoded (set FALSE)
  • ✅ ASM can't determine encoding from recorded values (e.g., blank value)

Example: Extracted value hello world → Set encoding.required=TRUE → Posted as hello%20world

unescape.source

Purpose: How are characters escaped in the source (HTML entity, JavaScript escape, etc.)?

Values (can combine with qualifiers):

  • HTML: Decode HTML entities (&amp;&, &lt;<)
  • Javascript: Decode JavaScript escapes (\u002B+, \'')
  • None: No decoding needed

Qualifiers:

  • Only: Detector only valid if source uses this encoding
  • Probably: Decode with this format even if encoding unclear
  • Maybe: Decode if encoding appears necessary
  • Never: Never decode with this format

Default (if omitted): Maybe HTML, Maybe Javascript, Probably None

Example configurations:

unescape.source = HTML
→ Always decode HTML entities

unescape.source = Probably HTML, Maybe Javascript
→ Prefer HTML decoding, use JavaScript if detected

unescape.source = Never HTML
→ Never decode HTML entities

When to set:

  • ✅ Extracted values contain escaped characters
  • ✅ ASM decodes incorrectly (breaking values)
  • ✅ Need to force specific decoding behavior

Content Type Filtering

Purpose: Only search specific response types (HTML, JSON, XML, etc.).

Parameter: content_type.pattern (regex matching Content-Type header)

Examples:

content_type.pattern = text/html.*
→ Only search HTML responses

content_type.pattern = application/json.*
→ Only search JSON responses

content_type.pattern = text/(html|xml).*
→ Search HTML or XML

When to use:

  • ✅ Pattern could match wrong content type (false positives)
  • ✅ Performance optimization (skip irrelevant responses)
  • ✅ Detector specific to one response format

Assignment Confidence

Purpose: How confident is this detector that the extracted value is correct?

Parameter: assignment (values: DEFINITE or PARTIAL)

Values:

  • DEFINITE: This detector's value always replaces recorded value
  • PARTIAL: This detector's value only used if no DEFINITE detector found

Default: PARTIAL (if omitted)

When to set to DEFINITE:

  • ✅ Your detector is highly specific and accurate
  • ✅ You want to override ASM's automatic detection
  • ✅ Multiple detectors might match, yours should win

When to leave as PARTIAL:

  • ✅ Your detector might produce false positives
  • ✅ ASM's automatic rules should take precedence
  • ✅ You're adding fallback detection for edge cases

Detector Options Help

I created a custom detector but the extracted value has HTML entities
like &amp; that aren't being decoded. How do I configure the detector
to decode HTML entities?

Common Advanced Scenarios

Scenario 1: JavaScript Function Calls

Problem: Application assigns fields via custom JavaScript function.

Example code:

assignValue('transactionId', '12345');

Solution: Single field detector with exact boundaries.

Configuration:

Parameter Value
detector sdd
field.name transactionId
string.prefix assignValue('transactionId', '
string.suffix ');

Result: ASM extracts 12345, assigns to transactionId field.

Scenario 2: Wildcard JavaScript Assignments

Problem: Many fields assigned by same function pattern.

Example code:

setField('userId', '789');
setField('sessionId', 'abc123');
setField('tokenId', 'xyz456');

Solution: Variable field detector with {0} placeholder.

Configuration:

Parameter Value
detector vdd
string.prefix setField('{0}', '
string.suffix ');

Result: ASM extracts all three fields with one rule.

Optional filter (only extract fields ending in "Id"):

accept.fieldname = .*Id

Scenario 3: First Available Item from List

Problem: Select first item matching criteria.

Example HTML:

<li><a href="book.do?room=101">Room 101</a>, Vacant: No</li>
<li><a href="book.do?room=102">Room 102</a>, Vacant: Yes</li>
<li><a href="book.do?room=103">Room 103</a>, Vacant: Yes</li>

Requirement: Select first Vacant: Yes room (room 102).

Solution: Regex detector with conditional match.

Configuration:

Parameter Value
detector read
search.pattern <li><a href="book\.do\?room=(\d+)">Room \1</a>, Vacant: Yes</li>
groups.count 1
group1.name.pattern room

Result: ASM extracts 102 (first Vacant room), not 101 (first overall).

Scenario 4: Multi-Part Field Assembly

Problem: Field value assembled from static prefix + dynamic suffix.

Example:

  • Posted value: ca-pub-1971486205579989
  • Server sends: pub-1971486205579989 (no prefix)
  • Static prefix: ca- (hardcoded)

Solution: Fragment pattern to extract dynamic part only.

Configuration:

Parameter Value
detector sdd
field.name client
string.prefix google_ad_client = "
string.suffix ";
fragment.pattern pub-\d{10,}

Result: ASM extracts pub-2084567123, replaces within ca-pub-2084567123.

Scenario 5: Dynamic Order ID in URL Path

Problem: Order ID appears in URL path, not query parameter.

Example redirect:

Location: /order/12345/summary

Solution: Dynamic path segment detector.

Configuration:

Parameter Value
detector dpsd
segment.pattern (\d{5,})

Result: ASM extracts 12345 from redirect, replaces in future requests to /order/XXXXX/summary.

Scenario 6: Embedded JSON in Form Field

Problem: Form field contains JSON with multiple dynamic values.

Example:

query = {"userId": "123", "sessionId": "abc"}

Solution: Named embedded field parser.

Configuration:

Parameter Value
detector pnavud
detector.pattern "(\w+)": "([^"]+)"
parent.name.pattern query

Result: ASM parses userId = 123, sessionId = abc as separate fields, correlates individually.

Scenario Help

My application uses [describe your scenario]. Which advanced detector
type should I use and how do I configure it?

Troubleshooting Advanced Configurations

Problem: Custom Detector Doesn't Extract Anything

Symptoms: Added detection rule, re-ran ASM, field still shows "Recorded" datasource.

Possible causes:

  1. Prefix/suffix don't match exactly: Check for extra spaces, quotes, escape characters
  2. Content type filter too restrictive: Detector looking in HTML but value is in JavaScript
  3. Field name mismatch: field.name doesn't match actual field name in test case
  4. Pattern never matches response content: Server doesn't send expected format

Troubleshooting steps:

  1. View response content in Headers View → Verify prefix/suffix appear exactly as configured
  2. Check Content-Type: Ensure content_type.pattern matches response type
  3. Test regex: Use online regex tester to verify search.pattern matches your content
  4. Remove filters: Temporarily remove content_type.pattern, accept.fieldname to see if detector works
  5. Check case sensitivity: ASM is case-sensitive; sessionidsessionId

Detector Not Working

I created a detector with prefix "setField('ID', '" and suffix "')"
but ASM still doesn't extract the field. Can you check what's wrong?

Problem: Extracted Value is Incorrectly Encoded

Symptoms: Field extracts correctly but fails on replay with encoding errors (e.g., %2B instead of +).

Possible causes:

  • encoding.required not set correctly (ASM guesses wrong)
  • unescape.source decoding when it shouldn't (or vice versa)

Solutions:

If value should be URL-encoded but isn't:

encoding.required = TRUE

If value is already URL-encoded and ASM re-encodes it:

encoding.required = FALSE

If value has HTML entities that need decoding:

unescape.source = HTML

If value has JavaScript escapes:

unescape.source = Javascript

Problem: Regex Detector Matches Wrong Field

Symptoms: Regex extracts value but assigns to wrong field (or multiple fields get same value).

Possible causes:

  • Capture groups not constrained: Multiple fields match same value
  • groupN.name.pattern too broad or missing

Solutions:

Constrain by field name:

group1.name.pattern = userId
→ Only assign to field named "userId"

group1.name.pattern = (userId|sessionId)
→ Only assign to fields named "userId" or "sessionId"

Constrain by recorded value:

group1.value.pattern = \d{5,}
→ Only assign if recorded value is 5+ digits

Problem: Fragment Pattern Doesn't Replace Partial Value

Symptoms: Fragment pattern extracts value but full field value doesn't update.

Possible causes:

  • Recorded value doesn't contain fragment: ASM can't find where to replace it
  • Fragment regex doesn't match recorded fragment

Verification steps:

  1. Check recorded value: Does it contain the fragment pattern?
  2. Example: Recorded ca-pub-1971486205579989 MUST match fragment pattern pub-\d{10,}
  3. Test fragment regex: Verify pattern matches the dynamic part of recorded value
  4. Check for duplicates: If fragment appears multiple times, ASM may replace wrong occurrence

Problem: Path Segment Detector Doesn't Replace URL

Symptoms: Added dpsd detector but URLs still use hardcoded path segments.

Possible causes:

  • No redirect detected: Path segment detectors only extract from Location headers
  • Segment pattern doesn't match: Regex doesn't match path component
  • Multiple segments match: ASM replaces wrong one

Solutions:

Verify redirect exists:

  • Check Headers View for Location: header
  • Path segment MUST appear in redirect target

Test segment pattern:

segment.pattern = (\d{6,})
→ Matches /widgets/14697302/index.html (extracts 14697302)

segment.pattern = (\d{5})(?&gt;_\w)?
→ Matches /order/64315_A/details (extracts 64315, keeps _A)

If no redirect, contact support. Path segment detection is currently limited to redirects.

Advanced Troubleshooting

My custom detector extracts the value but it's getting double-encoded
on replay. I set encoding.required=TRUE but it's still broken. What
encoding settings should I use?

Best Practices for Advanced Configuration

1. Let ASM + AI Handle It First

Always run ASM before creating custom detectors. ASM's 300+ rules + AI detection handle 95% of fields automatically.

Workflow:

  1. ✅ Record test case
  2. ✅ Run ASM (automatic or manual)
  3. ✅ Run replay to see if it works
  4. Only create custom detectors if replay fails

Don't waste time configuring fields ASM already handles.

2. Use Simplest Detector Type That Works

Hierarchy (simplest → most complex):

  1. Let ASM auto-detect (rules + AI)
  2. Single field detector (sdd): If you know field name and boundaries
  3. Variable field detector (vdd): If many fields follow same pattern
  4. Regex detector (read): If boundaries aren't precise or need conditions
  5. Contact support: For sticky regex, complex templates, or edge cases

Don't reach for regex if string delimiters work. Regex is more fragile, more prone to whitespace and escaping surprises, and harder to debug six months later.

3. Test Detectors with Multiple Responses

Create detectorRe-run ASMVerify extractionRun replay

Check multiple scenarios:

  • ✅ Different response values (not just one example)
  • ✅ Different sessions (login as different user)
  • ✅ Edge cases (empty values, special characters, long values)

One successful extraction doesn't mean the detector is robust.

4. Use Specific Patterns to Avoid False Positives

Bad (too broad):

string.prefix = value="
string.suffix = "
→ Matches EVERY quoted attribute in HTML

Good (specific):

string.prefix = <input name="userId" value="
string.suffix = " />
→ Matches only userId field

Regex best practices:

  • ✅ Use anchors when possible: ^...$, \b (word boundary)
  • ✅ Escape special characters: \., \?, \(, \)
  • ✅ Use non-greedy quantifiers: .*? not .*
  • ✅ Test regex with online tools before adding to ASM

5. Document Your Custom Detectors

detector.name is your documentation. Make it descriptive:

Bad:

detector.name = Detector 1

Good:

detector.name = Extract transaction ID from JavaScript setField() call

Why: You will forget what the detector does. Future you (or your teammates) will be grateful.

6. Start with PARTIAL Confidence, Upgrade to DEFINITE

Default: Leave assignment=PARTIAL (or omit entirely).

Upgrade to DEFINITE only after verifying detector is accurate:

  • ✅ Detector tested with multiple responses
  • ✅ No false positives observed
  • ✅ You want this detector to override ASM's automatic rules

PARTIAL is the safer default; it lets ASM's built-in rules take precedence.

7. Use AI to Validate Your Configuration

After creating a custom detector, ask the AI to review your field configuration.

Validate Custom Detector

I created a custom detector for field "transactionId" with these
settings:

detector=sdd
field.name=transactionId
string.prefix=assignValue('transactionId', '
string.suffix=');

Can you verify this will work correctly? Are there any issues I should
fix before running ASM?

When to Contact Support

Some advanced scenarios require engineering support:

Contact support when:

  • ✅ Path segment detectors needed for non-redirect scenarios
  • ✅ Sticky regex templates required (complex multi-pattern extraction)
  • ✅ Custom datasources needed (code-based value generation)
  • ✅ Edge cases not covered by standard detector types

Before contacting support:

  1. ✅ Run ASM with AI detection enabled
  2. ✅ Try standard detector types (sdd, vdd, read, dpsd)
  3. ✅ Ask the AI for configuration help
  4. ✅ Document what you've tried and why it doesn't work

Next Steps


Related Topics: