Why is automatic testing better than manual testing?
What are the types of tests that exist?
For what part is unit testing done?
Tests specific code sections; each test is for a specific unit of code(small)
Detailed Design
For what is integration testing done?
It tests whether the components work properly together; for complex integration with external services
Architectural Design
What is system testing used for?
It tests complete, real program flows
What is acceptance testing used for?
It tests whether the program fulfils the requirements; usually done with/by the customer
Requirements definition
What is the reglementation used for a coding project and what does it mean?
SPICE - Software Process Improvement and Capability dEtermination(top-down design and bottom-up testing)
What does top-down design mean?
What does bottom-up testing mean?
What are the stages of TDD?
What is TDD?
Test Driven Development; the concept of defining a method’s specifications through assertions in a test before implementing the method itself.
Why choose TDD?
Should the stages of TDD be done by the same person/team?
No, most stages should be carried out by separate teams so that the people writing the tests would have no knowledge of the implementation. This way, they can test everything from the perspective of the client and be more thorough.
What is JUnit?
A testing framework that can be used for automatic unit testing. The test files are simple classes that make use of annotations and assertions to perform the tests.
What are annotations?
They are structures added above a method to augment its behavior. (@Test, @BeforeEach, @AfterAll etc)
What are assertions?
Statements that verify certain characteristics of the code(for boolean true or false, if an object is null or not, if two values are equal or not, if two objects are the same or not etc)
When using assertSame or assertEquals what represent the first and second values?
First value is the expected one and the second is the actual one.
What are some good practices of testing?
What to test?
What happens when two methods depend on each other from the testing point of view?
This is called circular dependency and it should be prevented as much as possible. In cases where this cannot be done, the methods should be tested in a single test method.
What does refactoring mean?
Refactoring code means making changes
in the code that improve readability, structure, efficiency, flexibility and maintainability without changing the functionality.
What are some advantages of refactoring?
What are code smells?
Code smells are generally the result of bad coding practices.
what are some examples of code smells?