0
0
Testing Fundamentalstesting~5 mins

Unit testing in Testing Fundamentals - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is unit testing?
Unit testing is the process of testing small parts of a program, called units, to make sure each part works correctly on its own.
Click to reveal answer
beginner
Why do we write unit tests?
We write unit tests to catch mistakes early, make fixing bugs easier, and help keep code working well when we change it later.
Click to reveal answer
beginner
What is a test case in unit testing?
A test case is a set of instructions that checks if a small part of the program behaves as expected with certain inputs.
Click to reveal answer
beginner
What does it mean if a unit test fails?
If a unit test fails, it means the part of the program tested did not work as expected and needs fixing.
Click to reveal answer
beginner
Name one benefit of automated unit testing.
Automated unit testing saves time by running tests quickly and often without needing a person to do it each time.
Click to reveal answer
What does a unit test check?
ANetwork connectivity
BThe entire software system
CUser interface design
DA small part of the program
When should unit tests be run?
AOften during development
BBefore writing any code
COnly when bugs appear
DOnly after the whole project is finished
What is a test case in unit testing?
AA bug report
BA set of instructions to check code behavior
CA user manual
DA software requirement
If a unit test fails, what should you do?
ADelete the test
BIgnore it
CFix the code or test
DRestart the computer
Which is a benefit of automated unit tests?
AThey can run tests quickly and repeatedly
BThey require no maintenance
CThey run slower than manual tests
DThey replace the need for developers
Explain what unit testing is and why it is important.
Think about testing one small piece of a program at a time.
You got /4 concepts.
    Describe what a test case is and what it should include.
    A test case is like a recipe for checking if code works.
    You got /4 concepts.