Staging and Production testing

After a successful migration of your code, files, and data to Staging or Production, use the environment URLs to test your sites and stores. The following provides information on verifying logs, testing Fastly configurations, user acceptance testing (UAT), and more.

Log files

If you encounter errors on deployment or other issues when testing, check the log files. Log files are located under the var/log directory.

The deployment log is in /var/log/platform/<prodject-ID>/deploy.log. The value of <project-ID> depends on the project ID and whether the environment is Staging or Production. For example, with a project ID of yw1unoukjcawe, the Staging user is yw1unoukjcawe_stg and the Production user is yw1unoukjcawe.

When accessing logs in Production or Staging environments, use SSH to log in to each of the three nodes to locate the logs. Or, you can use New Relic log management to view and query aggregated log data from all nodes. See View logs.

Check the code base

Verify that your code base correctly deployed to Staging and Production environments. The environments should have identical code bases.

Verify configuration settings

Check the configuration settings through the Admin panel including the Base URL, Base Admin URL, multi-site settings, and more. If you must make any additional changes, complete edits in your local Git branch and push to the master branch in Integration, Staging, and Production.

Check Fastly caching

Configuring Fastly requires careful attention to detail: using the correct Fastly Service ID and Fastly API token credentials, uploading the Fastly VCL code, updating the DNS configuration, and applying the SSL/TLS certificates to your environments. After completing these setup tasks, you can verify Fastly caching on Staging and Production environments.

To verify the Fastly service configuration:

  1. Log in to the Admin for Staging and Production using the URL with /admin, or the updated Admin URL.

  2. Navigate to Stores > Settings > Configuration > Advanced > System. Scroll and click Full Page Cache.

  3. Ensure that the Caching application value is set to Fastly CDN .

  4. Test the Fastly credentials.

    • Click Fastly Configuration.

    • Verify that the values for the Fastly Service ID and Fastly API token credentials. See Get Fastly credentials.

    • Click Test credentials.

    note warning
    WARNING
    Make sure that you entered the correct Fastly Service ID and API token in your Staging and Production environments. Fastly credentials are created and mapped per service environment. If you enter Staging credentials in your Production environment, you cannot upload your VCL snippets, caching does not work correctly, and your caching configuration points to the wrong server and stores.

To check Fastly caching behavior:

  1. Check for headers using the dig command-line utility to get information about the site configuration.

    You can use any URL with the dig command. The following examples use Pro URLs:

    • Staging: dig https://mcstaging.<your-domain>.com
    • Production: dig https://mcprod.<your-domain>.com

    For additional dig tests, see Fastly’s Testing before changing DNS.

  2. Use cURL to verify the response header information.

    code language-bash
    curl https://mcstaging.<your-domain>.com -H "host: mcstaging.<your-domain.com>" -k -vo /dev/null -H Fastly-Debug:1
    

    See Check response headers for details about verifying the headers.

  3. After you are live, use cURL to check your live site.

    code language-bash
    curl https://<your-domain> -k -vo /dev/null -H Fastly-Debug:1
    

Complete UAT testing

Complete User Acceptance Testing (UAT) on Staging and Production. The following tests are a quick list of possible tasks and areas to test as a Merchant and Customer. Your list may be longer and include additional tests for custom modules, extensions, and third-party integrations. When testing, use desktops, laptops, and mobile devices.

If you encounter issues, save your reproduction steps, error messages, strange screen captures, and links. Use this information to investigate and fix issues in integration environment code and configurations or environment settings.

User management
  • Create and edit customer accounts, verify emails
  • Create Admin roles for merchants
  • Create merchant accounts with specific roles
  • Test merchant account access per role
Catalogs & Products
  • Create a catalog with associated products
  • Create products for your storefront, including all product types: simple, configurable, bundled
  • Add product images, swatches, videos, and other media options
  • Configure price, discounts, pricing rules
  • Configure advanced features including price ranges, featured products, availability dates
  • Modify inventory and verify correct values display and change per increase and completed purchase
Carts & Checkout
  • Search for products and select filtering options
  • Add products to the cart from search results, category pages, product pages
  • Test all product types
  • View the cart and modify contents by removing or changing amounts
  • Go through checkout to verify the order amounts against the cart and product info
  • Verify that tax correctly calculates for the cart
  • Complete a purchase with different options: add a coupon, select shipping, enter shipping and billing information, and payment information
  • Verify payment gateways and options during checkout
  • Check for on-screen notifications, orders listed in the customer account, and email notifications
  • Test guest and customer checkout
Order Management
  • Create an order for a customer
  • Search for and view orders
  • Modify an order by adding and removing products, changing amounts, modifying shipping, and billing information
  • Handle a refund
  • Cancel an order
  • Apply coupon codes and discounts
Site content
  • Check all themes and assets load correctly
  • Verify CSS displays correctly, including responsive media sizes
  • Check Terms & Conditions, refund policy, and other policy information
  • Check contact information, links, and more about your company
  • Search for products and content, check filtering of results
  • Verify the footer block and top navigation blocks
  • Test the 404 and Maintenance pages
Extensions
  • Verify all extension settings, especially for any taxation, shipping, and payment modules (example: order sent to warehouse and financial mgmt system)
  • Test all customized module and installed extension interactions
  • Check data for any interactions that should complete (payments, orders, email notifications)
  • Check configurations per environment for your extensions
  • Verify dependencies between modules and extensions work
  • Check all actions as a merchant and a customer
Third-party integrations
  • Verify that data correctly saves in Adobe Commerce and exports, pushes, or is accessible by the third-party service (example: orders display in third-party order mgmt system)
  • Verify any configurations and interactions per integration
  • Perform round-trip tests originating in Adobe Commerce and your third-party service
  • Verify that authentication completes
  • Check for any logged issues to update code integrations or error messages in control panels
Backend testing
  • Test and clear cache
  • Perform reindexes and verify results
  • Check cron jobs, check for any cron_schedule errors
  • Verify and check for any shell script issues
  • Check for any logged issues: application logs, PHP logs, MySQL logs, email logs

Load and stress testing

Before launching, it is best to perform extensive traffic and performance testing on your Staging and Production environments. Consider performance testing for your frontend and backend processes.

Before you begin testing, enter a ticket with support advising the environments you are testing, what tools you are using, and the time frame. Update the ticket with results and information to track performance. When you complete testing, add your updated results and note in the ticket testing is complete with a date and time stamp.

Review the Performance Toolkit options as part of your pre-launch readiness process.

For best results, use the following tools:

  • Application performance test—Test application performance by configuring the TTFB_TESTED_PAGES environment variable to test site response time.
  • Siege—Traffic shaping and testing software to push your store to the limit. Hit your site with a configurable number of simulated clients. Siege supports basic authentication, cookies, HTTP, HTTPS, and FTP protocols.
  • Jmeter—Excellent load testing to help gauge performance for spiked traffic, like for flash sales. Create custom tests to run against your site.
  • New Relic (provided)—Helps locate processes and areas of the site causing slow performance with tracked time spent per action like transmitting data, queries, Redis, and more.
  • WebPageTest and Pingdom—Real-time analysis of your site pages load time with different origin locations. Pingdom may require a fee. WebPageTest is a free tool.

Functional testing

You can use the Magento Functional Testing Framework (MFTF) to complete functional testing for Adobe Commerce from the Cloud Docker environment. See Application testing in the Cloud Docker for Commerce guide.

Set up the Security Scan Tool

There is a free Security Scan Tool for your sites. To add your sites and run the tool, see Security Scan Tool.

recommendation-more-help
05f2f56e-ac5d-4931-8cdb-764e60e16f26