SlideShare uma empresa Scribd logo
1 de 21
Automated Testing with Logic Apps and
Specflow
Michael Stephenson
https://www.linkedin.com/in/michaelstephensonuk1
Michael Stephenson
MVP
Testing Logic Apps
Michael Stephenson
• Coaching & Consultancy
• Azure Trainer
• Integration Architect
• Loads of real world Azure projects
• #IntegrationMonday
• Blog - http://microsoftintegration.guru/blog/
• Twitter - @michael_stephen
3
Agenda
• Agenda
• Why is this a challenge?
• What does good look like?
• Why Specflow?
• Option 1 – Cloud Only
• Option 2 – VS Black Box
Testing
• Option 3 – VS Whitebox Testing
• Other Challenges
• Outcomes
• Awareness of different ways to
test Logic Apps
• Practical examples
Meet the Dev Team
5
Dave – The lazy developer
Everyone hates supporting Dave’s code
Bob – Wants to deliver quality
solutions but isn’t really sure how to do it
Bob also likes funky hats and has fashion issues
Steve – Has loads of automated testing
experience, always looking to improve quality.
Steve works out but rarely does Leg Day
What does good look like?
• Developer runs tests on their own machine before checking in
changes
• On check in an automated build creates a clean environment
and build/deploy/run tests in a sandbox
• After build we have a reliable version of code which is well
tested and we have confidence in
• The version can be deployed to other environments easily
• The tests are self describing and tests the software does what
its expected to do
• The tests are ran each time a change is committed
7
What does Good Look Like?
Why is it a challenge?
• Stubbing
• BizTalk had separation between Transport and Logic
• Logic Apps does not
• Makes it hard to test logic without dependencies on transport
• Fear/Lack of experience of Cloud
• Many of the integration scenarios are new
• Learning curve is steep
• Automated testing is one more complexity
• Logic App Maturity
• Changing product
• Hard to settle on approaches for ALM while lots of change
9
Challenges
Sample Logic App
10
If Label = YES
Option 1 – Cloud Only
Example 1
12
If Label = YES
Run Trigger
I cant see the
File in the container
Example 2
13
1) Make HTTP request
2) Did I get a good response
3) Does the data match
in Salesforce
Postman
Good Bad
Its ok for trying stuff out and easy to test This is what bad BizTalk testing has looked like
for years
Its not reliable/repeatable
There is no knowledge transfer to others about
how solution works
Wont work with automated build
Not great in team scenarios
14
Thoughts
Option 2 – Black Box Testing
Example 3
16
If Label = YES
1) Clean Queue
Automated Test
3) Pop message on queue 2) Clean Storage4) Did file appear
Good Bad
Provides some knowledge of how its supposed to
work
Did the logic app execute the way we expected it
to?
How do we know if it took the wrong branch?
Repeatable test Tests are often brittle as lots of waiting for
something to happen
Risk is reduced Some scenarios might be difficult depending upon
the dependancies
You can probably automate most scenarios
17
Thoughts
Option 3 – Whitebox Testing
Example 4
19
If Label = YES
1) Clean Queue
Automated Test
3) Pop message on queue 2) Clean Storage
4) Make assertions about the workflow
events
- Eg did action execute
Workflow Execution Events
Diagnostics – Event Hub
5) Is file in folder
6) Does file content match expected
Good Bad
Provides extensive detail on how solution works Diagnostics events sometimes slowish so tests
aren’t that quick
Repeatable test Diagnostics events sometimes include old events,
my helper class gets rid of those
Risk is reduced significantly
Test what happens inside the logic app
Tests reliable
Test the actions and triggers you expect have
been executed
20
Thoughts
Questions

Mais conteúdo relacionado

Mais procurados

Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪
Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪
Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪
崇之 清水
 

Mais procurados (20)

Event driven architecture with Kafka
Event driven architecture with KafkaEvent driven architecture with Kafka
Event driven architecture with Kafka
 
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
20200422 AWS Black Belt Online Seminar Amazon Elastic Container Service (Amaz...
 
SRV403_Serverless Authentication and Authorization
SRV403_Serverless Authentication and AuthorizationSRV403_Serverless Authentication and Authorization
SRV403_Serverless Authentication and Authorization
 
Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪
Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪
Amazon ElastiCache(初心者向け 超速マスター編)JAWSUG大阪
 
Microservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring CloudMicroservice With Spring Boot and Spring Cloud
Microservice With Spring Boot and Spring Cloud
 
20190731 Black Belt Online Seminar Amazon ECS Deep Dive
20190731 Black Belt Online Seminar Amazon ECS Deep Dive20190731 Black Belt Online Seminar Amazon ECS Deep Dive
20190731 Black Belt Online Seminar Amazon ECS Deep Dive
 
[AWS初心者向けWebinar] 利用者が実施するAWS上でのセキュリティ対策
[AWS初心者向けWebinar] 利用者が実施するAWS上でのセキュリティ対策[AWS初心者向けWebinar] 利用者が実施するAWS上でのセキュリティ対策
[AWS初心者向けWebinar] 利用者が実施するAWS上でのセキュリティ対策
 
Lambda layerをDeployする方法を調べる
Lambda layerをDeployする方法を調べるLambda layerをDeployする方法を調べる
Lambda layerをDeployする方法を調べる
 
Azure Active Directory 利用開始への第一歩
Azure Active Directory 利用開始への第一歩Azure Active Directory 利用開始への第一歩
Azure Active Directory 利用開始への第一歩
 
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
Announcing Amazon Aurora with PostgreSQL Compatibility - January 2017 AWS Onl...
 
Architecture: Microservices
Architecture: MicroservicesArchitecture: Microservices
Architecture: Microservices
 
Azure Key Vault
Azure Key VaultAzure Key Vault
Azure Key Vault
 
OWASP Secure Coding
OWASP Secure CodingOWASP Secure Coding
OWASP Secure Coding
 
Getting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeGetting Started with Infrastructure as Code
Getting Started with Infrastructure as Code
 
20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation 20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation
 
AWS Black Belt Techシリーズ Amazon EMR
AWS Black Belt Techシリーズ  Amazon EMRAWS Black Belt Techシリーズ  Amazon EMR
AWS Black Belt Techシリーズ Amazon EMR
 
AWS IAM -- Notes of 20130403 Doc Version
AWS IAM -- Notes of 20130403 Doc VersionAWS IAM -- Notes of 20130403 Doc Version
AWS IAM -- Notes of 20130403 Doc Version
 
AWS Certified Solutions Architect Professional Course S15-S18
AWS Certified Solutions Architect Professional Course S15-S18AWS Certified Solutions Architect Professional Course S15-S18
AWS Certified Solutions Architect Professional Course S15-S18
 
20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step Functions20190522 AWS Black Belt Online Seminar AWS Step Functions
20190522 AWS Black Belt Online Seminar AWS Step Functions
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
 

Semelhante a Automated Testing with Logic Apps and Specflow

Using MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOpsUsing MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOps
Weaveworks
 
10 Lessons learned in test automation
10 Lessons learned in test automation10 Lessons learned in test automation
10 Lessons learned in test automation
Romania Testing
 
Software testing 2012 - A Year in Review
Software testing 2012 - A Year in ReviewSoftware testing 2012 - A Year in Review
Software testing 2012 - A Year in Review
Johan Hoberg
 
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedSwiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Michael Palotas
 

Semelhante a Automated Testing with Logic Apps and Specflow (20)

Presentation delex
Presentation delexPresentation delex
Presentation delex
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
 
Testing for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration MondayTesting for Logic App Solutions | Integration Monday
Testing for Logic App Solutions | Integration Monday
 
What would Jesus Developer do?
What would Jesus Developer do?What would Jesus Developer do?
What would Jesus Developer do?
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
Agile principles and practices
Agile principles and practicesAgile principles and practices
Agile principles and practices
 
Agile Practices
Agile PracticesAgile Practices
Agile Practices
 
Using MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOpsUsing MLOps to Bring ML to Production/The Promise of MLOps
Using MLOps to Bring ML to Production/The Promise of MLOps
 
Unit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonUnit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking Skeleton
 
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
 
10 Lessons learned in test automation
10 Lessons learned in test automation10 Lessons learned in test automation
10 Lessons learned in test automation
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
 
A Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven DevelopmentA Brief Introduction to Test-Driven Development
A Brief Introduction to Test-Driven Development
 
Software testing 2012 - A Year in Review
Software testing 2012 - A Year in ReviewSoftware testing 2012 - A Year in Review
Software testing 2012 - A Year in Review
 
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedSwiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
 
2 anton muzhailo - team development techniques you must know to be a valuab...
2   anton muzhailo - team development techniques you must know to be a valuab...2   anton muzhailo - team development techniques you must know to be a valuab...
2 anton muzhailo - team development techniques you must know to be a valuab...
 
Course Slides.pdf
Course Slides.pdfCourse Slides.pdf
Course Slides.pdf
 
Software testing
Software testingSoftware testing
Software testing
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
 

Mais de BizTalk360

Mais de BizTalk360 (20)

Optimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit KappaOptimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit Kappa
 
Optimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit KappaOptimise Business Activity Tracking – Insights from Smurfit Kappa
Optimise Business Activity Tracking – Insights from Smurfit Kappa
 
What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)
What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)
What's inside "migrating to biz talk server 2020" Book (BizTalk360 Webinar)
 
