12
Eurostar Innovation week 2 Mocking 3 rd Party Services Date 3 nd September 2015

Eurostar innovation week 2 (3) (1)

Embed Size (px)

Citation preview

Page 1: Eurostar innovation week 2 (3) (1)

Eurostar Innovation week 2Mocking 3rd Party Services

Date 3nd September 2015

Page 2: Eurostar innovation week 2 (3) (1)

About Zombies.. Continued from yesterday’s Circuit Breakers

• If Eurostar customers may behave like Zombies when EIF is down(1 hour/1 day per week).. then what about Eurostar Testers who

access Eurostar sites (24/7) …

Page 3: Eurostar innovation week 2 (3) (1)

This is what it happens….News from Eurostar Bulletin

Page 4: Eurostar innovation week 2 (3) (1)

Current System

Page 5: Eurostar innovation week 2 (3) (1)

If 3rd Party services are unstable / unavailable…

• Delays testing progress Tests fail – need to be re-tested either

Manually Automated (False positives given)

Gives inaccurate results of front end code• Can’t emulate real time scenarios

Unable to test production issues Error conditions cannot be tested (e.g Payment, GDS)

• 3rd party services response is slow (performance)

Page 6: Eurostar innovation week 2 (3) (1)

Introduction of Mock Envs

Page 7: Eurostar innovation week 2 (3) (1)

Tools Evaluated

– Wiremock– Apiary– Mockable.IO– Soap UI– Charles

Page 8: Eurostar innovation week 2 (3) (1)

Breakdown of tools

Wiremock– How it works

• Java application is created at backend• Deployed as normal web application and have json files fulfilling

requests• End points diverted to mock services

– Pros• Emulates any test condition• Handles multiple requests on single URL (POST requests)• Full control over responses

– Cons• Complex programming• Maintenance overheads

Page 9: Eurostar innovation week 2 (3) (1)

Breakdown of tools cont…

Soap UI– How it works

• Responses as per preconfigured JSON files• Uses groovy scripts to programme(light weight)

– Pros• Simple to mock environment• Handles multiple requests (GET requests)• Usable for all static responses & happy paths• No maintenance overhead

– Cons

• Running in Jenkins server• Running from command line like a real server is not easy

Page 10: Eurostar innovation week 2 (3) (1)

Breakdown of tools cont…

Apiary & Mockable.IO– How it works

• Free online tool• Blueprint syntax (Apiary only)• Responses as per preconfigured JSON files

– Pros• Simple to mock environment• Handles multiple requests (GET requests)• Usable for all static responses & happy paths• No maintenance overhead• Full documentation available (Apiary only)

– Cons• Unable to manipulate responses• Payload cannot be validated• Negative conditions not testable

Page 11: Eurostar innovation week 2 (3) (1)

Summary

Challenges of mocking services•Time effective to build •3rd party maintenance / changes communications•Maintenance of mock services in line with 3rd party service upgrades and changes

Page 12: Eurostar innovation week 2 (3) (1)

Summary

Benefits of mocking services•Independent frontend testing•Rapid test completion•Faster feedback •More combinations testable•Isolated testing

•Error scenario simulation•More controlled services•Mock services support TDD•Supports POC on all platforms•Faster = Saved effort = Saved Time = Saved £££