Testing Patterns Flashcards

1
Q

Testing patterns

A

Service Component Test
Consumer-driven contract test
Consumer-side contract test

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

Service Component Test: context

A

You have applied the Microservice architecture pattern. The application consists of numerous services. Services often invoke other services. You must write automated tests that verify that a service behaves correctly.

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

Service Component Test: problem

A

How do you easily test a service?

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

Service Component Test: forces

A

End to end testing (i.e. tests that launch multiple services) is difficult, slow, brittle, and expensive.

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

Service Component Test: solution

A

A test suite that tests a service in isolation using test doubles for any services that it invokes.

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

Service Component Test: example

A

Spring Cloud Contract is an open source project that supports this style of testing.

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

Service Component Test: result benefits

A

Testing a service in isolation is easier, faster, more reliable and cheap

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

Service Component Test: result drawbacks

A

Tests might pass but the application will fail in production

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

Service Component Test: issues

A

How to ensure that the test doubles always correctly emulate the behavior of the invoked services?

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

Service Component Test: related

A

Service Integration Contract Test

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

Service Integration Contract Test: context

A

You have applied the Microservice architecture pattern. The application consists of numerous services. Services often invoke other services. You must write automated tests that verify that a service behaves correctly.

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

Service Integration Contract Test: problem

A

How to easily test that a service provides an API that its clients expect?

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

Service Integration Contract Test: forces

A

End to end testing (i.e. tests that launch multiple services) is difficult, slow, brittle, and expensive.

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

Service Integration Contract Test: solution

A

A test suite for a service that is written by the developers of another service that consumes it. The test suite verifies that the service meets the consuming service’s expectations.

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

Service Integration Contract Test: example

A

Spring Cloud Contract is an open source project that supports this style of testing.

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

Service Integration Contract Test: result benefits

A

Testing a service in isolation is easier, faster, more reliable and cheap

17
Q

Service Integration Contract Test: result drawbacks

A

Tests might pass but the application will fail in production

18
Q

Service Integration Contract Test: issues

A

How to ensure that the consumer provided tests match what the consumer actually requires?