testing Flashcards
process where developers write automated test cases before writing the actual code for their software.
Test-driven development (TDD)
In TDD, the development process is broken down into ——–, iterative steps.
small
First, a ——- is written that describes the ——– behavior of the code to be written. Then, the developer writes the code that ——– the test. If the code passes the test, the developer moves on to the ————-, writing another test for a new behavior, and then writing code to satisfy that test.
test
desired
satisfies
next iteration
Benefits of TDD
1.Early ——- detection.
2. ——— code quality
3. ———–development time
bug
Improved
Reduced
testing of the smallest testable units of code (for Java, this will be methods). and ensures that everything is running as it should
unit testing
Generally, tests can be ———— or ————- tests and you should have both.
positive
negative
with ———— tests give an we give an expected/valid input and check to see if the expected return occurs.
positive
with ————- tests we take an invalid/unexpected input and see if your code handles it correctly.
negative
a testing framework that provides annotations and methods for creating unit tests.
JUnit
used to record application events, log debugging information for developers, and write exception events to files.
What is logging
first steps for TDD.
TDD involves writing ——— tests first,
then writing the ———- amount of code necessary to pass the test,
then ———- the code.
finally the process is ————- until all of the desired functionality is implemented.
failing
minimum
refactoring
repeated
disadvantages of TDD
Forget to run tests frequently
Write too many tests at once
Write tests that are too large
Do all projects need to be tested before going live? If not, then when should testing be skipped?
yes, all projects need to be tested before going live.
This is an important part of software development, it allows developers to preserve knowledge that that can be transferred to new developers. it also makes the code base easier to read, understand and maintain, and it’s a reference new developers can look at to understand the codebase and how the code works.
what is developer documentation
————- coverage is used to test how many lines of code is being executed by tests, and can help highlighting areas of code that are not being adequately covered.
————— coverage is used to make sure that all the aspects of the software is adequately tested and measures the percentage of requirements.
code
Test