Integration Monday - Logic Apps: Development Experiences
Integration Monday - Logic Apps: Development ExperiencesIntegration Monday - Logic Apps: Development Experiences
Integration Monday - Logic Apps: Development Experiences
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep Dive
 
No-Slides
No-SlidesNo-Slides
No-Slides
 
System Integration using Reactive Programming | Integration Monday
System Integration using Reactive Programming | Integration MondaySystem Integration using Reactive Programming | Integration Monday
System Integration using Reactive Programming | Integration Monday
 
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration MondayBuilding workflow solution with Microsoft Azure and Cloud | Integration Monday
Building workflow solution with Microsoft Azure and Cloud | Integration Monday
 
Serverless Minimalism: How to architect your apps to save 98% on your Azure b...
Serverless Minimalism: How to architect your apps to save 98% on your Azure b...Serverless Minimalism: How to architect your apps to save 98% on your Azure b...
Serverless Minimalism: How to architect your apps to save 98% on your Azure b...
 
Migrating BizTalk Solutions to Azure: Mapping Messages | Integration Monday
Migrating BizTalk Solutions to Azure: Mapping Messages | Integration MondayMigrating BizTalk Solutions to Azure: Mapping Messages | Integration Monday
Migrating BizTalk Solutions to Azure: Mapping Messages | Integration Monday
 
Integration-Monday-Infrastructure-As-Code-With-Terraform
Integration-Monday-Infrastructure-As-Code-With-TerraformIntegration-Monday-Infrastructure-As-Code-With-Terraform
Integration-Monday-Infrastructure-As-Code-With-Terraform
 
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-FunctionsIntegration-Monday-Stateful-Programming-Models-Serverless-Functions
Integration-Monday-Stateful-Programming-Models-Serverless-Functions
 
Integration-Monday-Serverless-Slackbots-with-Azure-Durable-Functions
Integration-Monday-Serverless-Slackbots-with-Azure-Durable-FunctionsIntegration-Monday-Serverless-Slackbots-with-Azure-Durable-Functions
Integration-Monday-Serverless-Slackbots-with-Azure-Durable-Functions
 
Integration-Monday-Building-Stateful-Workloads-Kubernetes
Integration-Monday-Building-Stateful-Workloads-KubernetesIntegration-Monday-Building-Stateful-Workloads-Kubernetes
Integration-Monday-Building-Stateful-Workloads-Kubernetes
 
Integration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-TricksIntegration-Monday-Logic-Apps-Tips-Tricks
Integration-Monday-Logic-Apps-Tips-Tricks
 
Integration-Monday-Terraform-Serverless
Integration-Monday-Terraform-ServerlessIntegration-Monday-Terraform-Serverless
Integration-Monday-Terraform-Serverless
 
Integration-Monday-Microsoft-Power-Platform
Integration-Monday-Microsoft-Power-PlatformIntegration-Monday-Microsoft-Power-Platform
Integration-Monday-Microsoft-Power-Platform
 
