How Generated Test Data Can Help Accelerate Your Development Workflow

generated test data

When building products for Shopify merchants, it's critical to run thorough tests to ensure features are working as expected, and to understand how your app or theme responds to different conditions. Having a robust test environment is essential for validating functionality and performance, as well as ensuring a seamless user experience.

To help you achieve a realistic testing environment, Shopify has recently launchedgenerated test datafor new development stores that contain typical ecommerce primitives, and configured settings that are needed to effectively test an app, theme, or custom storefront. These development stores include demo products, test orders, a theme optimized for the diverse data set, some Shopify Plus-specific features, and more.

在本文中,我们将探讨不同类型of demo elements available in the generated test data set, discuss the benefits of using generated test data, and highlight the use cases that can significantly speed up your workflow. By using development stores with generated test data, you can create an environment that closely mimics real-world scenarios, making your testing process more efficient.

Types of generated data and potential use-cases

To give you a head start when you're testing out a feature of your app or theme, we've analyzed the most relevant aspects of Shopify for developers and created various data primitives that provide authentic examples you can use during tests.

The full list of commerce primitives and configurations is found in ourdeveloper documentation, but in this blog post we'll highlight some of the possible use cases. By leveraging these different data types, you can quickly simulate specific user interactions, and identify potential issues in your app or theme.

Products

One of the first things you'll notice when you spin up a new development store with generated data is that the store comes with a set of snowboard products. Each of these snowboards has unique product characteristics, from the Multi-managed Snowboard which is fulfilled by both a fulfillment service and a store location, to the Minimal Snowboard, which only contains required fields, to the Complete Snowboard which is fully stacked with variants, tags, vendor, type, sales data, markets, and more.

截图显示生成的完整Snowboard with all variants.
The generated Complete Snowboard is fully stacked with variants.

The benefit of having access to a range of products with different attributes is that you'll be able to see how your app or theme responds to products that are in various states. This set of products will help you identify where potential issues might be encountered with unexpected product-related scenarios.

For example, your app may use theme app extensions to expand the product detail page, so you'll want to ensure it's displaying as expected for products in different states. You may find for specific states, such as if a product is sold out and unavailable, your app should react differently. By testing how the app makes changes or reacts to different types of demo products, you can identify when potential bugs and issues could arise.

For developers who are working with integrations related to gifting, we also have sample gift card products that you can test, and you'll also findmetafielddefinitions on some of the snowboards if you need to work with custom content.

Other use cases that could be applicable for testing with these demo products include:

  • Inventory management testing
  • Product content display and rendering 3D/AR models
  • Search and filtering functionality
  • Integration with ERPs and fulfillment management systems
  • Cross-selling and upselling
  • Bundling and product kits
  • Management of reviews and ratings
  • Handling digital products and distribution
  • Wholesale and B2B functionality

If you're building on Shopify and interacting with a store's inventory , you can leverage our sample products to ensure your app or theme is catering to a wide range of potential use cases.

Orders

An essential component for testing, particularly for app developers, is order management and processing. Similar to the demo products, our pre-populated development stores include a set of ten sample orders with various characteristics such as different fulfillment and payment statuses, tags, locations, customer notes, and delivery methods.

Screenshot showing the generated list of orders with different properties.
The generated test data set includes a range of orders with different properties.

Orders are central to Shopify and the general merchant experience, connecting to many different parts of the admin and beyond. These different orders allow you to test how your app might handle scenarios related to order processing and fulfillment, inventory management, and syncing data between Shopify and other platforms.

For example, you might be building an app that connects Shopify stores with a third-party fulfillment platform, to streamline the shipping and fulfillment process. In this case, the app would need to sync order data, shipping details, and inventory updates between Shopify and the third-party platform. Using demo orders, you could test the flow of data between Shopify and the third-party fulfillment platform to ensure the integration is working correctly by updating inventory levels, sending tracking information, and handling order modifications.

Other use cases that you could use these test orders with include:

  • Order processing and management
  • Inventory management and backorder handling
  • Multi-channel order support
  • Order analytics and reporting
  • Returns and refunds management
  • Tax and currency handling
  • Discounts, coupons, and gift cards
  • Custom order workflows

Discounts

如果你的应用扩展Shopify的核心为discount campaigns, scheduled sales, and promotions, the set of five discounts that are included in generated data development stores will be valuable for testing different discount scenarios. By testing your app with a range of different discounts with various properties, you can ensure there are no checkout issues and that your app handles discounts as expected.

Screenshot showing different generated discount types.
Test out functionality with the range of discounts available in the generated test data.

