1 / 31

Sponsorer

Sponsorer. Tack till. 18:00 - ”BizTalk Tips och Trix” Mikael Sand 19:00 - Paus, mingel, diskussioner 19:30 - ” Kanoniska datamodeller ” Johan Tuvstedt 20:00 – ”Lösningar för att mocka en port” Johan Hedberg. Agenda. 3:e oktober

brinly
Download Presentation

Sponsorer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sponsorer

  2. Tack till

  3. 18:00 - ”BizTalk Tips och Trix” Mikael Sand 19:00 - Paus, mingel, diskussioner 19:30 - ”Kanoniskadatamodeller” Johan Tuvstedt 20:00 – ”Lösningar för att mocka en port”Johan Hedberg Agenda

  4. 3:e oktober “Effektivsystemdokumentationiettintegrationsprojekt”Richard Hallgren “BizTalk IaaS, PaaS – HybridbaseradeIntegrationslösningar med BizTalk lokaltoch/ellerimolnet”Michael Olsson Nästa Event

  5. Johan Hedberg, Enfo Zystems http://blogical.se/blogs/johan johan@jeh.se / johan.hedberg@enfo.se @JoHed Ways to mock a send port

  6. Goals • Raise awareness of options • Present different solutions to mock a send port • Consider how they differentiate • Discuss Pros and Cons • Talk about how they accomplish the work • Look at (some) code and implementation logic

  7. Photo by moyogo @flickr

  8. Session Agenda • Introduction • What is mocking? • Why Mock a Send Port? • Solutions

  9. Photo by Dan Holtmeyer @flickr

  10. What is the problem?

  11. What is mocking? • In this context... • ”Mocking is the simulation of an system or service that mimics the behavior of the target system or service”

  12. Why do we Mock something? • PoC • Test • Isolation • Parallell development • Cost savings

  13. What should we be careful with? • Treating mock as the real thing • Plan for the development and maintenance • Don’t overdo it, KISS

  14. Solutions • Core adapters • Null adapter • Orchestration • Web Page/Service • Custom Adapters and Bindings • Frameworks and Tools

  15. FILE Adapter • Replacing the ports adapter with the FILE/MSMQ/MQ/etc. adapter • Pros: • Easy • Close copy to actual port configuration • Allows access to output • Cons: • One-Way • Limited flexibility • WCF Behaviors etc

  16. NULL Adapter • Replacing the ports adapter with the NULL adapter • Pros: • Easy-ish • Close copy to actual port configuration • Cons: • One-Way • No access to output • Limited flexibility • WCF Behaviors etc • Requires adapter development/install

  17. NULL Pipeline • Replacing the ports pipeline with a consuming pipeline • Pros: • Easy-ish • Cons: • One-Way • Greater config differences • No access to output • Limited flexibility • WCF Behaviors etc • Requires pipeline and pipeline component development/install

  18. Orchestration • Creating one orchestration per send port oprtation to simulate response • Pros: • Easy • Flexible • One-Way and Solicit-Response • Context properties • No port/adapter latency • Cons: • Requires developer resources • One orchestration per send port could result in many additional orchestrations • Limited to MsgBox measurements • Far away from the actual configuration

  19. Generic Orchestration • Creating a generic orchestration that can handle all send ports • Based on a convoy pattern and configuration (?) • Pros: • Flexible • One-Way and Solicit-Response • Context properties • No port/adapter latency • Cons: • Requires custom development • Limited to MsgBox measurements • Configuration/rule heavy • Needs to be built to your (pre-determined and generic) subscription filters • Far away from the actual configuration

  20. ASP.Net Page • Creating a HTTP page hosted in IIS called by a HTTP send port • Pros: • Easy • One-Way and Solicit-Response • Possible access to output if coded • Cons: • Limited flexibility • IIS Install/Deployment • WCF Behaviors etc

  21. WebService • Creating a WCF Service called by a WCF send port • Pros: • Flexible • One-Way and Solicit-Response • WCF Behaviors • One port independent of no of operations • As close to actual configuration (of a webservice) as you can get • Cons: • Install/Deploy • Context properties

  22. BizTalk Adapter (Adapter Framework) • Creating an adapter using the Adapter Framework toact as the mock message factory • Pros: • Flexible • Can control context properties • No latency to service calls • No additional components outside BizTalk • Cons: • Big difference from WCF configuration • Custom Adapter development

  23. WCF Channel [Binding] • Adding a custom channel to the channelstack to act as the mock message factory • Paolo Salvatori has a sample of this technique at http://blogs.msdn.com/b/paolos/archive/2011/04/05/how-to-use-a-wcf-custom-channel-to-implement-client-side-caching.aspx • Pros: • Close to actual configuration • No latency to service calls • No additional deployment outside BizTalk • Cons: • Non-trivial development of channel and behavior

  24. BizTalk Adapter (LOB SDK) [Binding] • Creating a custom LOB Adapter SDK Adapter toact as the mock message factory • There is a tutorial showing how to develop an LOB EchoAdapter that takes you step by step through this technique at http://msdn.microsoft.com/en-us/library/bb798134(v=bts.10) • Pros: • Close to actual configuration • No latency to service calls • No additional deployment outside BizTalk • Cons: • Custom Adapter/Binding Development

  25. SoapUI • SoapUI is a popular tool to test webservices that can also create mock services • Pros: • If you are confomfortable using SoapUI • A commercial tool – support • Promotes a contract first approach • Cons: • If you are not comfortable using SoapUI • A commercial tool – cost • Need to re-generate service on contract changes

  26. (BizMock) • BizMock is a framework for testing Orchestrations, Schemas, Maps and Pipelines by writing Visual Studio c# unit tests • Available at http://bizmock.codeplex.com/ • Pros: • Allows unit tests of orchestrations • Not really in focus for this discussion

  27. (Mocking BizTalk) • Is a collection of pipeline components that trigger boo scripts that can perform work like promoting context properties. • Pros: • Cool sample of very Dynamic pipeline components • Allows context property promotion • Cons: • Not really mocking in itself • boo language

  28. MockingBird • Uses a service simulator (HTTP Handler or WCF interceptor) to return a response • Available at http://mockingbird.codeplex.com/ • Pros: • Easy enough • No development effort • No cost of purchase • WSDL based Mock service simulator config generation • WSDL based Mock request and responses generation • Cons: • Easy enough? • Support?

More Related