Documentation

Everything you need to know about using snpz for AI-powered test generation.

Introduction

Welcome to snpz, the AI-powered test generation platform that revolutionizes how developers write and maintain unit tests.

What is snpz?

snpz is an intelligent testing assistant that automatically generates comprehensive unit tests for your code. By analyzing your source code, our AI understands the logic and creates tests that cover edge cases, error conditions, and typical usage scenarios.

Key Benefits

  • Save Time: Generate tests in seconds instead of hours
  • Improve Coverage: AI identifies edge cases you might miss
  • Maintain Quality: Consistent test patterns across your codebase
  • Learn Best Practices: See how AI structures tests for different scenarios

Quick Start

Get up and running with snpz in just a few minutes.

Step 1: Install the Extension

Download and install the snpz extension for VS Code from the marketplace.

Step 2: Authenticate

Sign in with your account or create a free one to get started.

Step 3: Generate Your First Test

  1. Open a JavaScript/TypeScript/Python/C# file in VS Code
  2. Right-click in the editor and select "Generate Tests with snpz"
  3. Review the generated tests and save them
  4. Run the tests to verify they work

Pro Tip: Start with simple functions to get familiar with the generated test patterns before moving to complex classes and modules.

Installation

VS Code Extension

The easiest way to get started is through our VS Code extension:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "snpz"
  4. Click Install
  5. Restart VS Code if prompted

Command Line Tool

For CI/CD pipelines and automation, install our CLI tool:

npm install -g @snpz/cli

System Requirements

  • Node.js 16+ or Python 3.8+
  • VS Code 1.60+ (for extension)
  • Internet connection for AI processing

Test Generation

Learn how to generate tests effectively with snpz.

Basic Test Generation

To generate tests for a function:

// Select this function in VS Code
function calculateTotal(items, taxRate) {
  const subtotal = items.reduce((sum, item) => sum + item.price, 0);
  const tax = subtotal * taxRate;
  return subtotal + tax;
}

Right-click and select "Generate Tests" to create comprehensive test cases.

Test Types

snpz generates different types of tests:

  • Happy Path Tests: Normal operation scenarios
  • Edge Case Tests: Boundary conditions and limits
  • Error Tests: Invalid inputs and error handling
  • Integration Tests: Multi-function interactions

Customizing Generation

You can customize test generation by:

  • Setting test framework preferences
  • Choosing coverage levels
  • Specifying test naming conventions
  • Adding custom test utilities

Language Support

snpz currently supports JavaScript, TypeScript, Python, and C# with comprehensive testing framework integration.

Supported Languages

JavaScript/TypeScript

  • Jest
  • Mocha + Chai
  • Vitest

Python

  • pytest
  • unittest
  • nose2

C#

  • NUnit
  • xUnit
  • MSTest

Coming Soon: Support for Java, Go, Rust, and many more programming languages.

Framework Integration

Each language includes:

  • Framework-specific test templates
  • Mocking and stubbing utilities
  • Assertion libraries
  • Test runner configurations

Additional Resources

API Reference

Complete API documentation for integrating snpz into your workflows.

View API Docs

Community

Join our community for support, tips, and best practices.

Join Community