# Method for Black Box and White Box Tests

Testing services for scalability and performance differs from testing individual software components or application code. Service performance testing focuses on understanding how a service behaves as the workload increases, including changes in concurrent requests, message sizes, message complexity, and response handling.

The Appvance methodology combines **black-box** and **white-box** testing. Black-box testing establishes how the service performs from the perspective of its consumer, while white-box techniques can then be used to identify the internal operations responsible for performance bottlenecks.

The recommended approach is:

1. **Establish a baseline using black-box performance testing.**  
    Create a baseline performance metric, or **Scalability Index**, by measuring Transaction Per Second (TPS) at the service consumer. Test the service using different message sizes, message schema complexities, and levels of concurrent requests.
2. **Calibrate and compare the test environment.**  
    When comparing multiple servers, consumers, brokers, or other service configurations, identify the **Performance Index** for each configuration. Normalize the test parameters and environment so that differences in infrastructure or workload do not produce misleading performance results. This calibration ensures that subsequent comparisons are meaningful.
3. **Identify internal performance bottlenecks.**  
    After establishing the Performance Index, use white-box techniques such as code profiling to identify the operations that consume the most processing time when handling requests. Use this information to determine where optimization can provide the greatest performance improvement.
4. **Optimize and repeat the measurements.**  
    Apply the identified optimizations and repeat the performance tests. Compare the new Performance Index with the previous baseline to determine whether the changes improved scalability or performance.
5. **Validate the final performance.**  
    Run the Performance Index again under the calibrated test conditions and analyze the results. The final measurements provide an objective basis for evaluating the effectiveness of the optimizations and the scalability of the service.

This combination of black-box performance measurements and targeted white-box analysis provides the basis for the Appvance methodology for testing services for scalability and performance.

---

**Last updated:** August 12, 2026

If you have feedback about this topic, please contact <documentation@appvance.ai>.