Skip to main content

Test Data Recipe Book

To test PointNXT effectively, QA teams need reproducible test data. This guide provides recipes for seeding test environments.


1. Fast Seeding via Database Seed​

PointNXT includes a comprehensive demo seed script located in the repository:

  • Root seed file: demo.seed.ts

To reseed your local testing environment:

  1. Ensure your database container is running.
  2. From the root directory or pnxt-api-nestjs, run the database seed command.
  3. This creates:
    • Tenant: Demo Omnichannel Retail Pvt Ltd
    • Warehouses: Mumbai CDC (Primary), Delhi RDC, Bengaluru Hub
    • Channels: Shopify Store, Amazon India MFN, Flipkart
    • Catalog: 50+ Master SKUs across Apparel, Footwear, and Cosmetics.
    • Bundles: 3 Virtual Bundles with pre-configured BOM recipes.
    • Users: Test credentials for admin@pointnxt.local, support@pointnxt.local, picker@pointnxt.local.

2. Webhook Simulator: Injecting Fake Channel Orders​

To test order ingestion without placing real paid orders on Shopify: You can trigger order ingestion directly using a mock payload:

{
"channelId": "shopify-dev-channel",
"channelOrderId": "TEST-ORD-9001",
"source": "SHOPIFY",
"customer": {
"name": "Arjun Patel",
"email": "arjun@example.com",
"phone": "+919876543210"
},
"shippingAddress": {
"address1": "Flat 301, Krishna Towers",
"city": "Bengaluru",
"state": "Karnataka",
"pincode": "560001",
"country": "India"
},
"items": [
{
"channelSku": "COTTON-TEE-BLACK-L",
"quantity": 2,
"price": 799.00
}
],
"payment": {
"method": "PREPAID",
"status": "PAID",
"gateway": "RAZORPAY",
"transactionId": "pay_test_123456"
}
}

3. Simulating Courier Tracking Webhooks​

To test order status transitions from SHIPPED to DELIVERED or NDR: Send a mock courier webhook with the AWB:

{
"carrier": "DELHIVERY",
"awb": "1423891029381",
"status": "DELIVERED",
"timestamp": "2026-10-08T18:30:00Z",
"location": "Mumbai Worli Hub",
"pod": {
"signedBy": "Rahul Sharma",
"signatureUrl": "https://cdn.example.com/pod/sig_123.jpg"
}
}
  • Expected Result: Order status changes to DELIVERED, POD image is attached to order details, and customer receives delivery confirmation.