{"id":15423,"date":"2026-09-16T12:01:30","date_gmt":"2026-09-16T12:01:30","guid":{"rendered":"https:\/\/savethevideo.net\/blog\/?p=15423"},"modified":"2026-09-16T12:04:37","modified_gmt":"2026-09-16T12:04:37","slug":"func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions","status":"publish","type":"post","link":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/","title":{"rendered":"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions"},"content":{"rendered":"<p><strong>Treat \u201cfunc tests\u201d as business-behavior checks for one serverless function, and treat integration tests as proof that the function works with real cloud dependencies.<\/strong> That split keeps your test suite fast, useful, and honest. Serverless testing gets messy quickly because the unit of deployment is small, but the real behavior depends on queues, events, permissions, storage, timeouts, retries, and provider limits.<\/p>\n<p><strong>TLDR:<\/strong> Use <strong>func tests<\/strong> to verify what a single function should do when it receives a realistic event, such as \u201can order-created event produces a payment request.\u201d Use <strong>integration tests<\/strong> to verify that the function can talk to real services, such as SQS, DynamoDB, S3, EventBridge, API Gateway, or Pub\/Sub. A team with 40 Lambda functions might run 600 func tests in under 90 seconds, then run 80 integration tests in 12 minutes before release. The best approach is not one test type, but a layered test strategy with clear ownership for each layer.<\/p>\n<h2>What a func test actually means<\/h2>\n<p>A <strong>func test<\/strong>, short for <em>functional test<\/em>, checks a serverless function from the outside of its handler boundary. It sends an event into the function and checks the response, side effect, or emitted message. It does not care how the function reached that result.<\/p>\n<p>For example, an AWS Lambda handler may receive this event:<\/p>\n<ul>\n<li>An HTTP request from API Gateway<\/li>\n<li>A message from SQS<\/li>\n<li>A file notification from S3<\/li>\n<li>A scheduled event from EventBridge<\/li>\n<li>A database stream record<\/li>\n<\/ul>\n<p>A func test feeds the handler a realistic version of that input. Then it checks the output. If the function validates customer data, calculates tax, and returns a 201 response, the test checks those facts. It should not inspect private methods or mock every internal call.<\/p>\n<p><strong>The value is speed.<\/strong> Func tests usually run locally or in CI without deploying the full stack. They are much faster than cloud-based integration tests. They also catch mistakes that unit tests miss, because they use real event shapes and real handler wiring.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"720\" src=\"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg 1080w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events-300x200.jpg 300w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events-1024x683.jpg 1024w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events-768x512.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Func tests vs unit tests<\/h2>\n<p><strong>Unit tests<\/strong> check small pieces of code. They are best for pure logic: pricing rules, input parsing, permission decisions, date calculations, and retry policies. They should be quick and stable.<\/p>\n<p><strong>Func tests<\/strong> sit one level higher. They call the handler or function entry point. They answer a practical question: <em>does this function behave correctly for this kind of event?<\/em><\/p>\n<p>Here is the difference:<\/p>\n<ul>\n<li><strong>Unit test:<\/strong> \u201cDoes calculateTax() return 8.25 for this state and subtotal?\u201d<\/li>\n<li><strong>Func test:<\/strong> \u201cWhen the checkout Lambda receives this API request, does it return the correct total and status code?\u201d<\/li>\n<\/ul>\n<p>It drives me crazy when teams call every handler test a unit test. That hides risk. A handler test often includes serialization, headers, event parsing, validation, error mapping, and response formatting. That is functional behavior, not isolated logic.<\/p>\n<h2>Func tests vs integration tests<\/h2>\n<p><strong>Integration tests<\/strong> prove that the function works with real or near-real external systems. They test the seams: identity, permissions, network calls, configuration, schemas, and service behavior.<\/p>\n<p>A func test may mock DynamoDB. An integration test writes to a real DynamoDB table created for the test environment. A func test may fake an S3 event. An integration test may upload a real object to S3 and wait for the function to process it.<\/p>\n<p>The difference is not academic. Many serverless failures happen outside the code:<\/p>\n<ul>\n<li>IAM policies are missing one action.<\/li>\n<li>An environment variable has the wrong name.<\/li>\n<li>An event source mapping uses the wrong batch size.<\/li>\n<li>A queue visibility timeout is too short.<\/li>\n<li>A database key condition works locally but fails in the cloud.<\/li>\n<li>A function times out after a cold start plus one slow API call.<\/li>\n<\/ul>\n<p>Func tests will not catch all of that. Integration tests will catch much more, but they cost time and money. They can also be flaky if the test environment is shared or poorly cleaned.<\/p>\n<h2>Where contract tests fit<\/h2>\n<p><strong>Contract tests<\/strong> are useful when a function consumes or produces events used by other services. They check that both sides agree on structure and meaning.<\/p>\n<p>For example, a billing function may expect an event with <code>customerId<\/code>, <code>planId<\/code>, and <code>billingPeriod<\/code>. If the account service renames <code>planId<\/code> to <code>subscriptionPlan<\/code>, a contract test should fail before production breaks.<\/p>\n<p>Contract tests are especially useful for event-driven systems. They reduce silent breakage. They also keep teams from relying on tribal knowledge about message formats.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"720\" src=\"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/a-chalkboard-with-the-word-request-written-on-it-event-contracts-message-schema-service-boundary.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/a-chalkboard-with-the-word-request-written-on-it-event-contracts-message-schema-service-boundary.jpg 1080w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/a-chalkboard-with-the-word-request-written-on-it-event-contracts-message-schema-service-boundary-300x200.jpg 300w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/a-chalkboard-with-the-word-request-written-on-it-event-contracts-message-schema-service-boundary-1024x683.jpg 1024w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/a-chalkboard-with-the-word-request-written-on-it-event-contracts-message-schema-service-boundary-768x512.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Where end-to-end tests fit<\/h2>\n<p><strong>End-to-end tests<\/strong> check a complete user or system flow. They may call a public API, trigger several functions, write to storage, publish messages, and check the final outcome.<\/p>\n<p>They are valuable, but they should be few. Expect to waste time on slow failures if you build your whole safety net around end-to-end tests. One broken dependency can turn a clean CI run into a 25-minute hunt through logs, retries, and stale test data.<\/p>\n<p>Use end-to-end tests for critical paths:<\/p>\n<ul>\n<li>User signup<\/li>\n<li>Payment creation<\/li>\n<li>Order fulfillment<\/li>\n<li>Password reset<\/li>\n<li>Data export<\/li>\n<li>Webhook processing<\/li>\n<\/ul>\n<p>Do not use them to check every validation branch. That belongs in unit and func tests.<\/p>\n<h2>A practical testing mix for serverless functions<\/h2>\n<p>A serious serverless test strategy should look like this:<\/p>\n<ul>\n<li><strong>Unit tests:<\/strong> many, very fast, focused on pure logic.<\/li>\n<li><strong>Func tests:<\/strong> many, fast, focused on handler behavior and event shapes.<\/li>\n<li><strong>Contract tests:<\/strong> targeted, focused on message and API compatibility.<\/li>\n<li><strong>Integration tests:<\/strong> moderate number, focused on real cloud services and permissions.<\/li>\n<li><strong>End-to-end tests:<\/strong> few, focused on the most valuable business flows.<\/li>\n<\/ul>\n<p>A healthy ratio might be <strong>50% unit tests, 30% func tests, 15% integration tests, and 5% end-to-end tests<\/strong>. The exact mix depends on risk. A payment platform needs more integration coverage than a simple notification tool.<\/p>\n<h2>How to write useful func tests<\/h2>\n<p>Good func tests use realistic events. Do not handcraft tiny objects that skip half the provider payload. Use recorded samples, official examples, or event builders that match the cloud provider format.<\/p>\n<p>Each func test should answer one business question:<\/p>\n<ul>\n<li><strong>Given<\/strong> this event and system state<\/li>\n<li><strong>When<\/strong> the function runs<\/li>\n<li><strong>Then<\/strong> this response, message, or side effect should happen<\/li>\n<\/ul>\n<p>Mock only the edges that are not under test. If the function sends an email, replace the email provider with a fake and assert the email request. If the function queries a repository, use an in-memory repository or a controlled stub. Keep the handler path real.<\/p>\n<p>Also test failure cases. Serverless systems fail in ordinary ways: duplicate events, malformed JSON, missing headers, expired tokens, throttled services, and partial batch failures. These are not rare cases. They are Tuesday afternoon.<\/p>\n<h2>How to write useful integration tests<\/h2>\n<p>Strong integration tests need clean environments. Use short-lived stacks where possible. Give each test run unique resource names or isolated tenants. Clean data after the test, even when the test fails.<\/p>\n<p>Focus integration tests on risks you cannot verify locally:<\/p>\n<ul>\n<li>IAM access<\/li>\n<li>Event source mappings<\/li>\n<li>Queue redrive policies<\/li>\n<li>Database indexes<\/li>\n<li>Object storage notifications<\/li>\n<li>Secrets access<\/li>\n<li>Timeout and memory settings<\/li>\n<\/ul>\n<p>Keep logs searchable. Include correlation IDs in test events. When a test fails, the team should find the matching cloud logs in seconds, not after digging through five consoles.<\/p>\n<img loading=\"lazy\" decoding=\"async\" width=\"1080\" height=\"720\" src=\"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/06\/a-desk-with-several-monitors-cybersecurity-testing-secure-pipeline-vulnerability-scanning.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/06\/a-desk-with-several-monitors-cybersecurity-testing-secure-pipeline-vulnerability-scanning.jpg 1080w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/06\/a-desk-with-several-monitors-cybersecurity-testing-secure-pipeline-vulnerability-scanning-300x200.jpg 300w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/06\/a-desk-with-several-monitors-cybersecurity-testing-secure-pipeline-vulnerability-scanning-1024x683.jpg 1024w, https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/06\/a-desk-with-several-monitors-cybersecurity-testing-secure-pipeline-vulnerability-scanning-768x512.jpg 768w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/>\n<h2>Common mistakes<\/h2>\n<p>The most common mistake is trusting local mocks too much. Mocks are useful, but cloud services have strict behavior. DynamoDB condition expressions, SQS batch retries, API Gateway headers, and IAM policies all have sharp edges.<\/p>\n<p>Another mistake is running integration tests only after deployment to production. That is too late. Run them against a staging or preview environment first. If the function handles money, identity, security, or customer data, run the most critical checks before every release.<\/p>\n<p>Finally, avoid unclear test names. <code>test_handler_success<\/code> tells nobody what failed. A better name is <code>returns_400_when_customer_id_is_missing<\/code>. Boring names save time.<\/p>\n<h2>Recommended approach<\/h2>\n<p>Use func tests as the main confidence layer for individual serverless functions. They are fast enough for every pull request and broad enough to catch handler-level bugs. Add integration tests for the parts only the cloud can prove. Add contract tests where events cross service or team boundaries. Keep end-to-end tests small and business-focused.<\/p>\n<p><strong>The goal is not to have more tests.<\/strong> The goal is to learn about broken behavior at the cheapest, fastest point possible. Func tests give you that early signal. Integration tests confirm the real wiring. Used together, they make serverless releases safer without turning CI into a slow, brittle mess.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Treat \u201cfunc tests\u201d as business-behavior checks for one serverless function, and treat integration tests as proof that the function works with real cloud dependencies. That split keeps your test suite &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions\" class=\"read-more button\" href=\"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#more-15423\" aria-label=\"Read more about Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions\">Read more<\/a><\/p>\n","protected":false},"author":88,"featured_media":15424,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[495],"tags":[],"class_list":["post-15423","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions - Save the Video Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions - Save the Video Blog\" \/>\n<meta property=\"og:description\" content=\"Treat \u201cfunc tests\u201d as business-behavior checks for one serverless function, and treat integration tests as proof that the function works with real cloud dependencies. That split keeps your test suite ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Save the Video Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-16T12:01:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-16T12:04:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1080\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jonathan Dough\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan Dough\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/\"},\"author\":{\"name\":\"Jonathan Dough\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#\\\/schema\\\/person\\\/7af40201b760c80578ce2da4a3adf274\"},\"headline\":\"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions\",\"datePublished\":\"2026-09-16T12:01:30+00:00\",\"dateModified\":\"2026-09-16T12:04:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/\"},\"wordCount\":1398,\"publisher\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/\",\"url\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/\",\"name\":\"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions - Save the Video Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg\",\"datePublished\":\"2026-09-16T12:01:30+00:00\",\"dateModified\":\"2026-09-16T12:04:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/#primaryimage\",\"url\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg\",\"contentUrl\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg\",\"width\":1080,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/\",\"name\":\"Save the Video Blog\",\"description\":\"Everything you need to know about videos\",\"publisher\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#organization\",\"name\":\"Save the Video Blog\",\"url\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/cropped-stv-logo.png\",\"contentUrl\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/cropped-stv-logo.png\",\"width\":500,\"height\":119,\"caption\":\"Save the Video Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/#\\\/schema\\\/person\\\/7af40201b760c80578ce2da4a3adf274\",\"name\":\"Jonathan Dough\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9afc32c64534e0fac8123f418680cd8c214b1c82b9a0e765b34eddf7636ede6d?s=96&d=monsterid&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9afc32c64534e0fac8123f418680cd8c214b1c82b9a0e765b34eddf7636ede6d?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9afc32c64534e0fac8123f418680cd8c214b1c82b9a0e765b34eddf7636ede6d?s=96&d=monsterid&r=g\",\"caption\":\"Jonathan Dough\"},\"url\":\"https:\\\/\\\/savethevideo.net\\\/blog\\\/author\\\/jonathand\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions - Save the Video Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/","og_locale":"en_US","og_type":"article","og_title":"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions - Save the Video Blog","og_description":"Treat \u201cfunc tests\u201d as business-behavior checks for one serverless function, and treat integration tests as proof that the function works with real cloud dependencies. That split keeps your test suite ... Read more","og_url":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/","og_site_name":"Save the Video Blog","article_published_time":"2026-09-16T12:01:30+00:00","article_modified_time":"2026-09-16T12:04:37+00:00","og_image":[{"width":1080,"height":720,"url":"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg","type":"image\/jpeg"}],"author":"Jonathan Dough","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jonathan Dough","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#article","isPartOf":{"@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/"},"author":{"name":"Jonathan Dough","@id":"https:\/\/savethevideo.net\/blog\/#\/schema\/person\/7af40201b760c80578ce2da4a3adf274"},"headline":"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions","datePublished":"2026-09-16T12:01:30+00:00","dateModified":"2026-09-16T12:04:37+00:00","mainEntityOfPage":{"@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/"},"wordCount":1398,"publisher":{"@id":"https:\/\/savethevideo.net\/blog\/#organization"},"image":{"@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg","articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/","url":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/","name":"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions - Save the Video Blog","isPartOf":{"@id":"https:\/\/savethevideo.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#primaryimage"},"image":{"@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg","datePublished":"2026-09-16T12:01:30+00:00","dateModified":"2026-09-16T12:04:37+00:00","breadcrumb":{"@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#primaryimage","url":"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg","contentUrl":"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2026\/09\/computer-screen-displaying-code-and-project-files-serverless-function-test-layers-cloud-events.jpg","width":1080,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/savethevideo.net\/blog\/func-test-func-tests-vs-integration-tests-and-other-approaches-for-testing-serverless-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/savethevideo.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Func Test: func Tests vs Integration Tests and Other Approaches for Testing Serverless Functions"}]},{"@type":"WebSite","@id":"https:\/\/savethevideo.net\/blog\/#website","url":"https:\/\/savethevideo.net\/blog\/","name":"Save the Video Blog","description":"Everything you need to know about videos","publisher":{"@id":"https:\/\/savethevideo.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/savethevideo.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/savethevideo.net\/blog\/#organization","name":"Save the Video Blog","url":"https:\/\/savethevideo.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/savethevideo.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2021\/02\/cropped-stv-logo.png","contentUrl":"https:\/\/savethevideo.net\/blog\/wp-content\/uploads\/2021\/02\/cropped-stv-logo.png","width":500,"height":119,"caption":"Save the Video Blog"},"image":{"@id":"https:\/\/savethevideo.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/savethevideo.net\/blog\/#\/schema\/person\/7af40201b760c80578ce2da4a3adf274","name":"Jonathan Dough","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9afc32c64534e0fac8123f418680cd8c214b1c82b9a0e765b34eddf7636ede6d?s=96&d=monsterid&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9afc32c64534e0fac8123f418680cd8c214b1c82b9a0e765b34eddf7636ede6d?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9afc32c64534e0fac8123f418680cd8c214b1c82b9a0e765b34eddf7636ede6d?s=96&d=monsterid&r=g","caption":"Jonathan Dough"},"url":"https:\/\/savethevideo.net\/blog\/author\/jonathand\/"}]}},"_links":{"self":[{"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/posts\/15423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/users\/88"}],"replies":[{"embeddable":true,"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/comments?post=15423"}],"version-history":[{"count":1,"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/posts\/15423\/revisions"}],"predecessor-version":[{"id":15445,"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/posts\/15423\/revisions\/15445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/media\/15424"}],"wp:attachment":[{"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/media?parent=15423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/categories?post=15423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savethevideo.net\/blog\/wp-json\/wp\/v2\/tags?post=15423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}