The discount codes we've created as part of the generated data have configurations that capture automatic, buy X get Y, basic coupon code, and free shipping discounts, as well as being connected to specific product variants too. Developers can leverage these pre-configured discounts to test your app's ability to handle diverse promotional scenarios and ensure that the app correctly applies and manages these incentives.

An example of how these demo discounts could be used might be if you're creating an app that enforces restrictions on discounts during a flash sale. In this scenario, your app may be creating and updating exclusions on an existing demo discount code. You could test the app's functionality by checking that changes made via the app are populating across to the correct discount and that the discount is being applied as expected on the checkout.

Other use cases that you could use these test discounts with include:

  • Handling activating and expiring discount codes
  • Scheduling promotions
  • Managing customer notifications with discount information
  • Syncing discount data with third-party software
  • Generating advanced analytics related to discount sales data
  • Analyzing promotional performance
  • Management of loyalty program discounts
  • Creation of dynamic discounts that respond to custom conditions

Customers

To test app functionality that is related to customer accounts, the set of generated data on pre-populated development stores includes some customer accounts you can access from the store admin. These demo customer accounts have a range of different attributes, like existing order history, contact information, company, and notes, so you can use them for testing the different states and scenarios that are possible with customer accounts on Shopify.

Screenshot showing three different customer accounts with different attributes.
The generated test data developer stores include three customer accounts with different attributes.

These pre-configured customer accounts can be used to test your app's ability to handle customer management features and ensure that your app can handle various customer-related scenarios.

For example, your app may help merchants with their marketing strategies, so you would want to test your app's ability to create targeted customer segments and apply specific marketing strategies to different customer groups. By using these demo customer accounts, you could ensure that your app is effectively creating and managing these segments, based on criteria that maps to available customer attributes.

Other use cases that demo customer accounts would be valuable for include:

  • Handling personalized product recommendations
  • Managing customer communication and conditional notifications
  • Automating customer support interactions
  • Tracking customer order data and creating reports
  • Integrating with ERPs and third-party management tools
  • Creating a referral program for customers

Themes

The new theme architecture that was introduced withOnline Store 2.0, and specifically JSON templates, has allowed app developers to easily add dynamic elements to merchant's stores viatheme app extensions. However, not all Shopify merchants use themes that have been updated to use JSON templates, which means many app developers build out logic to support "vintage" themes that are not compatible with theme app extensions.

To help developers test their apps with both new and vintage themes, development stores created with generated data ship with a modified version of Dawnand首次亮相,这不是兼容应用广泛的主题nsions. These themes can be used to verify that your app supports both newer and vintage themes that could be installed on merchants’ stores. You can learn more about how apps can support different themes typesin our developer documentation.

Screenshot of the test data theme.
The test data theme has been optimized for testing purposes.

The "Test data" theme is the default theme for development stores using generated test data, and contains some modifications to enhance its value to developers. Support for selling plans has been implemented on the product page, which allows you to see how selling plans appear in the storefront. Additionally, we've pre-configured theme settings to provide an authentic-looking storefront without having to customize settings yourself.

Some use cases that testing your app with these demo themes allow include:

  • Analyzing how your app integrates with different design elements
  • Ensuring an app's features don't conflict with a theme's design or functionality
  • Maintaining a consistent user experience across desktop and mobile device
  • Handling potential conflicts or issues that arise due to a theme's code
  • Detecting and adapting to the store's language and currency settings
  • Optimizing the impact of an app on storefront performance
  • Ensuring the app's interface is usable with screen readers and other assistive technologies
  • Confirming the theme's functionality and appearance remain unaffected after the app is uninstalled

Other primitives and configurations

This blog post is not an exhaustive list of all the commerce primitives and configurations that are available with generated test data. You can readour developer documentationto view the full set of data.

Some other possible use cases that developers could leverage generated test data for include:

  • Ensuring payment processes are working correctly by simulating transactions with the automatically-configured bogus gateway
  • Confirming that an app is able to access metafields correctly with demo metafield definitions
  • Verifying that B2B-related functionality is working as expected for merchants on Shopify Plus with demo companies
  • Assessing how your app is transferring data to a custom fulfillment platform with demo fulfillment services
  • Testing that your POS app is receiving retail store information by demo locations
  • Ensuring your app is able to manage and organize international markets information with our set of demo markets data

Faster testing, faster development

By using these development stores as your test environment, you can quickly see how your app or theme interacts with specific store data, or reacts to particular scenarios. Using generated data will reduce the time required to set up primitives yourself, and allow you to focus on building the best products for Shopify merchants.

What kinds of Shopify store settings and primitives would you like to see included in the generated data set?Let us know in the comments below!

Grow your business with the Shopify Partner Program

Learn more