docs: improve testing instructions#2965
Merged
opieter-aws merged 1 commit intoJun 25, 2026
Merged
Conversation
mehtarac
approved these changes
Jun 25, 2026
chaynabors
approved these changes
Jun 25, 2026
Contributor
|
Assessment: Approve Focused, well-scoped docs change. It states a rule both guides only implied, the wording is consistent across the Python and TypeScript guides, and the forward reference to "You SHOULD keep separate tests for" resolves correctly (TS line 175). The carve-out for distinct behaviors / execution paths / error conditions is preserved in both files, so there's no risk of the new guidance encouraging over-batched, hard-to-debug tests. Review notes
Nice alignment improvement — this is exactly the kind of small, self-explanatory change that's easy to review and merge. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Agents adding coverage for a new behavior tend to write a brand-new unit test, duplicating the scenario setup, even when an existing test already arranges the same state and could simply carry one more assertion. This bloats the suite, multiplies expensive setup, and obscures intent.
Both SDK testing guides already lean this way — the TypeScript guide has a "Test Batching Strategy" section and the Python guide has assertion-granularity guidance — but neither states the rule plainly. This adds that guidance to both
TESTING.mdfiles, worded consistently and reusing each file's existing "when to keep a separate test" carve-out so the guides stay aligned.In the TypeScript guide the rule is folded into the existing batching directive (reusing expensive setup is the same instinct) rather than added as a separate principle. In the Python guide it lands as the leading bullet of "Test Organization", since that file has no batching section to fold into.
Related Issues
Documentation PR
N/A — these are the SDK developer docs under
strands-py/docs/andstrands-ts/docs/, not the published site undersite/.Type of Change
Documentation update
Testing
Docs-only change. Re-read both edited sections in context to confirm the wording reads naturally and the TypeScript cross-reference ("listed under 'You SHOULD keep separate tests for' below") still points at the right list. No build or test run applies to these Markdown files.
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.