> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/testing-and-launch/testing-guide.md).

# Testing Guide

Use this guide to validate pricing, checkout routing, and order creation across ESW and native flows.

Run these tests after configuration is complete and before launch.

### What to test

Validate these scenarios:

* ESW-supported countries with fixed pricing
* ESW-supported countries with calculated pricing
* ESW non-supported countries on native checkout
* storefront price consistency from browse to order

### Before you test

Confirm the storefront and ESW setup are ready.

* Master catalog is imported and assigned.
* Storefront catalog is assigned to the site.
* At least one price book contains product records.
* At least one inventory list is assigned and available.
* At least one orderable product exists in catalog, price book, and inventory.
* At least one locale and currency are assigned to the site.
* ESW services, jobs, and metadata are imported successfully.
* `eswRetailerPricingFeed` has run successfully at least once.
* ESW site preferences are configured correctly.
* The ESW module is enabled.
* The correct code version is active.
* Search indexes are rebuilt.
* Site cache is cleared.

Use these pages while preparing tests:

* [General and Display Preferences](/salesforce-commerce-cloud/salesforce-commerce-cloud/business-manager-configuration/merchant-tools/site-preferences/general-and-display-preferences.md)
* [Pricing Preferences](/salesforce-commerce-cloud/salesforce-commerce-cloud/business-manager-configuration/merchant-tools/site-preferences/pricing-preferences.md)
* [Checkout Preferences](/salesforce-commerce-cloud/salesforce-commerce-cloud/business-manager-configuration/merchant-tools/site-preferences/checkout-preferences.md)
* [Go-Live Readiness](/salesforce-commerce-cloud/salesforce-commerce-cloud/testing-and-launch/going-live/go-live-readiness.md)

### Basic shopper journey checks

Start with a first-time shopper session.

Expected behavior:

* The welcome mat appears on first storefront visit.
* The shopper can select country, language, and currency.
* Clicking **Continue Shopping** closes the welcome mat.
* The selected country and currency appear in the header or footer.

Confirm these cookies in browser tools:

* `esw.location`
* `esw.LanguageIsoCode`
* `esw.currency`
* `esw.InternationalUser`

Set `esw.InternationalUser` to:

* `true` for ESW-supported countries
* `false` for ESW non-supported countries

Also confirm the shopper can reopen the selector from the header or footer and update country, language, or currency.

### Test fixed pricing countries

Use this scenario for countries with fixed local price books.

#### Required setup

Confirm all of these conditions:

* `isEswAllowedCountry` is `true`
* the country is listed in the fixed-price country configuration
* the country has an override price book

#### Expected results

Use a sample product and confirm the same price appears in all locations:

* PLP
* quick view
* PDP
* mini cart
* cart
* ESW Checkout

For example, if the local price book shows `99.20 GBP`, the same value should appear throughout the journey.

#### Order validation

After the shopper enters ESW Checkout:

* the order appears in Business Manager with status `Created`
* the shopper can complete payment successfully
* the order status changes to `New` after confirmation

Then compare Business Manager data against the order confirmation payload:

* order-level attributes
* product line item attributes

### Test calculated pricing countries

Use this scenario for ESW-supported countries without fixed local price books.

#### Required setup

Confirm all of these conditions:

* `isEswAllowedCountry` is `true`
* the country is not listed in fixed-price countries
* the country does not use an override price book

#### Pricing formula

Calculated pricing starts from the retailer base price and applies ESW adjustments.

```
(((base price × (1 + uplift)) × (1 + duty)) × (1 + tax)) × fxRate = localized price
localized price + rounding = final shopper price
```

Example:

* base price: `155 USD`
* uplift: `3%`
* duty: `7%`
* tax: `20%`
* FX rate: `8.32`
* rounding rule: `{"currencyIso":"SEK","currencyExponent":2,"direction":"Up","model":"fixed99.fixed00"}`

Calculation:

```
155 × 1.03 × 1.07 × 1.2 × 8.32 = 1705.52 SEK
Final rounded price = 1799.00 SEK
```

#### Expected results

Confirm the calculated price stays consistent across:

* PLP
* quick view
* PDP
* mini cart
* cart
* ESW Checkout

Then repeat the same order validation used for fixed pricing:

* `Created` order after entering ESW Checkout
* successful payment
* `New` status after confirmation
* correct order and line item attributes

### Test ESW non-supported countries

Use this scenario for countries where ESW is not enabled.

#### Required setup

Confirm `isEswAllowedCountry` is `false`.

#### Expected results

The shopper should remain on the native storefront flow.

Confirm the shopper currency price matches the assigned native price book across:

* PLP
* quick view
* PDP
* mini cart
* cart

For example, if the native price book shows `155 USD`, the same value should appear throughout the flow.

When the shopper enters native checkout:

* the price remains unchanged
* no ESW preorder order is created in Business Manager before placement

After the shopper places the order:

* the order is created successfully
* the order appears in Business Manager with status `New`

### Final validation checklist

Complete these checks before sign-off:

* pricing is consistent across storefront and checkout
* checkout routes correctly for supported and unsupported countries
* orders reach the expected status
* ESW order attributes match the confirmation payload
* no storefront, job, or service errors appear during testing

{% hint style="info" %}
Run at least one test for each pricing model and one test for a non-supported country before launch.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/salesforce-commerce-cloud/salesforce-commerce-cloud/testing-and-launch/testing-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
