Skip to content

Latest commit

 

History

History
136 lines (108 loc) · 5.26 KB

File metadata and controls

136 lines (108 loc) · 5.26 KB

DotNET Build Buddy - Testing Guide

Test Results Summary

✅ Automated Tests Completed

Core Functionality Tests

  • Project File Generation: All project file generation functions tested and working
    • C# (.csproj) generation: ✅ PASSED
    • F# (.fsproj) generation: ✅ PASSED
    • VB.NET (.vbproj) generation: ✅ PASSED
  • TypeScript Compilation: ✅ PASSED (no errors)
  • Extension Packaging: ✅ PASSED (VSIX created successfully)

NuGet Compatibility Tests

  • Package Compatibility Checking: ✅ PASSED
  • Version Suggestion Logic: ✅ PASSED
  • Alternative Package Detection: ✅ PASSED
  • Transitive Dependency Checking: ✅ PASSED
  • Framework Upgrade Suggestions: ✅ PASSED

🔄 Integration Tests (Manual Testing Required)

To complete testing, install the packaged extension in VS Code and verify:

Test Case 1: File Change Detection

  1. Open a workspace with .NET source files (.cs, .fs, .vb)
  2. Create a new .cs file
  3. Expected: Extension should detect the change and update project files
  4. Verify: Check console output for "DotNET Build Buddy: Detected change" messages

Test Case 2: Project File Generation

  1. In a workspace with mixed .NET files, run command: "DotNET Build Buddy: Update Project Files"
  2. Expected:
    • .csproj file created for C# files
    • .fsproj file created for F# files
    • .vbproj file created for VB.NET files
  3. Verify: Project files contain correct structure and file references

Test Case 3: Solution File Generation

  1. Run command: "DotNET Build Buddy: Generate Solution File"
  2. Expected: Solution.sln file created with all project references
  3. Verify: Solution file contains proper project GUIDs and configurations

Test Case 4: Automatic Updates

  1. With auto-update enabled, add/remove/modify .NET source files
  2. Expected: Project files automatically updated after 1-second debounce
  3. Verify: Project files reflect current source file structure

Test Case 5: Configuration Options

  1. Test disabling auto-update in settings
  2. Test custom watch patterns
  3. Test exclude patterns (bin/, obj/ folders)
  4. Expected: Extension respects all configuration settings

Test Case 6: NuGet Compatibility Checking

  1. Create a project with incompatible NuGet packages
  2. Expected:
    • Inline diagnostics appear with errors/warnings
    • Tooltips show detailed information
    • Suggestions for versions and alternatives appear
  3. Verify: Check diagnostics panel and inline markers

Test Case 7: Version Suggestions

  1. Use an old version of a package incompatible with current framework
  2. Expected: Extension suggests correct version
  3. Verify: Check tooltip and error messages

Test Case 8: Alternative Package Suggestions

  1. Use an incompatible package (e.g., EntityFramework with .NET 8)
  2. Expected: Extension suggests alternative (Microsoft.EntityFrameworkCore)
  3. Verify: Check error message and suggestions

Test Case 9: Transitive Dependencies

  1. Use a package with incompatible transitive dependencies
  2. Expected: Extension detects and reports transitive dependency issues
  3. Verify: Check error messages for transitive dependency warnings

Test Case 10: Framework Upgrade Suggestions

  1. Use .NET Core 3.1 with packages that all support .NET 8
  2. Expected: Extension suggests framework upgrade
  3. Verify: Check notification message with upgrade suggestion

Installation Instructions

  1. Install the packaged extension:

    code --install-extension dotnet-build-buddy-1.0.1.vsix
  2. Open a workspace containing .NET source files

  3. The extension should activate automatically when .NET files are detected

Test Workspace Structure

Use the included test-workspace/ directory which contains:

  • src/Program.cs - C# source file
  • src/Calculator.fs - F# source file
  • src/Helper.vb - VB.NET source file

Expected Behavior

When working correctly, the extension will:

  • Monitor file changes in real-time
  • Generate appropriate project files based on source file types
  • Create solution files that reference all projects
  • Check NuGet package compatibility
  • Provide inline diagnostics and suggestions
  • Suggest framework upgrades when appropriate
  • Provide user feedback through VS Code notifications
  • Log detailed information to the console for debugging

Testing Checklist

  • File change detection works correctly
  • Project files are generated correctly for C#, F#, VB.NET
  • Solution files are generated with correct structure
  • Auto-update works when files are modified
  • Configuration settings are respected
  • NuGet compatibility checking works
  • Inline diagnostics appear correctly
  • Version suggestions are accurate
  • Alternative packages are suggested correctly
  • Transitive dependencies are checked
  • Framework upgrade suggestions appear when appropriate

Troubleshooting

If the extension doesn't work as expected:

  1. Check the VS Code Developer Console (Help > Toggle Developer Tools)
  2. Look for "DotNET Build Buddy" log messages
  3. Verify the extension is activated (check Extensions panel)
  4. Ensure workspace contains .NET source files for activation
  5. Check NuGet API connectivity if compatibility checking fails
  6. Verify configuration settings are correct