Using fresh random values inside snapshot tests
A new result on every run makes exact assertions flaky. Generate once and commit the fixture, or use a documented seeded generator in the test framework when reproducibility is required.
Generate unbiased random integers or fixed-step decimals and configurable random strings for fixtures, mock payloads, demos, and boundary testing.
Continue with a related workflow or open the next tool that usually follows this task.
A password meter can reject obvious patterns, but it cannot certify an account. This workflow limits testing to new or synthetic candidates, prepares a trusted browser environment, checks the complete value without silent trimming, interprets zxcvbn scores and guess orders as rough model output, treats NIST length checkpoints as verifier requirements, performs breach monitoring and service controls separately, and records only non-secret decisions. The outcome is either reject and regenerate, accept provisionally for one account, or escalate to the destination's security policy without ever placing the tested value in a ticket, screenshot, analytics field, or shared note.
OpenRelated toolConvert CSV and JSON locally with text-safe typing, strict structure checks, and protected spreadsheet output.
OpenRelated toolConvert bounded CSV or JSON records into escaped GFM tables with warnings and a real preview.
OpenRelated toolBeautify or minify strict JSON locally while preserving duplicate keys and number text.
OpenChoose Numbers for bounded numeric fields or Strings for labels, mock identifiers, and free-text fixtures. Keep passwords, API keys, recovery codes, and other secrets in a dedicated secret-generation workflow.
For numbers, enter inclusive decimal endpoints, select 0 to 6 decimal places, choose a count, and enable uniqueness only when the range contains enough fixed-step values.
For strings, choose built-in sets or custom grapheme characters, set the random body length and count, and decide whether to remove ambiguous characters or require unique results.
Add a prefix or suffix only when the target schema needs a recognizable label. Review the displayed alphabet size and possible-value space before assuming a set is diverse enough.
Export lines for simple paste operations, one-column CSV for table imports, or JSON for arrays. Save the generated output as a fixed fixture when a test must produce the same result on every run.
Create bounded ages, quantities, scores, or labeled record strings while preserving field shape without copying real customer values into a ticket or test file.
Generate inclusive minimum and maximum ranges at an exact decimal step, then add hand-written invalid rows so both accepted and rejected cases are covered.
Export unique labeled strings as JSON and insert them into a mock response while keeping stable UUIDs for fields that specifically require UUID syntax.
Remove ambiguous characters and add a short prefix so values can be read from screenshots or typed during a demonstration without resembling real account data.
A new result on every run makes exact assertions flaky. Generate once and commit the fixture, or use a documented seeded generator in the test framework when reproducibility is required.
This workflow optimizes test-data shape and export, not secret lifecycle, strength policy, storage, or recovery. Use the dedicated password generator and the target security system for secrets.
Alphabet size and body length determine capacity. Prefixes and suffixes are fixed text and do not create more unique random bodies.
Random valid values rarely hit every minimum, maximum, empty, malformed, or duplicate case. Add explicit boundary and invalid fixtures after generating representative values.
JSON numbers, CSV cells, database decimals, and application numeric types can have different precision and range rules. Validate the exported shape in the real destination.
The endpoints and every intermediate value are represented as scaled integers, so no value receives extra probability from rounding.
Minimum -25.0, maximum 25.0, one decimal place, 12 unique values, ascending JSONA JSON numeric array whose values are selected uniformly from 501 exact tenths and sorted only after samplingThe fixed prefix labels the purpose but does not count toward the random body or the uniqueness capacity.
Length 8, lowercase + uppercase + digits, remove ambiguous characters, prefix fixture_, 8 unique valuesValues such as fixture_g7Kp2xQa exported as a JSON string arrayUnicode segmentation treats a supported joined emoji as one selectable item instead of several visible fragments.
Custom alphabet with joined emoji graphemes, body length 3, count 4, unique linesFour strings containing three complete grapheme clusters each without splitting a joined sequenceThe workbench stops before generation rather than looping, weakening the requirement, or silently returning a duplicate.
Custom alphabet ab, body length 2, request 5 unique stringsA capacity error because aa, ab, ba, and bb are the only four possible bodiesThe engine obtains bytes from crypto.getRandomValues() and converts them with rejection sampling. Samples outside the largest accepted region are discarded, so values are not reduced with a biased randomInteger % range shortcut. This improves statistical uniformity but does not turn fixture data into an authorization or secret-storage mechanism.
Number endpoints are parsed as strict decimal text without exponent notation. The selected decimal places scale both endpoints to integers, and each inclusive integer unit has one equal chance. Values outside the exact safe scaled magnitude or endpoints with excess fractional digits are rejected instead of rounded.
Unique values use bounded sampling without replacement. The engine calculates the complete numeric range or alphabet raised to body length, rejects an impossible count, selects unique offsets, and then randomizes result order unless numeric sorting is requested.
String alphabets combine selected ASCII groups with custom Unicode grapheme clusters. Duplicate items are removed, optional ambiguous items are removed explicitly, and prefixes or suffixes remain outside the random body. A fixed label therefore changes appearance but not the possible-body count.
A request is limited to 10,000 values, six decimal places, 1,024 graphemes per random body, one million generated graphemes, 512 custom code points, 64 code points per affix, 2,048 UTF-8 bytes per text field, and 4 MiB of output. Normal generation sends no generated values to the application server; consent-aware analytics records only mode, settings categories, counts, byte totals, duration, and error codes.
Each supported fixed-step value is selected with rejection sampling from browser cryptographic random bytes, avoiding modulo bias. Small samples can still look uneven by chance and are not a statistical test of the random source.
Yes within the documented limits. The workbench scales strict decimal endpoints to integer units at 0 to 6 selected decimal places and formats the selected units back to text. It does not silently round endpoints.
No. It means no duplicates inside this one generated result. Another run can return the same values, and a database must still enforce any real uniqueness constraint.
No. Although the random bytes come from a cryptographic browser API, this workbench is designed for disposable fixtures and may be copied, downloaded, logged, or displayed. Use a dedicated password or token workflow with the required policy and secure handling.
Normal generation, uniqueness checks, formatting, copying, and download happen in the browser. Consent-aware analytics can receive aggregate mode and size metadata, but not generated values, numeric endpoints, custom characters, prefixes, or suffixes.
Maintained and tested by SimpleWebUtilsReviewed
Method: For the Random Data Workbench review, we preserved the source shown in “Build a shareable order-import fixture” and completed “Remove production values instead of mutating them” and “Export and validate the exact destination format”. The produced output was compared literally where possible, with “Anonymizing a production export in place” and “Treating random valid values as full coverage” checked against the linked failure evidence.
Expected result: The fixture contained ten schema-valid synthetic orders plus isolated boundary rows for quantity, price, uniqueness, missing UUID, length, and CSV quoting failures, with no production record reused.
Open the tested workflowUse these focused guides when you need a practical workflow before opening the tool.
A password meter can reject obvious patterns, but it cannot certify an account. This workflow limits testing to new or synthetic candidates, prepares a trusted browser environment, checks the complete value without silent trimming, interprets zxcvbn scores and guess orders as rough model output, treats NIST length checkpoints as verifier requirements, performs breach monitoring and service controls separately, and records only non-secret decisions. The outcome is either reject and regenerate, accept provisionally for one account, or escalate to the destination's security policy without ever placing the tested value in a ticket, screenshot, analytics field, or shared note.
Workflow guideRepresentative fixtures preserve the shape and constraints of production records without preserving real people, identifiers, or secrets. This workflow inventories a target schema, generates only bounded valid values, adds deliberate minimum, maximum, duplicate, empty, and malformed cases, validates the exported encoding in the real importer, and saves stable fixtures when tests must be reproducible.
Workflow guideA random generator solves only the value-selection step. A reliable password workflow begins with the real service contract, uses a trusted device and a unique long value, saves the result in a password manager before submission, verifies that the destination accepted the complete value, enables phishing-resistant authentication where possible, records recovery material separately, removes clipboard and downloaded plaintext, and retains enough evidence to recover or revoke access without reusing the secret.
Workflow guideUse this workflow to replace production identifiers with generated UUID v4 values while preserving each field's syntax and relationships. It covers schema mapping, browser-local batch generation, version and uniqueness checks, deterministic fixture storage, database constraints, and the security boundary between a record identifier and authorization.
Continue with another maintained workflow
Convert CSV and JSON locally with text-safe typing, strict structure checks, and protected spreadsheet output.
Convert bounded CSV or JSON records into escaped GFM tables with warnings and a real preview.
Beautify or minify strict JSON locally while preserving duplicate keys and number text.
Generate one 8-128 character password locally with Web Crypto, unbiased sampling, masking, and explicit character sets.
Generate 1-100 RFC 9562 UUID v4 values locally from Web Crypto with exact format options.