One name unify them all
One name unify them allOne name unify them all
One name unify them all
 
Securely Publishing Azure Services
Securely Publishing Azure ServicesSecurely Publishing Azure Services
Securely Publishing Azure Services
 
Integration-Monday-BizTalk-Server-2020
Integration-Monday-BizTalk-Server-2020Integration-Monday-BizTalk-Server-2020
Integration-Monday-BizTalk-Server-2020
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Automated Testing with Logic Apps and Specflow

  • 1. Automated Testing with Logic Apps and Specflow Michael Stephenson https://www.linkedin.com/in/michaelstephensonuk1
  • 3. Michael Stephenson • Coaching & Consultancy • Azure Trainer • Integration Architect • Loads of real world Azure projects • #IntegrationMonday • Blog - http://microsoftintegration.guru/blog/ • Twitter - @michael_stephen 3
  • 4. Agenda • Agenda • Why is this a challenge? • What does good look like? • Why Specflow? • Option 1 – Cloud Only • Option 2 – VS Black Box Testing • Option 3 – VS Whitebox Testing • Other Challenges • Outcomes • Awareness of different ways to test Logic Apps • Practical examples
  • 5. Meet the Dev Team 5 Dave – The lazy developer Everyone hates supporting Dave’s code Bob – Wants to deliver quality solutions but isn’t really sure how to do it Bob also likes funky hats and has fashion issues Steve – Has loads of automated testing experience, always looking to improve quality. Steve works out but rarely does Leg Day
  • 6. What does good look like?
  • 7. • Developer runs tests on their own machine before checking in changes • On check in an automated build creates a clean environment and build/deploy/run tests in a sandbox • After build we have a reliable version of code which is well tested and we have confidence in • The version can be deployed to other environments easily • The tests are self describing and tests the software does what its expected to do • The tests are ran each time a change is committed 7 What does Good Look Like?
  • 8. Why is it a challenge?
  • 9. • Stubbing • BizTalk had separation between Transport and Logic • Logic Apps does not • Makes it hard to test logic without dependencies on transport • Fear/Lack of experience of Cloud • Many of the integration scenarios are new • Learning curve is steep • Automated testing is one more complexity • Logic App Maturity • Changing product • Hard to settle on approaches for ALM while lots of change 9 Challenges
  • 10. Sample Logic App 10 If Label = YES
  • 11. Option 1 – Cloud Only
  • 12. Example 1 12 If Label = YES Run Trigger I cant see the File in the container
  • 13. Example 2 13 1) Make HTTP request 2) Did I get a good response 3) Does the data match in Salesforce Postman
  • 14. Good Bad Its ok for trying stuff out and easy to test This is what bad BizTalk testing has looked like for years Its not reliable/repeatable There is no knowledge transfer to others about how solution works Wont work with automated build Not great in team scenarios 14 Thoughts
  • 15. Option 2 – Black Box Testing
  • 16. Example 3 16 If Label = YES 1) Clean Queue Automated Test 3) Pop message on queue 2) Clean Storage4) Did file appear
  • 17. Good Bad Provides some knowledge of how its supposed to work Did the logic app execute the way we expected it to? How do we know if it took the wrong branch? Repeatable test Tests are often brittle as lots of waiting for something to happen Risk is reduced Some scenarios might be difficult depending upon the dependancies You can probably automate most scenarios 17 Thoughts
  • 18. Option 3 – Whitebox Testing
  • 19. Example 4 19 If Label = YES 1) Clean Queue Automated Test 3) Pop message on queue 2) Clean Storage 4) Make assertions about the workflow events - Eg did action execute Workflow Execution Events Diagnostics – Event Hub 5) Is file in folder 6) Does file content match expected
  • 20. Good Bad Provides extensive detail on how solution works Diagnostics events sometimes slowish so tests aren’t that quick Repeatable test Diagnostics events sometimes include old events, my helper class gets rid of those Risk is reduced significantly Test what happens inside the logic app Tests reliable Test the actions and triggers you expect have been executed 20 Thoughts