1 presentation will begin momentarily…. 2 service stub and transparent proxy: wilma innovation we...

54
1 Presentation will begin momentarily…

Upload: christine-anderson

Post on 20-Jan-2016

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

1

Presentation will begin momentarily…

Page 2: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

2

Service Stub and Transparent Proxy: Wilma

INNOVATION WE MUST DO

AUGUST 24, 2015

Page 3: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

3

AGENDA

Test Situation1

Requirements to address the issues2

Tool: Wilma3

How it works?4

Capabilities / Features5

Future6

Page 4: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

4

THE TEST SITUATION – COMPONENT/SERVICE

Request TESTEDCOMPONENTResponse

Page 5: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

5

THE TEST SITUATION – COMPONENT/SERVICE

3rd partyComponent

TESTEDCOMPONENT

Page 6: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

6

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request 3rd partyComponentResponse

Page 7: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

7

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request 3rd partyComponentResponse

?

?

Page 8: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

8

3rd partyComponent

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request

Response? missing new feature

Page 9: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

9

3rd partyComponent

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request

Response

Page 10: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

10

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request

Response

- No answer- Malformed answer

- invalid content-length

- invalid content-type- Errors in response

- E50x, E404, etc- Delayed answer,

Timeout

Page 11: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

11

3rd partyComponent

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request

Response

3rd partyComponent

3rd partyComponent

3rd partyComponent

Page 12: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

12

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request

Response

3rd partyComponent

3rd partyComponent

3rd partyComponent

3rd partyComponent

Page 13: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

13

THE TEST SITUATION – COMPONENT/SERVICE

TESTEDCOMPONENT

Request

Response

3rd partyComponent

3rd partyComponent

3rd partyComponent

3rd partyComponent

Page 14: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

14

THE TEST SITUATION – @ MICROSERVICES

TESTEDCOMPONENT

Request

Response

3rd partyComponent

3rd partyComponent

3rd partyComponent

3rd partyComponent

Page 15: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

15

Page 16: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

16

REQUIREMENTS

• We must monitor the messages between the components/services• so we need a Transparent Proxy that captures the messages

• We must generate component/service responses • so we need a highly configurable Service Stub

• That means static and dynamic response contents• Any message types and contents: HTML, XML, SOAP, JSON, REST, etc

• We must handle HTTP, HTTPS requests, even 2-way SSL• We need intelligent selection between Proxying the request or generate Stub response• We need easy integration with CI environments, test-automation friendly configuration• The solution should be robust and very stable• Shall offer extensibility

Page 17: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

17

THE SOLUTIONTHE SOLUTION: WILMA

Page 18: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

18

HOW WILMA WORKS?

TESTEDCOMPONENT

Request

Response

3rd partyComponent

3rd partyComponent

3rd partyComponent

3rd partyComponent

Page 19: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

19

WILMA

HOW WILMA WORKS?

Page 20: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

20

HOW WILMA WORKS? – Information-flow Diagram

HTTP/HTTPSRequest

Wilma Marker Switch proxy

Route Engine

PROXY / STUB

WilmaWebApp

WilmaWebAppReq

UI Config / Status

Message Template Set

Message Logging Queue

HTTP/HTTPS Response

STUB Response

-FIS, -gzip

STUB Response Request Response Generator

Response

Response Queue

-FIS, -gzip +FIS, +gzip

HTTP/HTTPS Response

HTTP/HTTPSRequest

Page 21: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

21

HOW WILMA WORKS? – Transparent Proxy

HTTP/HTTPSRequest

Wilma Marker Switch proxy

Route Engine

PROXY / STUB

WilmaWebApp

WilmaWebAppReq

UI Config / Status

Message Template Set

Message Logging Queue

HTTP/HTTPS Response

STUB Response

-FIS, -gzip

STUB Response Request Response Generator

Response

Response Queue

-FIS, -gzip +FIS, +gzip

HTTP/HTTPS Response

HTTP/HTTPSRequest

Page 22: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

22

HOW WILMA WORKS? – Message Logging

HTTP/HTTPSRequest

Wilma Marker Switch proxy

Route Engine

PROXY / STUB

WilmaWebApp

WilmaWebAppReq

UI Config / Status

Message Template Set

Message Logging Queue

HTTP/HTTPS Response

STUB Response

-FIS, -gzip

STUB Response Request Response Generator

Response

Response Queue

-FIS, -gzip +FIS, +gzip

HTTP/HTTPS Response

HTTP/HTTPSRequest

Page 23: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

23

HOW WILMA WORKS? – Handling a Request as Proxy

HTTP/HTTPSRequest

Wilma Marker Switch proxy

Route Engine

PROXY / STUB

WilmaWebApp

WilmaWebAppReq

UI Config / Status

Message Template Set

Message Logging Queue

HTTP/HTTPS Response

STUB Response

-FIS, -gzip

STUB Response Request Response Generator

Response

Response Queue

-FIS, -gzip +FIS, +gzip

HTTP/HTTPS Response

HTTP/HTTPSRequest

Page 24: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

24

HOW WILMA WORKS? – Handling a Request as Stub

HTTP/HTTPSRequest

Wilma Marker Switch proxy

Route Engine

PROXY / STUB

WilmaWebApp

WilmaWebAppReq

UI Config / Status

Message Template Set

Message Logging Queue

HTTP/HTTPS Response

STUB Response

-FIS, -gzip

STUB Response Request Response Generator

Response

Response Queue

-FIS, -gzip +FIS, +gzip

HTTP/HTTPS Response

HTTP/HTTPSRequest

Page 25: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

25

HOW WILMA WORKS? – Configuring the Stub Service

