ArticleslgStudy

computer science

Concurrent testing

Concurrent testing is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Concurrent testing rather than just read about it. In short: Research and literature on concurrency testing and concurrent testing typically focuses on testing software and systems that use concurrent computing. The purpose is, as with most software testing, to understand the behaviour and performance of a software system that uses concurrent computing, particularly assessing the stability of a system or application during normal activity.

Key takeaways

  • Concurrent testing belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Concurrent testing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Concurrent testing from memory before moving on to harder problems.

Reference excerpt

Research and literature on concurrency testing and concurrent testing typically focuses on testing software and systems that use concurrent computing. The purpose is, as with most software testing, to understand the behaviour and performance of a software system that uses concurrent computing, particularly assessing the stability of a system or application during normal activity. Research and study of program concurrency started in the 1950s, with research and study of testing program concurrency appearing in the 1960s. Examples of problems that concurrency testing might expose are incorrect shared memory access and unexpected order sequence of message or thread execution. Resource contention resolution, scheduling, deadlock avoidance, priority inversion and race conditions are also highlighted.

Selected history & approaches of testing concurrency Approaches to concurrency testing may be on a limited unit test level right up to system test level. Some approaches to research and application of testing program/software concurrency have been:

Execute a test once. This was considered to be ineffective for testing concurrency in a non-deterministic system and was equivalent to the testing of a sequential non-concurrent program on a system Execution of the same test sequence multiple times. Considered likely to find some issues in non-deterministic software execution. This later became called non-deterministic testing. Deterministic testing. This is an approach to set the system into a particular state so that code can be executed in a known order. Reachability testing An attempt to test synchronisation sequence combinations for a specified input (shared variable access not being corrupted, effectively testing race conditions variables). The sequence is typically derived for non-deterministic test execution. Structural Approaches / Static Analysis Analysis of code structure and static analysis tools. An example was a heuristic approach This led to code checker development, for example jlint. Research and comparison of static analysis and code checkers for concurrency bugs See also List of tools for static code analysis Multi-user approach This is an approach to testing program concurrency by looking at multiple user access, either serving different users or tasks simultaneously. Testing software and system concurrency should not be confused with stress testing, which is usually associated with loading a system beyond its defined limits. Testing of concurrent programs can exhibit problems when a system is performing within its defined limits. Most of the approaches above do not rely on overloading a system. Some literature states that testing of concurrency is a pre-requisite to stress testing.

Lessons learned from concurrency bug characteristics study A study in 2008 analysed bug databases in a selection of open source software. It was thought to be the first real-world study of concurrency bugs. 105 bugs were classified as concurrency bugs and analysed, split as 31 being deadlock bugs and 74 non-deadlock bugs. The study had several findings, for potential follow-up and investigation:

Approximately one-third of the concurrency bugs cause crashes or hanging programs. Most non-deadlock concurrency bugs are atomicity or order violation. I.e. focusing on atomicity (protected use of shared data) or sequence will potentially find most non-deadlock type bugs. Most concurrency bugs involve 1 or 2 threads. I.e. Heavy simultaneous users/usage is not the trigger for these bugs. There is a suggestion that pairwise testing may be effective to catch these types of bugs. Over 20% (7/31) deadlock bugs occurred with a single thread. Most deadlock concurrency bugs (30/31) involved only one or two resources. An implication that pairwise testing from a resource usage perspective could be applied to reveal deadlocks.

See also Software testing Scalability testing Load testing Software performance testing Scenario analysis Simulation Stress test (hardware) System testing

References

General References What is Concurrent Testing? at the Wayback Machine (archived 19 August 2016)

Worked examples

Example 1 — a first encounter with Concurrent testing

Start with the simplest possible case. Write down what Concurrent testing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Concurrent testing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Concurrent testing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Concurrent testing

In research
Concurrent testing appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Concurrent testing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Concurrent testing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Software testing, so understanding it makes those chapters shorter.
In everyday life
Look for Concurrent testing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Concurrent testing” →

How to study Concurrent testing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Concurrent testing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Concurrent testing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Concurrent testing in simple terms?

Research and literature on concurrency testing and concurrent testing typically focuses on testing software and systems that use concurrent computing. The purpose is, as with most software testing, to understand the behaviour and performance of a software system that uses concurrent computing, part…

Why does Concurrent testing matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Concurrent testing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Concurrent testing.

Tags

  • Software testing

Keep exploring