> For the complete documentation index, see [llms.txt](https://responsive-media.gitbook.io/advanced-free-shipping/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://responsive-media.gitbook.io/advanced-free-shipping/core-concepts/test-mode.md).

# Test Mode

## What is Test Mode?

Test Mode allows you to create and test shipping discounts on your live store without affecting real customers. When Test Mode is enabled, the shipping discount only applies when the customer enters **ABC123** as their first name at checkout.

This means you can test discounts in a real checkout environment while ensuring regular customers won't accidentally trigger the discount.

## Why Use Test Mode?

* **Verify Logic** - Ensure your conditions work exactly as intended before customers see them.
* **Test Edge Cases** - Try different cart combinations to catch unexpected behavior.
* **Safe Experimentation** - Create complex shipping discounts without risk of errors affecting real orders.
* **Training & Demos** - Show your team how shipping discounts work without activating them.

## How to Enable Test Mode

1. **Create or Edit Shipping Discount** - Open the shipping discount you want to test (or create a new one).
2. **Find Test Mode Toggle** - Scroll down to the "Test mode" section near the bottom of the form.
3. **Enable Test Mode** - Toggle the switch to **ON**. You'll see a banner explaining what Test Mode does.
4. **Save** - Click **Save** to activate the shipping discount in Test Mode.

{% hint style="info" %}
Shipping discounts in Test Mode show a "Test" badge on your dashboard so you can easily identify them.
{% endhint %}

## Testing Your Shipping Discount

Once Test Mode is enabled, here's how to test on your live store:

1. **Add Products to Cart** - Add products that should trigger your discount conditions to your cart.
2. **Proceed to Checkout** - Go to checkout and enter your shipping address.
3. **Enter Test First Name** - In the first name field, enter **ABC123** (case-insensitive).
4. **Check Shipping Rates** - Look at the shipping rates. Your shipping discount should be applied.

{% hint style="warning" %}
If the discount doesn't appear immediately, you may need to refresh the checkout. Shopify doesn't always trigger function updates when only the name changes. Try clicking into another field or refreshing the page.
{% endhint %}

5. **Verify Shipping Discount** - Confirm the shipping discount amount matches your configuration.

{% hint style="info" %}
The test code **ABC123** (case-insensitive) must be entered as the first name. Regular customers won't know to use this code, so your test discount won't accidentally apply to real orders.
{% endhint %}

## What to Test

Create a testing checklist for each shipping discount:

<details>

<summary>Condition Thresholds</summary>

Test values just below and just above your thresholds:

* If condition is "Cart total ≥ $50", test with $49.99 (should not apply) and $50.01 (should apply)
* Test exact threshold values ($50.00)

</details>

<details>

<summary>Multiple Conditions</summary>

If you have multiple conditions (AND logic):

* Test with all conditions met
* Test with only some conditions met (should not apply)
* Test with no conditions met

</details>

<details>

<summary>Multiple Scenarios</summary>

If you have multiple rule groups (OR logic):

* Test each rule group independently
* Test with multiple rule groups met (should still work)
* Test with no rule groups met

</details>

<details>

<summary>Location Conditions</summary>

For location-based shipping discounts:

* Test with addresses in included locations
* Test with addresses in excluded locations
* Test edge cases (territories, military addresses, etc.)

</details>

<details>

<summary>Product/Collection Conditions</summary>

For product-based shipping discounts:

* Test with qualifying products only
* Test with mix of qualifying and non-qualifying products
* Test with no qualifying products

</details>

<details>

<summary>Shipping Discount Amounts</summary>

Verify the shipping discount calculates correctly:

* For percentage: Check the math on various shipping costs
* For fixed amount: Verify it doesn't go negative
* For fixed price: Confirm it overrides all rates correctly

</details>

## Common Testing Scenarios

### Test Case 1: Cart Total Threshold

**Shipping Discount**: Free shipping over $50

**Tests**:

* Cart with $49.99 → Should show normal shipping
* Cart with $50.00 → Should show free shipping
* Cart with $75.00 → Should show free shipping

### Test Case 2: Location-Based

**Shipping Discount**: Free shipping for US orders over $50

**Tests**:

* US address, $60 cart → Should show free shipping
* US address, $40 cart → Should show normal shipping
* Canada address, $60 cart → Should show normal shipping

### Test Case 3: Product-Specific

**Shipping Discount**: Free shipping when cart contains "Winter Jacket"

**Tests**:

* Cart with Winter Jacket only → Should show free shipping
* Cart with Winter Jacket + other items → Should show free shipping
* Cart without Winter Jacket → Should show normal shipping

## Going Live

Once you've thoroughly tested your shipping discount:

1. **Edit the Shipping Discount** - Open the shipping discount in Test Mode.
2. **Disable Test Mode** - Toggle Test Mode to **OFF**.
3. **Review Settings** - Double-check all conditions, targets, and dates are correct.
4. **Save** - Click **Save** to activate the shipping discount for real customers.
5. **Verify Live** - (Optional) Place a real test order or use your store's preview mode to confirm it works.

{% hint style="warning" %}
Once you disable Test Mode and save, the shipping discount immediately becomes active for all customers. Make sure you're ready to go live before disabling Test Mode.
{% endhint %}

## Best Practices

{% hint style="info" %}
**Always test before going live.** Even simple discounts can have unexpected edge cases. A few minutes of testing can prevent customer confusion and lost sales.
{% endhint %}

{% hint style="info" %}
**Test with realistic data.** Use actual product prices, real shipping rates, and typical cart values from your store.
{% endhint %}

{% hint style="info" %}
**Document your tests.** Keep notes on what you tested and the results. This helps when troubleshooting later.
{% endhint %}

{% hint style="info" %}
**Test seasonal discounts early.** Don't wait until the day of your promotion to test. Test weeks in advance and leave the discount in Test Mode until you're ready.
{% endhint %}

## Troubleshooting Test Mode

<details>

<summary>Discount not appearing when I enter ABC123</summary>

\- Verify Test Mode is ON and the discount is saved - Confirm you entered \*\*ABC123\*\* (case-insensitive) in the \*\*first name\*\* field, not last name - Check that your cart meets all the discount conditions - Try refreshing the checkout page or clicking into another field to trigger an update

</details>

<details>

<summary>Discount appearing for regular customers</summary>

\- This shouldn't happen unless customers somehow know to enter ABC123 - Verify the discount has Test Mode ON and shows a "Test" badge on your dashboard - If it's appearing without ABC123, Test Mode may not be properly enabled

</details>

<details>

<summary>Checkout not updating after entering ABC123</summary>

\- Shopify sometimes doesn't trigger function updates for name-only changes - Try clicking into the last name or email field to trigger an update - Or refresh the checkout page after entering ABC123 - The discount should then appear

</details>

## Next Steps

* [**How It Works**](/advanced-free-shipping/core-concepts/how-it-works.md) - Understand discount logic
* [**Troubleshooting**](/advanced-free-shipping/troubleshooting/testing-guide.md) - Detailed testing guide
* [**Use Cases**](/advanced-free-shipping/common-use-cases/use-cases.md) - Copy proven examples
* [**Common Issues**](/advanced-free-shipping/troubleshooting/common-issues.md) - Fix problems


---

# 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://responsive-media.gitbook.io/advanced-free-shipping/core-concepts/test-mode.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.
