Muutke küpsiste eelistusi

E-raamat: Testing Microservices with Mountebank

  • Formaat: 240 pages
  • Ilmumisaeg: 01-Dec-2018
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638356103
Teised raamatud teemal:
  • Formaat - EPUB+DRM
  • Hind: 45,77 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 240 pages
  • Ilmumisaeg: 01-Dec-2018
  • Kirjastus: Manning Publications
  • Keel: eng
  • ISBN-13: 9781638356103
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Description

Microservices are independent, single-responsibility units of code that form a system with other microservices. It's difficult to test an individual microservice since each one depends on the other services. Mountebank solves this conundrum through service virtualization - imitating other components in the system so that you can test a microservice in isolation.

 

Testing Microservices with Mountebank is your guide to the ins and outs of testing microservices with service virtualization. This book also explains using mountebank for load testing, in a continuous delivery pipeline, and more.

 

Key features

·   Hands-on examples

·   Step-by-step guide

·    Clearly written

 

Audience

Readers need programming skills and should be generally familiar with SOA or microservice systems.

 

About the technology

Mountebank is the most capable service virtualization tool around, providing a programmable stand-in for a real dependency. As the only open-source virtualization tool with support for multiple protocols and scaling for load testing mountebank isn't snake oil; it's the cure-all for all your service virtualization needs.

 

Author biography

Brandon Byars is a principal consultant at ThoughtWorks with longstanding experience in SOA and microservices. He is the author and chief maintainer of Mountebank and has helped multiple companies use it for testing a variety of systems.
Preface ix
Acknowledgments x
About This Book xii
About The Author xv
About The Cover Illustration xvi
Part 1: First Steps 1(40)
1 Testing microservices
3(19)
1.1 A microservices refresher
4(5)
The path toward microservices
5(2)
Microservices and organizational structure
7(2)
1.2 The problem with end-to-end testing
9(2)
1.3 Understanding service virtualization
11(5)
Test-by-test setup using an API
13(1)
Using a persistent data store
14(1)
Record and replay
14(2)
1.4 Introducing mountebank
16(4)
1.5 The service virtualization tool ecosystem
20(2)
2 Taking mountebank for a test drive
22(19)
2.1 Setting up the example
23(1)
2.2 HTTP and mountebank: a primer
24(3)
2.3 Virtualizing the product catalog service
27(6)
2.4 Your first test
33(8)
Part 2: Using Mountebank 41(136)
3 Testing using canned responses
43(22)
3.1 The basics of canned responses
44(8)
The default response
46(3)
Understanding how the default response works
49(1)
Changing the default response
49(1)
Cycling through responses
50(2)
3.2 HTTPS imposters
52(7)
Setting up a trusted HTTPS imposter
56(2)
Using mutual authentication
58(1)
3.3 Saving the responses in a configuration file
59(6)
Saving multiple imposters in the config file
61(4)
4 Using predicates to send different responses
65(22)
4.1 The basics of predicates
66(14)
Types of predicates
68(6)
Matching object request fields
74(1)
The deepequals predicate
75(1)
Matching multivalued fields
76(1)
The exists predicate
77(1)
Conjunction junction
78(2)
A complete list of predicate types
80(1)
4.2 Parameterizing predicates
80(1)
Making case-sensitive predicates
80(1)
4.3 Using predicates on JSON values
81(2)
Using direct JS ON predicates
81(1)
Selecting a JSON value with JSONPath
82(1)
4.4 Selecting XML values
83(4)
5 Adding record/replay behavior
87(21)
5.1 Setting up a proxy
88(3)
5.2 Generating the correct predicates
91(5)
Creating predicates with predicateGenerators
91(2)
Adding predicate parameters
93(3)
5.3 Capturing multiple responses for the same request
96(4)
5.4 Ways to replay a proxy
100(2)
5.5 Configuring the proxy
102(3)
Using mutual authentication
102(1)
Adding custom headers
103(2)
5.6 Proxy use cases
105(3)
Using a proxy as a fallback
105(1)
Converting HTTPS to HTTP
106(2)
6 Programming mountebank
108(22)
6.1 Creating your own predicate
109(5)
6.2 Creating your own dynamic response
114(13)
Adding state
116(1)
Adding async
117(9)
Deciding between response vs. predicate injection
126(1)
6.3 A word of caution: security matters
127(1)
6.4 Debugging tips
128(2)
7 Adding behaviors
130(23)
7.1 Understanding behaviors
131(1)
7.2 Decorating a response
132(7)
Using the decorate function
132(2)
Adding decoration to saved proxy responses
134(3)
Adding middleware through shellTransform
137(2)
7.3 Adding latency to a response
139(1)
7.4 Repeating a response multiple times
140(1)
7.5 Replacing content in the response
141(11)
Copying request data to the response
141(7)
Looking up data from an external data source
148(4)
7.6 A complete list of behaviors
152(1)
8 Protocols
153(24)
8.1 How protocols work in mountebank
154(1)
8.2 A TCP primer
155(2)
8.3 Stubbing text-based TCP-based RPC
157(5)
Creating a basic TCP imposter
158(1)
Creating a TCP proxy
159(2)
Matching and manipulating an XML payload
161(1)
8.4 Binary support
162(2)
Using binary mode with Base64 encoding
162(1)
Using predicates in binary mode
163(1)
8.5 Virtualizing a .NET Remoting service
164(15)
Creating a simple .NET Remoting client
165(2)
Virtualizing the .NET Remoting server
167(4)
How to tell mountebank where the message ends
171(6)
Part 3: Closing The Loop 177(40)
9 Mountebank and continuous delivery
179(22)
9.1 A continuous delivery refresher
180(6)
Testing strategy for CD with microservices
182(3)
Mapping your testing strategy to a deployment pipeline
185(1)
9.2 Creating a test pipeline
186(15)
Creating unit tests
187(4)
Creating service tests
191(3)
Balancing service virtualization with contract tests
194(4)
Exploratory testing
198(3)
10 Performance testing with mountebank
201(16)
10.1 Why service virtualization enables performance testing
202(2)
10.2 Defining your scenarios
204(2)
10.3 Capturing the test data
206(4)
Capturing the responses
207(1)
Capturing the actual latencies
208(1)
Simulating wild latency swings
209(1)
10.4 Running the performance tests
210(2)
10.5 Scaling mountebank
212(5)
Index 217
Brandon Byars is a principal consultant at ThoughtWorks with longstanding experience in SOA and microservices. He is the author and chief maintainer of Mountebank and has helped multiple companies use it for testing a variety of systems.