Skip to main content
Seeding a representative sample of production data into a sandbox

Test data should provide coverage across all of your test scenarios. How do you seed a sandbox with a diverse sample of production data?

Tom Smith avatar
Written by Tom Smith
Updated over a month ago

Before we deploy to production, we should test our changes in a range of scenarios. Those test scenarios aim to cover different edge cases, so we can be confident that our changes behave correctly.

Those edge cases typically arise from diversity in our data. Behaviour often varies between different record types or picklist values. When seeding our sandboxes, we need coverage across these picklists and record types so that we have test data for each scenario.

Gearset automatically samples for coverage

When you set up an OR filter on an object, Gearset will automatically include a sample of records with each value, to maximize coverage in the deployment.

Account is filtered to Industry equals Construction OR Energy OR Technology

In this example Gearset will deploy up to:

  • 100 Account records with Industry = Construction

  • 100 Account records with Industry = Energy

  • 100 Account records with Industry = Technology

Additional filters on an object are treated as "AND" filters, and apply across all samples.

Account has two filters - (Industry equals Construction OR Energy OR Technology) AND NumberOfEmployees greater than 100

In this example Gearset will deploy up to:

  • 100 Account records with Industry = Construction and NumberOfEmployees > 100

  • 100 Account records with Industry = Energy and NumberOfEmployees > 100

  • 100 Account records with Industry = Technology and NumberOfEmployees > 100

Limitations

  • If your source org doesn't contain any records for a particular value, no records with that value will be deployed to the target org.

  • If you use more than one "OR" filter on an object, Gearset may not give you coverage across all values in those filters.

    Account has two filters - (Industry equals Construction OR Energy OR Technology) AND (BillingCountry equals United States OR UK)

    In this example, Gearset may deploy 300 Accounts records with Industry = Construction and BillingCountry = United States.

Did this answer your question?