Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Automated Testing for BizTalk HL7 Solutions

1,435 views

Published on

This slide deck is about automated testing of BizTalk HL7 solutions and showing how you can use behaviour driven acceptance tests to automate your testing

Published in: Healthcare, Technology
  • Be the first to comment

  • Be the first to like this

Automated Testing for BizTalk HL7 Solutions

  1. 1. Automated Testing for BizTalk HL7 Accelerator Connected Systems Consulting Ltd
  2. 2. Connected Systems Consulting Ltd Who am I? Michael Stephenson – UK-Based Freelance Consultant specializing in: • BizTalk • Windows Azure • Integration – Was BizTalk MVP now a Microsoft Integration MVP for 5+ years – Pluralsight Author – One of organizers of UK Connected Systems User Group – Founder of BizTalk Maturity Assessment – www.biztalkmaturity.com – Contact Info: • Blog: www.geekswithblogs.net/michaelstephenson • Twitter: @michael_Stephen • Linked In: http://www.linkedin.com/in/michaelstephensonuk1 • Email: michael_stephensonuk@yahoo.co.uk
  3. 3. Connected Systems Consulting Ltd Before we start • Projects are often poor at automated testing • Projects often struggle to have applications to test against • Projects struggle to stub out applications – Particularly HL7 applications • HL7 projects with BizTalk are some of the most complex
  4. 4. Connected Systems Consulting Ltd Agenda • Intro • Common Scenario • Typical Solutions • What do we want? • Usage Scenarios • Demo • Summary
  5. 5. INTRO
  6. 6. Connected Systems Consulting Ltd Aim of today • Improve your productivity! • Improve the quality of the solutions you deliver! • Lower the total cost of ownership of your BizTalk solution! • Help you to automate testing of HL7 integration
  7. 7. COMMON SCENARIO
  8. 8. Example Interface BizTalk MLLP Adapter Message Box MLLP Adapter Receive Pipeline Send Pipeline HL7 Application HL7 Application Orchestration
  9. 9. Typical Testing Environment BizTalk Application 6 Application 5 Application 4 Application 3 Application 2 Application 1 Sorry this application is being used by another team Sorry this application is down for maintenance This application isn’t very reliable in the test environment This application is managed by a vendor and there is an SLA to arrange to use it
  10. 10. Connected Systems Consulting Ltd Typical Problems • Don’t have enough test environments • Each environment doesn’t have an instance of each application • Environment usage conflict between projects or teams • Test cases take a long time to run which creates usage conflict • Applications in an environment aren’t always the right versions • Applications are shared between environments • Need resources from other teams to help you Dependency on the HL7 applications is the problem Stub them out is the answer!
  11. 11. Connected Systems Consulting Ltd Value of Stubs Development Early Integration Testing System Testing User Acceptance Testing Pre- Production Testing Cost to find defect Stub here to focus on getting BizTalk working Stub here to do your developer and build tests Stub here to deal with typical environment constraints You shouldn’t need to stub here because BizTalk just works But you can if you need to
  12. 12. Connected Systems Consulting Ltd The Challenge • Removing the dependencies can really help • Stubbing out web services is easy, but how can we stub out the HL7 application?
  13. 13. TYPICAL SOLUTIONS
  14. 14. Use a different adapter BizTalk File Adapter Message Box File Adapter Receive Pipeline Send Pipeline Tester Orchestration Test Folder Test Folder Checks message to see its valid
  15. 15. Thoughts What’s good? • Orchestration tested • Not much else What’s bad? • Port not tested • Adapter not tested • Tested solution not like real solution • Low confidence
  16. 16. MLLP Utilities BizTalk MLLP Adapter Message Box MLLP Adapter Receive Pipeline Send Pipeline MLLPSend.exe MLLPReceive.exe Orchestration TesterTrigger sending message Start receiver Check file
  17. 17. Thoughts What’s good? • Tests the full BizTalk solution • Can stub out HL7 applications with BizTalk MLLP Utility tools • Other tools available to do similar – HL7 Edit What’s bad? • Doesn’t scale easily to many interfaces • Difficult to automate • If not automated takes ages to run tests • Cant easily inspect messages
  18. 18. WHAT DO WE WANT?
  19. 19. Connected Systems Consulting Ltd Vision • Test interfaces with: – Behaviour Driven Development – .net Unit Testing approaches • Be able to automate the tests • Stub out all HL7 Applications • Able to scale to work with complex solutions • Easy to use • Able to use in developer tests and integration tests
  20. 20. Connected Systems Consulting Ltd Introducing the solution • AppFx.HL7.Testing.Utilities – Open source testing library – Aimed specifically at BizTalk Healthcare solutions (can be used elsewhere thou) – Stub out HL7 Applications – Test your assumptions on how an HL7 application works – Find it on • Codeplex – https://appfxhl7testing.codeplex.com/
  21. 21. Connected Systems Consulting Ltd Features • Transport – Send messages over MLLP – Receive messages over MLLP • Application Stubbing – Stub many applications by adding configuration – Handle messages for different test scenarios • HL7 Messages – Helpers to parse messages – Patterns to make messages easier to compare • Testing – Can be used by .net Testing – Can be used by Specflow BDD testing
  22. 22. USAGE SCENARIOS
  23. 23. Validate Application Assumptions HL7 Application HL7 Test Framework BDD Test Send message Receive Acknowledgement Validate Acknowledgement Send response Validate Response We know how the HL7 application works before we connect BizTalk to it
  24. 24. Automated BizTalk Testing BizTalk MLLP Adapter Message Box MLLP Adapter Receive Pipeline Send Pipeline Orchestration BDD Test HL7 Test Framework Validate Message We can stub out the HL7 applications This allows us to test BizTalk in isolation
  25. 25. DEMO
  26. 26. Connected Systems Consulting Ltd Demo Challenge • Lets take one of the HL7 accelerator samples and write BDD style specifications and tests for it!
  27. 27. Demo Scenario Interrogative Tutorial in BizTalk HL7 accelerator samples
  28. 28. Demo Walk-thru BizTalk Message Box ADT Receive HIS Send BDD Test HL7 Test Framework Validate Message ADT Send HIS Receive Send Message Send ACK Send Message to HIS Send Response Send Response to ADT
  29. 29. Sample Domain Demo Infrastructure Domain Controller BizTalk 2009 + SQL Server 2008 Tester Machine BizTalk HL7 Sample Deployed here BDD Tests developed and ran from here BizTalk send ports point to test machine
  30. 30. DEMO
  31. 31. SUMMARY
  32. 32. Thoughts What’s good? • Tests the full solution • Quite simple to use • Can stub out many HL7 applications concurrently • Can have different message handlers for different test cases • Fits into .net testing frameworks • Validation of messages • Reusability within test implementation • Promotes the benefits of BDD/TDD • Use in different types of testing – Developer unit testing – Automated system testing • Works with multiple versions of BizTalk What’s Next? • Looking for community feedback • Does it work for your scenarios • Are there any missing features
  33. 33. More Info Source/Article Link SpecFlow http://www.specflow.org/ Testing example with CAT framework webcast http://tinyurl.com/test-insidebiztalk
  34. 34. Questions?

×