• Configuration file: XML files• Request/Response pairs are defined as

• Condition Descriptors and Response Descriptors• Request – Condition Descriptors• Built-in Conditions (check header / body content)• Several conditions can be combined (and/or) and negated• External conditions can be used

• Response – Response Generation• Template files can be used (static answer)• Built-in Template Formatters can be used to alter the templates• Response can be generated (dynamic answer)• External Template Generators and Template Formatters can be used

• And so on (delay the response, malformed responses, Exxx responses…)

Page 26: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

26

HOW WILMA WORKS? – Configuring the Stub Service

Page 27: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

27

HOW WILMA WORKS? – Configuring the Stub Service

Page 28: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

28

WHERE WILMA CAN BE USED?

• Local development environment – analyse messages, stub services• CI environment – can stub surrounding services of the tested service• Integration test environment – analyse messages, stub services

Page 29: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

29

HOW WILMA CAN BE USED?

• As proxy (even if STUB mode is used only):

Page 30: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

30

HOW WILMA CAN BE USED?

• Single Wilma instance can serve many services in parallel

TESTEDCOMPONENT

Request

Response

3rd partyComponent

3rd partyComponent

3rd partyComponent

3rd partyComponent

Page 31: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

31

HOW WILMA CAN BE USED?

• Even can be used with microservices

Service A

Service BService D

Service EService H

Service C

Service I

Service G

Service F

Page 32: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

32

SHOW WILMA IN ACTION!

• Config1 + https://info.epam.com/en/news.html• Config2 + https://info.epam.com/register

Page 33: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

33

WHAT WILMA OFFERS IN ADDITION?

Page 34: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

34

OPERATION MODES

Wilma1

Exclusive PROXY2

Exclusive STUB3

Page 35: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

35

OPERATION MODE – Exclusive PROXY Mode

HTTP/HTTPSRequest

Wilma Marker Switch proxy

Route Engine

PROXY / STUB

WilmaWebApp

WilmaWebAppReq

UI Config / Status

Message Template Set

Message Logging Queue

HTTP/HTTPS Response

STUB Response

-FIS, -gzip

STUB Response Request Response Generator

Response

Response Queue

-FIS, -gzip +FIS, +gzip

HTTP/HTTPS Response

HTTP/HTTPSRequest

Page 36: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

36

OPERATION MODE – Exclusive STUB Mode

HTTP/HTTPSRequest

Wilma Marker Switch proxy

Route Engine

PROXY / STUB

WilmaWebApp

WilmaWebAppReq

UI Config / Status

Message Template Set

Message Logging Queue

HTTP/HTTPS Response

STUB Response

-FIS, -gzip

STUB Response Request Response Generator

Response

Response Queue

-FIS, -gzip +FIS, +gzip

HTTP/HTTPS Response

HTTP/HTTPSRequest

Page 37: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

37

WHAT WILMA OFFERS IN ADDITION?

• INTERCEPTORS• Both Request and Response can be intercepted• Any operation on the intercepted message can be performed• External Interceptor classes can be used

Page 38: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

38

Service A Service B

INTERCEPTOR EXAMPLE – A CIRCUIT BREAKER

• Need stub configuration – to provide response instead of B, in case B is in bad shape

• An interceptor evaluates the responses• If Service B gave bad response:

– turns on STUB for Service B– After a defined timout turns off STUB for Service B

Page 39: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

39

WHAT WILMA OFFERS IN ADDITION?

• RUN-TIME CONFIGURATION• Stub configuration• Upload and download templates, classes, jars, messages

Page 40: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

40

RUN-TIME CONFIGURATION OF WILMA VIA UI

Page 41: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

41

RUN-TIME CONFIGURATION OF WILMA VIA UI

Page 42: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

42

WHAT WILMA OFFERS IN ADDITION?

• BROWSE/SEARCH ON LOGGED MESSAGES• Via Wilma UI itself• Via Wilma Message Search Application

Page 43: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

43

MESSAGE BROWSING VIA WILMA UI

Page 44: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

44

MESSAGE BROWSING VIA WILMA MESSAGE SEARCH

• Wilma Message Search application• high performance search engine, • offers searching of the request-response pairs those were logged by Wilma• Correlation ID

Page 45: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

45

WHAT WILMA OFFERS IN ADDITION?

• API• Stub configuration• Upload and download templates, classes, jars, messages• Load information

Page 46: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

46

WILMA HTTP API

Page 47: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

47

WILMA-SERVICE-API LIBRARY

Page 48: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

48

WILMA-SERVICE-API LIBRARY

Page 49: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

49

WHAT WILMA OFFERS IN ADDITION?

• Built-in Safeguards• Maintains amount of messages saved onto disk – no run out of disk space

Page 50: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

50

WHAT WILMA OFFERS IN ADDITION?

• Built-in Safeguards• Self protecting machanisms against overload• Load information is available

Page 51: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

51

WHAT WILMA OFFERS IN ADDITION?

Page 52: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

52

WHAT WILMA OFFERS IN ADDITION?

•Open Sourced under license GNU GPL v3.0

•Available via GitHub, including documentation

•Feedbacks are welcome and as well as contribution

Page 53: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

53

FUTURE OF WILMA

• .NET API

•Service API lib enhancements

•Promotion within EPAM and

for Customers

•Depends on the OS community

Page 54: 1 Presentation will begin momentarily…. 2 Service Stub and Transparent Proxy: Wilma INNOVATION WE MUST DO AUGUST 24, 2015

54

Any Questions?

Wilma is @ https://github.com/epam/Wilma

AUGUST 24, 2015