1.1 Define the terms failure, fault and error in one sentence each.
"Failure: Difference between expectation and actual behaviour.
Error: Partial system state that may cause a subsequent failure.
Fault: Cause for an error."
1.2 What is a defect in contrast to faults, failures and errors?
A defect is a failure.
1.3 What is a bug in the context of faults, failures and errors?
A Bug is an error or a fault
1.4 What are typical issue scenarios in testing (name three)?
Testcase is wrong, Need more test data, Bug is blocking tests.
1.5 Name three reasons why the developer of a software is not the best tester for the same.
"programming forces developers to develop a certain
view on their code which hinders them from seeing failures.
data sets will be virtual or unchanged during development.
components might show a different behaviour on other machines."
1.6 What is a successful test?
It`s a matter of definition
1.7 Name at least four terms in a test model.
Test step, test case, test run, test data
1.8 Describe TDD in one sentence.
TDD (Test Driven Development) is a development process that creates the tests before the solution.
1.9 What is the major change in thinking when applying TDD to your project?
(You have to know the end result or state of the program before starting developing, so you have to understand the requirements first, before you develop.) In Short: Test is written before the solution
1.10 On which level can we run tests and what is the purpose of those tests?
Object Design Level (Unit Testing), System Design (Integration Testing), Requirement Analysis (System Testing), Business Case (Acceptance Testing)
1.11 Who is responsible for unit tests?
Developers
1.12 Who is responsible for integration tests?
Developers & Testers
1.13 Who is responsible for system tests?
Testers
1.14 Who is responsible for acceptance tests?
Customer
1.15 Describe unit testing in one sentence.
A unit test tests the smallest piece of code that can be logically isolated in a system.
1.16 Describe integration testing in one sentence.
different units, modules or components of a software application are tested as a combined entity.
1.17 Describe system testing in one sentence.
test of how the various components of an application interact together in the full, integrated system or application.
1.18 Describe acceptance testing in one sentence.
Acceptance testing is a quality assurance (QA) process that determines to what degree an application meets end users' approval.
1.19 Describe regression testing in one sentence.
A regression test makes sure functionality does not break after adding things.
1.20 Who should be responsible for regression testing (name role and give three argu- ments)?
Developers & Testers: Deepending on the change in the system developers or testers are responsible for the test.
7.20 What is commonly understood under the term exception handling?
In computer technology, an exception refers to a procedure for passing information about certain program states - usually an erroneous system - to other program levels for further handling.
7.21 What is the difference between a checked and an unchecked exception?
A checked exception is caught at compile time whereas a unchecked exception is at runtime.
7.22 What are the major functions java provides for exception handling?
Try-Catch & throw an exception AND finally
7.23 Name a tool for unit testing.
jUnit or TestNG
7.24 What are the main functionalities (terms) used in Junit?
"Provides annotations to identify test methods.
Provides assertions for testing expected results.
Provides test runners for running tests."
7.25 What does a typical unit testing framework include?
Unit testing frameworks are software tools to support writing and running unit tests, including a foundation on which to build tests and the functionality to execute the tests and report their results
7.26 Name a build automation tool.
Gradle, Maven
7.27 What is the purpose of build automation tools?
Helps with dependency management (connecting to repositories).
7.28 How do build automation tools help with testing?
Adds JUnit framework only for test. Adds task test with Junit. Specifies the production and test code directories
7.29 Draw the high level lifecycle of unit tests.
orange not in lifecycle
7.30 What is the output/result of unit tests?
passed or failed
7.31 Given the following unit test report, what are the next steps?
Evaluate the failed tests and bug fix the problem (if there is one)
7.32 What are the limitation of unit testing (name three)?
"Unit testing cannot detect integration or interfacing issues between two modules.
It cannot catch complex errors in the system ranging from multiple modules.
It cannot test non-functional attributes like usability, scalability, the overall performance of the system, etc."
7.33 Name one tool / framework for integration testing.
Mockito
7.34 What is the purpose of model-based testing?
During tests we replace dependencies with test doubles
7.35 Describe the term Double in one sentence in the context of testing.
A Double is a general type of either: a dummy, a fake, a stub or a mock
7.36 What is the difference between a mock and a dummy?
A Dummy is an object to pass around, used to fill in as parameter replacement, typically no functionality, while a Mock mimics the behaviour of real objects they replace.
7.37 What is the difference between a fake and a dummy?
Dummy: just a placeholder -> Fake: has higly simplified functionality.
7.38 What is the difference between a mock and a fake?
Mock: mimics the behaviour of real objects they replace. -> Fake: has higly simplified functionality.
7.39 What is the difference between a stub and a dummy?
Stub similar to fake, but can returning only predefined answers to calls -> Dummy: just a placeholder (no functionality)
7.40 Describe the mock object pattern in one sentence.
Specifies an implementation of an interface, mock object is used as a drop-in replacement for the original object
7.41 We can record and play back behavior with mock objects. What are the three major steps in the record/play metaphor?
expect: record a behaviour; replay: activate mock; verify: check if usage is as expected
7.42 Name two limitations of mocking.
validity of the double has to be tested, strong coupling of the system to test and the system model
7.43 Describe dependency injection in one sentence.
Design approach, that provides the objects that an object needs, rather than instantiating them itself
7.44 What is the purpose of dependency injection in the context of testing?
Decoupling the system to tests with the system model
7.45 Which design patterns can be used to reduce coupling?
Factory, Template, Strategy, Dependency Injection
7.46 Which java construct is required to enable dependency injection?
what gives you the abilit to implement ann functionality? Interface
7.47 Name one dependency injection framework.
Spring
7.48 We have used Spring dependency injection in this course. What would be an alternative (describe and argue)?
implement it on your own, does mean using an innterface, has to know what happtens
7.49 What is the purpose of BDD?
Business people can write tests in generic language, better collaboration between QAs, Devs and SMEs
7.50 What is the major shift required in thinking when applying BDD in your project?
Focus on behaviour and business value rather than a unit from technical perspective
7.51 Name one example for a BDD framework.
Cucumber
7.52 Contrast fault tolerance, avoidance and detection. What is the key differences?
tolerance: to what extend are we allowing faults to occur in a system; avoidance: preventing faults to occur; detection: planned failure provocation and finding & fixing faults during runtime
7.53 How would you implement redundancy (multiplicity) in the field of fault tolerance?
e.g. containerization, creating multiple instances of a microservice
7.54 How would you implement resiliency (error state behavior) in the field of fault tolerance?
Implement Circuit Breaker Pattern => deactivate component for some time or Timeout Design Pattern => set timeout for requests
Zuletzt geändertvor 2 Jahren