Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>LLM4UnitTests-SCNew to Visual Studio Code? Get it now.
LLM4UnitTests-SC

LLM4UnitTests-SC

LLM4UnitTests-SC

|
1 install
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LLM4UnitTests-SC (Smart Contract Testing Assistant)

LLM4UnitTests-SC is a Visual Studio Code extension designed to streamline the process of writing, validating, and testing JavaScript-based unit tests for smart contracts configured with Hardhat. With built-in LLM-assisted correction and execution features, it enhances the testing workflow by providing syntax validation, intelligent correction, code coverage analysis, and downloadable test reports—all in a unified webview interface.

Features

🚦 Syntax Validation & Correction

  • Line-by-Line Error Detection: Accurately identifies syntax errors in JavaScript test files with detailed line numbers.
  • Automatic Correction: Utilizes AI to suggest and apply corrections to invalid code segments.
  • Re-validation Loop: Re-checks code after applying corrections to ensure it's clean and ready for execution.

🧪 Test Execution & Code Coverage

  • Seamless Execution: Runs Hardhat test suites directly from the extension.
  • Coverage Reports: Measures and visualizes code coverage to help improve test quality and completeness.

📄 PDF Report Generation

  • Exportable Reports: Allows users to generate and download a comprehensive PDF report of test results and code coverage metrics.

Getting Started

Prerequisites

  • Visual Studio Code
  • Node.js & npm
  • Hardhat project environment configured

Installation

  1. Search for LLM4UnitTests-SC in the VS Code Extension Marketplace.
  2. Click Install.
  3. Once installed, open your smart contract project folder.

How to Use

  1. Open a JavaScript test file inside your Hardhat project.
  2. Launch the extension by clicking the LLM4UnitTests-SC icon in the sidebar or from the Command Palette (Ctrl+Shift+P → LLM4UnitTests-SC: Start).
  3. A webview panel will appear with the following tabs:
    • Syntax Validator
    • Correct & Revalidate
    • Execute Tests
    • Generate PDF Report
  4. Review any detected syntax issues and apply corrections.
  5. Execute the validated test suite and inspect code coverage.
  6. Click Download Report to export your test summary as a PDF.

Use Case

This extension is ideal for developers working on Ethereum smart contracts using Hardhat. It simplifies unit testing by automating the detection and correction of errors, ensuring your contracts are thoroughly tested with minimal friction.

Support & Feedback

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft