Skip to main content

Sandbox Clients Test Cases

This document outlines the predefined client data available in the sandbox environment for testing client-related functionality.

Overview

The sandbox environment provides three predefined clients with different characteristics to test various scenarios. These clients are accessible through both username and ID-based searches.

Predefined Clients

1. Normal Client (John Doe)

  • Username: 6671231234 or john.doe@example.com
  • Client ID: ID_6671231234
  • Full Name: John Doe
  • Available Amount: 5000
  • Can Buy: true
  • First Company Sale: false
  • Line Extension Available: 0

Use Case: Standard client with good credit line and purchase capability.

2. New Client (Jane Doe)

  • Username: 6671231235 or jane.doe@example.com
  • Client ID: ID_6671231235
  • Full Name: Jane Doe
  • Available Amount: 2000
  • Can Buy: true
  • First Company Sale: true
  • Line Extension Available: 0

Use Case: New client making their first purchase with the company.

3. Cannot Buy Client (Johnny Doe)

  • Username: 6671231236 or johnny.doe@example.com
  • Client ID: ID_6671231236
  • Full Name: Johnny Doe
  • Available Amount: 1000
  • Can Buy: false
  • First Company Sale: false
  • Line Extension Available: 0

Use Case: Client with restricted purchase capability (blocked or insufficient credit).

Error Scenarios

Client Not Found

  • Trigger: Using non-existent username or client ID
  • Error Code: SALE-COMPONENT-01
  • HTTP Status: 404

Usage Guidelines

For Testing Purchase Scenarios

  1. Normal Client: Test standard purchase flows
  2. New Client: Test first-time buyer flows and potential special handling
  3. Cannot Buy Client: Test purchase restriction enforcement during sale confirmation

Implementation Notes

  • Client data is hardcoded in the sandbox environment for consistent testing
  • Username searches are case-sensitive

This deterministic client data ensures consistent test results across different environments and test runs.