ArticleslgStudy

computer science

Test design

Test design 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 Test design rather than just read about it. In short: In software engineering, test design is the activity of deriving and specifying test cases from test conditions to test software. Definition A test condition is a statement about the test object.

Key takeaways

  • Test design 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 Test design to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Test design from memory before moving on to harder problems.

Reference excerpt

In software engineering, test design is the activity of deriving and specifying test cases from test conditions to test software.

Definition A test condition is a statement about the test object. Test conditions can be stated for any part of a component or system that could be verified: functions, transactions, features, quality attributes or structural elements. The fundamental challenge of test design is that there are infinitely many different tests that you could run, but there is not enough time to run them all. A subset of tests must be selected; small enough to run, but well-chosen enough that the tests find bug and expose other quality-related information. Test design is one of the most important prerequisites of software quality. Good test design supports:

defining and improving quality related processes and procedures (quality assurance); evaluating the quality of the product with regards to customer expectations and needs (quality control); finding defects in the product (software testing). The essential prerequisites of test design are:

Appropriate specification (test bases). Risk and complexity analysis. Historical data of your previous developments (if exists). The test bases, such as requirements or user stories, determine what should be tested (test objects and test conditions). The test bases involves some test design techniques to be used or not to be used. Risk analysis is inevitable to decide the thoroughness of testing. The more risk the usage of the function/object has, the more thorough the testing that is needed. The same can be said for complexity. Risk and complexity analysis determines the test design techniques to be applied for a given specification. Historical data of your previous developments help setting the best set of test design techniques to reach a cost optimum and high quality together. In lack of historical data some assumptions can be made, which should be refined for subsequent projects. Based on these prerequisites an optimal test design strategy can be implemented. The result of the test design is a set of test cases based on the specification. These test cases can be designed prior to the implementation starts, and should be implementation-independent. Test first way of test design is very important as efficiently supports defect prevention. Based on the application and the present test coverage further test cases can be created (but it is not test design). In practice, more test design techniques should be applied together for complex specifications. Altogether, test design does not depend on the extraordinary (near magical) skill of the person creating the test but is based on well understood principles. ISO/IEC/IEEE 29119-4:2015, Part 4 details the standard definitions of test design techniques. The site of test designers offers the LEA (Learn-Exercise-Apply) methodology to support effective learning, exercising and applying the techniques.

Automatic test design Entire test suites or test cases exposing real bugs can be automatically generated by software using model checking or symbolic execution. Model checking can ensure all the paths of a simple program are exercised, while symbolic execution can detect bugs and generate a test case that will expose the bug when the software is run using this test case. However, as good as automatic test design can be, it is not appropriate for all circumstances. If the complexity becomes too high, then human test design must come into play as it is far more flexible and it can concentrate on generating higher level test suites.

References

Worked examples

Example 1 — a first encounter with Test design

Start with the simplest possible case. Write down what Test design 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 Test design 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 Test design 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 Test design

In research
Test design 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 Test design 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
Test design 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 Test design 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 “Test design” →

How to study Test design in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Test design 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 Test design out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Test design in simple terms?

In software engineering, test design is the activity of deriving and specifying test cases from test conditions to test software. Definition A test condition is a statement about the test object.

Why does Test design 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 Test design?

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 Test design.

Tags

  • Software testing

Keep exploring