Bc testing

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Bc testing is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. 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.

How to use this skill

Skill file

BigCommerce Testing

Before writing code

Fetch live docs:

  1. Web-search site:developer.bigcommerce.com testing for testing guidance
  2. Web-search bigcommerce stencil theme testing for theme testing patterns
  3. Web-search bigcommerce api testing sandbox for sandbox store setup

Testing Environments

Sandbox Stores

BigCommerce provides sandbox/trial stores for testing:

Test vs Production Credentials

API Testing

Testing REST API Calls

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'

Automated API Tests

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
  });
});

Testing Rate Limits

Testing Pagination

GraphQL Testing

GraphQL Playground

Use GraphQL explorers to test queries:

Automated GraphQL Tests

describe('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 Theme Testing

Local Testing with Stencil CLI

stencil start provides a local development server:

Visual Testing

Theme Bundle Validation

stencil bundle validates the theme before upload:

Webhook Testing

Local Webhook Testing

Use tunneling tools for local webhook development:

Webhook Replay

Log all webhook payloads during development for replay testing:

E2E Testing

Playwright/Cypress

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();
});

What to Test E2E

App Testing

OAuth Flow Testing

Webhook Subscription Testing

Best Practices

Fetch the BigCommerce developer documentation for current testing guidance, sandbox store setup, and API testing patterns before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.