Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUERY] Reference existing tools that can be used to test code depending on Azure SDK in docs #48305

Open
tomas-pajurek opened this issue Feb 14, 2025 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Docs feature-request This issue requires a new behavior in the product in order be resolved.
Milestone

Comments

@tomas-pajurek
Copy link
Contributor

Library name and version

Azure.Storage.Blobs, Azure.Data.Tables, Azure.Messaging.ServiceBus, Azure.Messaging.EventHubs, Azure.Security.KeyVault

Query/Question

The Unit testing and mocking with the Azure SDK for .NET guideline provides useful information on how to mock Azure SDK clients and integrate them into various unit testing frameworks.

However, I believe it would be beneficial to also reference existing tools that simplify testing code that depends on Azure SDK clients. Some useful tools include:

Disclaimer: I am one of the maintainers of the In-Memory Azure Test SDK library, but I genuinely believe this addition would be valuable for Azure SDK users.

Environment

No response

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 14, 2025
@mbrdev
Copy link

mbrdev commented Feb 14, 2025

I would love some documentation or tooling to help mock the Azure AI Vision ImageAnalysisClient because the below is just ridiculous;

var aiResult = AIVisionImageAnalysisModelFactory.ImageAnalysisResult(null, null, null, null, null, null, 
            AIVisionImageAnalysisModelFactory.ReadResult(new[] { 
                AIVisionImageAnalysisModelFactory.DetectedTextBlock(new[] { 
                    AIVisionImageAnalysisModelFactory.DetectedTextLine("test", new[] { 
                        AIVisionImageAnalysisModelFactory.ImagePoint(0, 0)}, new[] { 
                            AIVisionImageAnalysisModelFactory.DetectedTextWord("test", new[] { 
                                AIVisionImageAnalysisModelFactory.ImagePoint(0, 0)}, 1)})})}), null, null);

I really dislike this pattern of internal constructors on all the models and static create methods instead, it really overcomplicates everything.

@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. feature-request This issue requires a new behavior in the product in order be resolved. Docs and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 14, 2025
@jsquire jsquire added this to the Backlog milestone Feb 14, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 14, 2025
@jsquire
Copy link
Member

jsquire commented Feb 14, 2025

@scottaddie : Would you please offer your thoughts on the proposal being made?

@jsquire
Copy link
Member

jsquire commented Feb 14, 2025

@mbrdev: Since your request is specific to the Azure AI Vision library, it would be more appropriate for a local sample than a general article. I'd encourage you to open a separate issue so that we can bring this to the attention of the team that owns the Vision library for consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Docs feature-request This issue requires a new behavior in the product in order be resolved.
Projects
None yet
Development

No branches or pull requests

4 participants