CloudAcademy
  1. Home
  2. Training Library
  3. Microsoft Azure
  4. Courses
  5. Introduction to Azure Functions

Testing and Debugging

The course is part of these learning paths

AZ-203 Exam Preparation: Developing Solutions for Microsoft Azure
course-steps 16 certification 1 lab-steps 7
Developing, Implementing and Managing Azure Infrastructure
course-steps 10 certification 7 lab-steps 2
more_horiz See 1 more

Contents

keyboard_tab
Intro
Serverless in Context
2
Getting the Most From Azure Functions
15
Use Cases2m 27s
16
Pricing3m 33s
Summary
play-arrow
Start course
Overview
DifficultyIntermediate
Duration1h 34m
Students645

Description

An Introduction to Azure Functions

Serverless Computing has emerged as a capable and low-friction means to execute custom logic in the public cloud. Whether you're using Amazon Lambda, Google Cloud Functions, or Azure Functions, you have a wide variety of target languages, ecosystem integrations, and deployment mechanisms to choose from. All this while leaving the heavy lifting of server provisioning and maintenance to the experts, which gives you plenty of time to focus on your differentiated application functionality.

In this "Introduction to Azure Functions" course, you’ll learn how to build Azure Function applications in the cloud. You'll discover the core feature set of Functions and see how to integrate with a variety of sibling Azure services. You'll explore Function topics like security, monitoring, deployment, and testing best practices. You'll also learn about ideal Functions use cases and the pricing model. Finally, you'll learn about how we've arrived at the serverless computing model, and where serverless is likely to go in the future. By the end of this course, you’ll have a solid foundation to continue exploring Functions on your own, and incorporating Azure Functions capability into your work.

An Introduction to Azure Functions: What You'll Learn

Lecture What you'll learn
Intro What to expect from this course
Serverless Computing In Context Understanding what serverless computing is, and how we got here
Core Features A high-level overview of what Azure Functions is, and its basic capabilities
Creating Your First Function A demo of creating your first function in the Azure portal
Security A review of security features in Azure Functions
Using API Key Management A demo of configuring an Azure Function to require API key use
HTTP Proxies A discussion of lightweight HTTP Proxy support
Proxying Azure Blob Storage A demo of using Functions' HTTP Proxy support to front Azure blob storage
Triggers and Bindings Event-based triggering of functions and declarative binding of inputs and outputs
Triggering on Queues and Binding to DocumentDB A demo of Triggering with Azure Queues and Binding Function Output to DocumentDB
Testing and Debugging Tools and techniques for working with Functions during the development cycle
Deployment Options for deploying Azure Function apps into production
Deploying From a Local Git Repo A demo of deploying a complete Azure Function app to the cloud, from a local Git repository
Monitoring Tools for monitoring Azure Functions during dev, test, and release
Use Cases A discussion of ideal use cases for serverless compute and Azure Functions
Pricing A review of how Functions are priced, and a demo of determining price using the Azure Pricing Calculator
Serverless in the Future A short discussion on the future of serverless in the cloud
Summary Course wrap up

If you have thoughts or suggestions for this course, please contact Cloud Academy at support@cloudacademy.com.

Transcript

Testing and debugging Azure functions can sometimes be a tricky process.

In particular, functions that use triggers based on storage or messaging events are reliant on those events for testing purposes, too which can make authoring and running such tests a bit more complex than normal. There's also increased testing complexity as the size of your functions grow. As with any code, smaller functions are easier to test than larger ones. As a general rule, try to keep your function definitions as short as possible to reduce testing and debugging complexity.

The first place to go for function testing is of course the Azure portal itself. Functions that use manual or HTTP triggering are good candidates for ad hoc manual testing using the tools in the portal. For HTTP triggered functions, you're able to set things like the verb type, query string and body payloads, and so on. You could also see the results of manual testing in the portal testing window.

If you prefer, for HTTP triggered functions you can also use external tools like Postman or Fiddler to send the HTTP request to your function URLs. I personally like the Postman Chrome browser extension for this as it has support for remembering prior testing sessions, setting custom header values, and additional features that make it easy to work with. For more information on Postman, browse to the URL shown on the screen.

Azure Functions also has a few other features that can help testing. We've mentioned proxy support, which allows you to keep a static proxy URL and redirect as needed to different function URLs as you test multiple versions. Remember, too, that as function apps are based on the Azure App service, you can use deployment slots to host multiple versions of your function apps for various testing needs prior to rolling them into production. Deployment slots are one of the best features of the Azure App service, and I strongly encourage their use for function apps, too.

Finally, you have the option to develop a .NET function app on your local machine and then upload the compiled binary to the Azure function service once you've tested it outside the cloud. As of the time of this recording, there are still some manual steps involved to make this work, but Microsoft is actively working to implement an auto-publish behavior for the Visual Studio Tools for Azure Functions extension. If you'd like to follow the manual steps check out the URL on the screen for more info.

About the Author

Students3810
Courses4
Learning paths1

Josh Lane is a Microsoft Azure MVP and Azure Trainer and Researcher at Cloud Academy. He’s spent almost twenty years architecting and building enterprise software for companies around the world, in industries as diverse as financial services, insurance, energy, education, and telecom. He loves the challenges that come with designing, building, and running software at scale. Away from the keyboard you'll find him crashing his mountain bike, drumming quasi-rythmically, spending time outdoors with his wife and daughters, or drinking good beer with good friends.