Fundamentals 6 min read

Performance Testing Basics and Practical Scripting Tips

This article introduces the fundamentals of performance testing, covering its definition, testing methods, timing, perspectives, test types, key metrics, and practical scripting examples to simulate high concurrency loads for reliable software evaluation.

360 Quality & Efficiency
360 Quality & Efficiency
360 Quality & Efficiency
Performance Testing Basics and Practical Scripting Tips

Background Introduction

The author, previously focused on functional testing, was tasked with performance testing for a project and, with guidance from teammates, completed it and decided to document the experience.

Basic Knowledge

Performance testing is a non‑functional attribute of software that concerns the timeliness of delivering functionality.

Testing Method

Automated testing tools simulate normal, peak, and abnormal load conditions to evaluate various performance indicators of the system.

Testing Timing

Performance testing is conducted after functional testing is finished.

Testing Perspectives

User perspective: focuses on response time and stability. For example, a user waiting three minutes for a page result would likely abandon the site, and a failed payment page would cause frustration.

Developer perspective: emphasizes memory stability. During high‑traffic events, memory overflow can force developers into emergency support, highlighting the need for pre‑release stress testing of memory usage.

Test Types

Load Test: Gradually increase pressure or sustain a certain load until a performance metric reaches a safe threshold or a resource becomes saturated.

Stress Test: Evaluate system behavior under or beyond expected load, focusing on handling peak or overload conditions.

Stability Test: Apply a steady business load for an extended period to verify system stability.

Concurrency Test: Simulate multiple users accessing the same application, module, or data record simultaneously to detect deadlocks or performance issues.

Test Metrics

Response Time: Time from a user request to the receipt of the server’s response.

Throughput (Requests): Number of client requests processed per unit time.

Concurrency: Number of requests submitted at the same moment.

Resource Utilization: CPU, memory, disk I/O, network usage.

TPS (Transactions Per Second): Number of transactions processed each second; when processing speed is high, TPS approximates throughput.

Practical Scripting Experience

To simulate concurrency, the author wrote two scripts:

mkfile.sh : Generates a set of 44 files (e.g., file0.sh) where each file contains a curl POST request to a target API.

test_article.sh : Executes the generated scripts concurrently, typically running four scripts in parallel. An auxiliary end.sh can be used as a placeholder.

Images in the original article illustrate the script files and execution flow.

Large‑Scale Concurrency Simulation

The team also used an internal pressure‑testing tool named “DaBai” and referenced two articles on JMeter distributed testing and performance optimization for further reading.

References

http://www.uml.org.cn/Test/201708283.asp?weiid=1057

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Scriptingperformance-testingload-testingsoftware-qualitystress-testing
360 Quality & Efficiency
Written by

360 Quality & Efficiency

360 Quality & Efficiency focuses on seamlessly integrating quality and efficiency in R&D, sharing 360’s internal best practices with industry peers to foster collaboration among Chinese enterprises and drive greater efficiency value.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.