Technical Questions 2 Flashcards

1
Q

What is the purpose of a Dependency Injection (DI) in testing?

A

DI allows decoupling of components, making it easier to mock dependencies in unit tests. It enables more flexible and testable code by injecting mock or real objects at runtime instead of hard-coding dependencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you perform database testing in automated tests?

A

I use SQL queries to validate data before and after the execution of test cases, ensuring data integrity. For automated tests, I prefer to mock database interactions to avoid affecting production data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly