bigcommerce-commerce/skills/bc-testing/SKILL.md
Test BigCommerce integrations — API testing, Stencil theme testing, Cypress/Playwright E2E tests, webhook testing, and sandbox stores. Use when writing tests for BigCommerce apps, themes, or integrations.
npx skillsauth add orcaqubits/agentic-commerce-claude-plugins bc-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch live docs:
site:developer.bigcommerce.com testing for testing guidancebigcommerce stencil theme testing for theme testing patternsbigcommerce api testing sandbox for sandbox store setupBigCommerce provides sandbox/trial stores for testing:
Use tools like Postman, Insomnia, or curl:
curl -X GET \
https://api.bigcommerce.com/stores/{hash}/v3/catalog/products \
-H 'X-Auth-Token: {token}' \
-H 'Accept: application/json'
Write integration tests that exercise the BigCommerce API:
// Jest/Vitest example
describe('Products API', () => {
it('should create a product', async () => {
const response = await fetch(`${API_URL}/v3/catalog/products`, {
method: 'POST',
headers: { 'X-Auth-Token': TOKEN, 'Content-Type': 'application/json' },
body: JSON.stringify([{ name: 'Test Product', type: 'physical', price: 9.99, weight: 1 }]),
});
expect(response.status).toBe(200);
const data = await response.json();
expect(data.data[0].name).toBe('Test Product');
// Cleanup: delete the test product
});
});
X-Rate-Limit-Requests-Left header in testspageInfo / meta.pagination correctlyUse GraphQL explorers to test queries:
graphql-request libraryhttps://{store_url}/graphqlAuthorization: Bearer {storefront_token} headerdescribe('GraphQL Storefront', () => {
it('should fetch products', async () => {
const query = `{ site { products(first: 5) { edges { node { name entityId } } } } }`;
const response = await fetch(`${STORE_URL}/graphql`, {
method: 'POST',
headers: { Authorization: `Bearer ${STOREFRONT_TOKEN}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ query }),
});
const { data } = await response.json();
expect(data.site.products.edges.length).toBeGreaterThan(0);
});
});
stencil start provides a local development server:
config.json variations)stencil bundle validates the theme before upload:
Use tunneling tools for local webhook development:
ngrok http 3000 — expose local port to public URLLog all webhook payloads during development for replay testing:
Test complete user flows against a running BigCommerce store:
// Playwright example
test('complete purchase flow', async ({ page }) => {
await page.goto('/products/test-product');
await page.click('button:has-text("Add to Cart")');
await page.goto('/cart');
await page.click('a:has-text("Proceed to Checkout")');
// Fill checkout fields...
await page.click('button:has-text("Place Order")');
await expect(page.locator('.order-confirmation')).toBeVisible();
});
Fetch the BigCommerce developer documentation for current testing guidance, sandbox store setup, and API testing patterns before implementing.
development
Build with Spree's headless Next.js storefront — the official `spree/storefront` repo (Next.js 16 App Router with Server Actions and Turbopack, React 19 Server Components, Tailwind CSS 4, TypeScript 5, `@spree/sdk`, Sentry), server-only auth (httpOnly JWT cookies + publishable key), MeiliSearch faceted catalog, one-page checkout with Apple/Google Pay/Klarna/Affirm/SEPA, multi-region market routing, GA4 + JSON-LD SEO, and Vercel/Docker deployment. Use when forking or customizing the storefront, or evaluating headless adoption.
tools
Build Spree extensions as Rails engines — gem scaffolding, `bin/rails g spree:extension`, mounting routes/migrations/assets, the modern `prepend` decorator pattern (`*_decorator.rb` with `self.prepended(base)`), generators (`spree:model_decorator`, `spree:controller_decorator`), the four customization surfaces in preference order (Events > Webhooks > Dependencies > Decorators), Spree::Dependencies for swapping service objects, gem release/versioning, and the deprecated Deface engine. Use when building a reusable Spree extension or adding non-trivial customization to an app.
development
Build with Spree's event bus and Webhooks 2.0 — `Spree::Events` publication, `Spree::Subscriber` DSL with `subscribes_to` and `on`, wildcard matching, lifecycle events (`{model}.created/.updated/.deleted` via `publishes_lifecycle_events`), the canonical event catalog (order.*, payment.*, shipment.*, product.*), Webhooks 2.0 endpoints, HMAC-SHA256 signing (`X-Spree-Webhook-Signature`), exponential-backoff retries, and Sidekiq job orchestration. Use when wiring event-driven business logic, building webhook consumers, or replacing ActiveSupport callback chains.
tools
Cross-cutting Spree development patterns — the customization preference hierarchy (Events > Webhooks > Dependencies > Decorators), `Spree::Dependencies` service-object swapping, the `_decorator.rb` + `prepend` + `self.prepended` idiom, idempotent subscribers and webhook receivers, multi-store scoping discipline, prefixed IDs, calculator polymorphism (shipping/promotion/tax share the base), service-object composition with `dry-monads` or simple results, why to avoid `class_eval` reopening and Deface, and Spree-on-Rails idioms (Hotwire/Turbo Stimulus, ActiveStorage, Action Cable, Sidekiq). Use when designing the architecture of a Spree extension or solving cross-cutting concerns.