Variable

Variable image
A variable is a named place in software where a value can be a range, rather than a fixed value. It represents something that can vary over time or between situations, such as a user’s input, a system state, a configuration setting, or the result of a calculation. Unlike constants, variables exist specifically to model change, uncertainty, and choice within a system. In software development, variables are fundamental to how logic is expressed. They let software respond to different conditions, handle multiple scenarios, and avoid hard-coded assumptions. In testing and Quality Engineering, variables are often where the most interesting risks hide. A variable can hold an unexpected value, something that can be updated in the wrong order, or be shared when it shouldn’t be. Even something that can move out of sync. Many bugs aren't caused by complex algorithms but by simple misunderstandings about what a variable can contain, when it changes, or who controls it. Variables are powerful test design levers. By deliberately varying inputs, states, and conditions, testers can explore boundaries, uncover hidden assumptions, and observe how the system behaves under change. Thinking in terms of variables encourages techniques like equivalence partitioning and boundary value analysis, etc. Examples of test cases using variables as inputs could be applying different discount percentages. Or a set of boundary values. Seen this way, variables are not just programming constructs. They represent where behaviour can change, where assumptions can break, and where good testing can provide the most value.
Explore MoT
RBCN 2026 image
Tue, 10 Feb
Where the Robot Framework community shines brightest.
MoT Software Testing Essentials Certificate image
Boost your career in software testing with the MoT Software Testing Essentials Certificate. Learn essential skills, from basic testing techniques to advanced risk analysis, crafted by industry experts.
Into The Motaverse image
Into the MoTaverse is a podcast by Ministry of Testing, hosted by Rosie Sherry, exploring the people, insights, and systems shaping quality in modern software teams.
Subscribe to our newsletter
We'll keep you up to date on all the testing trends.