Skip to content

Improve Lambda Test Tool v2 getting-started docs and add samples#2494

Open
GarrettBeatty wants to merge 2 commits into
devfrom
docs/testtool-v2-getting-started
Open

Improve Lambda Test Tool v2 getting-started docs and add samples#2494
GarrettBeatty wants to merge 2 commits into
devfrom
docs/testtool-v2-getting-started

Conversation

@GarrettBeatty

@GarrettBeatty GarrettBeatty commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves the getting-started experience for the Lambda Test Tool v2. Based on a full review of the README against the actual source, this fixes copy-paste-breaking inaccuracies, documents features that shipped but were undocumented, restructures the doc to be usage-first, and adds runnable sample projects. Every sample and documented flow was verified end-to-end against the installed tool (v0.15.0).

README changes

  • Quick Start at the top: install → run → invoke → result, consistently using HttpV2.
  • Prerequisites section (.NET 8+ SDK, ~/.dotnet/tools on PATH, verify step).
  • Correctness fixes:
    • API Gateway route Endpoint now uses the base URL (http://localhost:5050) instead of wrongly appending the function name.
    • Emulator-mode examples are consistently HttpV2 to match the sample handler (previously Rest, which yields HTTP 502); casing normalized (HttpV2, Get).
    • Corrected/completed the command-line options table; removed the duplicate H1, stale version note, and duplicated sentence.
  • Newly documented features: the info command, SQS and DynamoDB Streams event sources, the web UI invoke workflow, the 58 built-in sample events, saved requests, and theming.
  • Added Troubleshooting and Known Limitations sections.
  • Class-library setup (Option 2) now leads with a command-line dotnet exec path and keeps the IDE launch profile as a secondary option, with the dotnet run vs IDE caveat called out.

Sample projects (new, under Tools/LambdaTestTool-v2/samples/)

Sample Shows
AddFunctionTopLevel Quick Start: top-level function behind the API Gateway emulator
AddFunctionClassLibrary Class-library function, launchable from CLI or IDE
SQSProcessor SQSEvent handler (SQS event source or built-in sqs.json)
ToUpperFunction Minimal zero-dependency function for the web UI

Each has its own README and a committed launch profile (added a .gitignore exception so the sample launchSettings.json files are tracked).

Verification

Installed the tool (amazon.lambda.testtool 0.15.0) and ran each sample:

  • AddFunctionTopLevelcurl /add/5/38 (HTTP 200)
  • AddFunctionClassLibrary — verified both the .store runtime-support path and a token-free CLI dotnet exec launch → 8 (HTTP 200)
  • ToUpperFunction"hello world""HELLO WORLD" (HTTP 200)
  • SQSProcessor — built-in sqs.json event → processed "Hello from SQS!" (HTTP 200)

Rewrite the LambdaTestTool-v2 README to be usage-first and fix several
copy-paste-breaking inaccuracies:

- Add a top-of-page Quick Start (install -> run -> invoke -> result) and
  a Prerequisites section (.NET 8+, PATH for global tools, verify step).
- Fix the API Gateway route Endpoint example to use the base URL
  (http://localhost:5050) instead of appending the function name.
- Make emulator-mode examples consistently HttpV2 to match the sample
  handler (avoids HTTP 502) and normalize Get/HttpV2 casing.
- Correct and complete the command-line options table; document the
  info command, SQS and DynamoDB Streams event sources, the web UI
  workflow, built-in sample events, saved requests, and theming.
- Add Troubleshooting and Known Limitations sections; remove the
  duplicate H1 and stale version note; reframe the Aspire pointer.

Add runnable sample projects under samples/ (AddFunctionTopLevel,
AddFunctionClassLibrary, SQSProcessor, ToUpperFunction), each with its
own README and committed launch profile. Add a .gitignore exception so
the samples' launchSettings.json files are tracked.
Verified end-to-end that a class-library Lambda function can run from the
command line (not just an IDE). The Executable launch profile relies on the
IDE expanding $(Configuration) and resolving workingDirectory, which plain
'dotnet run --launch-profile' does not do.

- Add CopyLocalLockFileAssemblies to the AddFunctionClassLibrary sample so
  its NuGet dependencies are copied to the build output, making the function
  self-contained for a command-line 'dotnet exec' launch.
- Restructure README Option 2 to lead with the command-line 'dotnet exec'
  steps and keep the IDE launch profile as a secondary option, noting the
  dotnet-run-vs-IDE caveat.
- Rewrite the sample README with both command-line and IDE launch paths.
# AWS Lambda Test Tool

## Overview
The AWS Lambda Test Tool provides local testing capabilities for .NET Lambda functions with support for both Lambda emulation and API Gateway emulation. This tool allows developers to test their Lambda functions locally in three different modes:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i had go through here and correct a bunch of things. i then asked it to go through the readme and follow the steps and see if it could run the test tool etc following the steps in the readme and it could

@GarrettBeatty
GarrettBeatty marked this pull request as ready for review July 23, 2026 01:32
@GarrettBeatty
GarrettBeatty requested review from a team as code owners July 23, 2026 01:32
@GarrettBeatty
GarrettBeatty requested a review from normj July 23, 2026 01:32
@GarrettBeatty GarrettBeatty added the Release Not Needed Add this label if a PR does not need to be released. label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release Not Needed Add this label if a PR does not need to be released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant