🧪 Software Testing
5th Grade 💻 Coding
Software testing is how you make sure a program works the way it should: you run it with different inputs and compare what happens with what you expected.
A good test starts with the question “What is supposed to happen?” For example, a function that finds the average of 80 and 90 should return 85. You test normal cases, edge cases (zero, an empty list, a negative number) and weird inputs (a word instead of a number). If the result is different from what you expected, you’ve found a bug.
Software companies also write automated tests: small pieces of code that check the bigger code and run again after every change. That way, if one fix breaks something else, you find out right away. Some people do this as their job. Software testers are especially good at finding ways to “break” programs.
For example
- Mia tested her number-guessing game with 1, 100 and 50, and she also typed “hello” instead of a number. That’s how she found a bug.
- A website can run automated tests every night that check every page still loads and every button still works.
📌 Remember: Testing = expected result vs. actual result. If they don’t match, there’s a bug.
Quick quiz
What do you do in software testing?
What is an automated test?
Which input is worth testing in a number-guessing game?