1/16
Flashcards about Testing and Debugging based on lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is debugging?
The process of finding bugs (errors) in code and fixing them, involving understanding, finding, and solving the error.
What are three main steps in debugging code?
Understanding that there is an error, finding the error, and solving the error
What is rubber duck debugging?
A debugging technique where you explain your problem to an inanimate object (like a rubber duck) to help clarify your thinking and find a solution.
What is interactive debugging?
Debugging using an interactive debugger involves executing code in debug mode with breakpoints to understand why the code isn't working, allowing step-by-step code examination.
What is the purpose of Breakpoints in interactive debugging?
Breakpoints provide information on what’s happening at a specific place in the code
What is test driven development (TDD)?
Software development practice where developers write automated tests before writing the actual code that needs to be tested.
What are the steps of Test Driven Development?
Write tests, Make tests fail, Write the code, Make tests pass, Repeat
What is Doctest?
A testing tool that is the mainstay of your testing toolkit, where tests are written in plain text and can be embedded in human-readable explanations.
What are the types of testing?
Unit testing, Integration testing, System testing, Regression Testing, User Acceptance Testing (UAT), Stress Testing
What is Unit Testing?
Testing of the smallest possible pieces of a program - it's the foundation upon which everything else is based
What is Integration Testing?
Tests that encompass interactions between related units.
What is System Testing?
System tests are an extreme form of integration tests.
What is Regression Testing?
Ensures that new code changes don't adversely affect existing functionalities. It involves re-testing of the entire application or a significant part of it after modifications.
What is User Acceptance Testing (UAT)?
Involves end-users testing the software to ensure that it meets their requirements and is ready for production release.
What is Stress Testing?
Pushes the system beyond its specified limits to identify how it behaves under extreme conditions and to ensure it doesn’t crash unexpectedly.
How to skip a test in Doctest?
Use +SKIP directive. For example: >>> 'This test would fail.' # doctest: +SKIP
When to use +ELLIPSIS directive in Doctest?
Use +ELLIPSIS to match any substring in the actual output. For example: func(56, "hello") # doctest: +ELLIPSIS