Posts

Showing posts with the label Testing

Testing AI Coding

Testing AI Coding Testing AI-generated code:  * Shift from a "code review" mindset to an aggressive "runtime verification" strategy.  * Never let the same AI model write both the source code and the unit tests. Checklist: * Property Tests: Run randomized data to verify edge cases. * Input Validation: Check nulls, empty strings, and malformed JSON. * Dependency Audit: Pin explicit versions to flag stale training data. * PR Tagging: Label code as [AI-Generated] to alert reviewers. * Runtime Verification: Spin up ephemeral environments to observe actual execution behavior. Tools:  * Ito:   R uns your app, before reviewing the code. Uses Github PR. Attaches product demo video to PR.  https://www.ito.ai/  * Autonoma:  Self-updating UI testing. https://getautonoma.com/  * Testkube: CI against live infrastructure. Cloud-native. https://testkube.io/

Testing In Blazor

Testing In Blazor Component Testing with bUnit     Use bUnit , a dedicated, open-source testing library built specifically for Blazor components. bUnit renders your components in an in-memory, headless environment using C#. It is  incredibly fast (executing in milliseconds) and integrates natively with standard C# test  runners like xUnit , NUnit , or MSTest. Key Features of bUnit: No Browser Needed: It creates a virtualized Blazor architecture directly in memory. Dependency Injection (DI) Mocking: You can inject mock data stores or mock HTTP clients straight into the component context. Semantic HTML Verification: It compares HTML outputs structurally, ignoring irrelevant formatting quirks like whitespace variations or attribute ordering. End-to-End (E2E) Testing with Playwright Why Playwright Beats Selenium and Cypress for Blazor: SignalR WebSocket Resilience: Blazor Server apps rely heavily on a constant, streaming WebSocket connection. Playwright handles ...

Testing in Azure

Testing  in Azure   When automating browser tests for applications integrated with MS Entra ID (OAuth2/OIDC) in Azure or Windows environments, Playwright, Selenium, and Cypress behave very differently. 1. Playwright Built by Microsoft, Playwright has native, deep integration with Windows architecture and Azure DevOps. It is currently the industry-recommended tool for testing Azure-backed applications.  Playwright's native auto-waiting mechanisms are perfectly engineered to handle the asynchronous nature of Blazor Server (SignalR web sockets) and Blazor WebAssembly (WASM code execution) without requiring unstable sleep timers. Azure Pipelines Integration: Out-of-the-box support in Azure DevOps. You can run Playwright tests across multiple browsers (Chromium, Firefox, WebKit) in parallel using headless Azure-hosted agents (Windows or Linux) without installing extra dependencies.    The Entra ID Advantage (Storage State): Playwright allows you to log in once at...