🚀 Offline Mode Documentation

Generate test cases completely offline with TestGenie's powerful local AI model. No internet required, 100% private, fast, and accurate.

Note: We are still working on the model, and releasing updates with new models and more options! Please keep checking this space for latest info!

🎯 Overview

TestGenie's offline mode allows you to generate comprehensive test cases for your code without requiring an internet connection. This feature is powered by a local AI model that runs entirely on your machine, ensuring:

  • Complete Privacy: Your code never leaves your machine
  • No Internet Required: Works in air-gapped environments
  • Fast Performance: No network latency
  • Unlimited Usage: No API rate limits
  • Cost Effective: No per-request charges

Pro Feature: Offline mode is available exclusively for TestGenie Pro users. Upgrade to Pro to unlock this powerful feature.

💻 System Requirements

Minimum Requirements

  • Network: Initial download only
  • OS: Windows 10+, macOS 10.15+, or Linux
  • RAM: 8GB (16GB recommended)
  • Storage: 4GB free space
  • CPU: 4 cores (8 cores recommended)

Recommended Setup

  • RAM: 16GB or more
  • Storage: SSD with 8GB+ free space
  • CPU: 8+ cores for faster generation
  • Architecture: x86_64 (Intel/AMD)
  • Python: 3.8 or higher

Note: The AI model requires significant computational resources. Performance will vary based on your hardware specifications.

📦 Installation

Step 1: Install TestGenie

pip install test-genie

Step 2: Install Offline Dependencies

test-genie offline install

This command will download the AI model (~2 GB) and install all required dependencies.

Step 3: Verify Installation

test-genie offline info

This will show you the model information and installation status.

Success! Once installation is complete, you can start generating test cases offline.

🚀 Basic Usage

Generate Tests for a File

test-genie offline generate path/to/your/file.py

This will generate test cases for the specified Python file using the offline model.

Specify Number of Test Cases

test-genie offline generate file.py -p 5 -n 3

Generate 5 positive test cases and 3 negative test cases.

Supported File Types

Python

.py files

pytest, unittest

C++

.cpp files

Google Test (GTests), Unit tests

Java

.java files

JUnit

⚙️ Command Options

test-genie offline generate

Generate test cases for a specific file

Usage: test-genie offline generate <file_path> [options]
Options:
-p, --positive Number of positive test cases (default: 3, max: 10)
-n, --negative Number of negative test cases (default: 2, max: 5)
-o, --output Output file path (optional)
-v, --verbose Show detailed generation process

test-genie offline install

Install the offline model and dependencies

Usage: test-genie offline install
# Downloads model (~3.2GB) and installs dependencies

test-genie offline info

Display model information and system status

Usage: test-genie offline info
# Shows model specs, memory usage, and requirements

test-genie offline uninstall

Remove the offline model and free up space

Usage: test-genie offline uninstall
# Removes model files and cleans up dependencies

💡 Examples

Example 1: Python Function

Input File: calculator.py

Command:

test-genie offline generate calculator.py -p 4 -n 2

Generated Output: test_calculator.py

Example 2: C++ Class

Input File: vector.cpp

Command:

test-genie offline generate vector.cpp -p 3 -n 1

Generated Output: test_vector.cpp

🔧 Troubleshooting

Model Download Fails

If the model download fails or is interrupted:

# Check your internet connection
# Ensure you have enough disk space (4GB+)
# Try running the install command again
test-genie offline install

Slow Generation

If test generation is slow:

# Close other resource-intensive applications
# Reduce the number of test cases (-p 2 -n 1)
# Ensure your system meets minimum requirements

Memory Issues

If you encounter memory errors:

# Close other applications to free up RAM
# Consider upgrading to 16GB+ RAM
# Use smaller test case counts

File Not Supported

If you get "file type not supported" error:

# Ensure file has correct extension (.py, .cpp, .c, .java)
# Check that the file contains valid code
# Verify file path is correct

❓ Frequently Asked Questions

Q: How much disk space does the offline model require?

A: The offline model requires approximately 2 GB of disk space. This includes the AI model file and all necessary dependencies.

Q: Can I use offline mode without internet?

A: Yes! Once installed, offline mode works completely without internet. You only need internet for the initial installation and model download.

Q: How does offline mode compare to online mode?

A: Offline mode uses a smaller, optimized model that runs locally. It's faster for simple cases but may be less sophisticated than our cloud-based models. It's perfect for privacy-sensitive environments and when you need guaranteed availability.

Q: Can I uninstall the offline model to save space?

A: Yes, you can run test-genie offline uninstall to remove the model and free up disk space. You can reinstall it anytime.

Q: What programming languages are supported?

A: Currently, offline mode supports Python (.py), C++ (.cpp, .c), and Java (.java) files. We're working on adding support for more languages.

Q: Is offline mode available for free users?

A: No, offline mode is a Pro feature. You need an active TestGenie Pro subscription to use offline mode.

Q: How can I get help if I'm having issues?

A: You can contact our support team through the contact page or check our documentation for more detailed troubleshooting steps.

Ready to Go Offline?

Start generating test cases without internet today!