Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>SymflowerNew to Visual Studio Code? Get it now.
Symflower

Symflower

Symflower

symflower.com
|
11,858 installs
| (4) | Free
Generate JUnit, Spring and Spring Boot tests for your Java code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Symflower for Visual Studio Code

Symflower helps you build better software by pairing static, dynamic and symbolic analyses with LLMs. The robustness of deterministic analyses combined with the creativity of LLMs allows for higher quality and rapid software development.

Make your editor better:

  • Generate smart test templates with imports, annotations, object initializations, function calls, asserts, and more
  • Automate the generation of complete test suites
  • Post-processing with linting and code repair to improve code quality
  • Efficiently create, duplicate, and review tests
  • Automatically identify uncaught exceptions in your source code in real time with tests to reproduce them

Symflower delivers demonstrated gains for any use case. Let's talk about your project and how Symflower can help! Reach out to us.

Install Symflower in Android Studio, CLI, IntelliJ IDEA, or Visual Studio Code. Here's how the install works in VS Code:

  1. Click the "Extensions" icon in the side menu.
  2. Search for "Symflower" in the marketplace search input field and click "Install".
  3. Find Symflower's functionality in the context menu, as commands, or define your own keyboard shortcuts.

Build better software with Symflower

What is Symflower? | Install guide | Getting started | Symflower blog

Table of contents

  • Feature overview
    • 1. Generate smart test template
    • 2. Generate test suite
    • 3. Post-processing: Symflower fix and lint
    • 4. Managing tests
    • 5. Test-backed diagnostics
  • Symflower for LLMs
    • 1. Symflower run
    • 2. Symflower symbols
    • 3. Symflower test
    • 4. Symflower test-runner
    • 5. Symflower trace
  • Quick start guide
    • Tutorial: Generate smart test template
    • Tutorial: Generate test suite
  • Commands
  • Supported languages & technologies
  • Requirements
  • Documentation
  • Community
  • Feedback

Feature overview

Generate smart test template

Write new test cases faster. Stop spending time on boilerplate code for your tests and focus on your test scenarios instead. Use Symflower to instantly generate all your boilerplate: imports, annotations, object initializations, calls, assertions, and more.

Symflower provides dedicated testing for Spring and Spring Boot applications which includes testing for Spring controllers, repositories, and services. Templates can also serve as starting points for your LLM coding assistant of choice.

Use any of the following options to generate smart test templates for a file / function:

  • Right-click on a function and click the item in the context menu
  • Use the command palette (Ctrl+Shift+P / Cmd+Shift+P)
  • Enable the create test code lens in Symflower's extension settings.

Generate smart test template

Check out the tutorial

Generate test suite

Thoroughly test your code by generating a complete test suite using Symflower. Find edge cases, reproduce bugs faster, and decide which tests you want to add to your test suite.

Use any of the following options to generate a test suite for a file / function:

  • Right-click on a function and click the item in the context menu
  • Use the command palette (Ctrl+Shift+P / Cmd+Shift+P).

Generate test suite

Check out the tutorial

Post-processing with Symflower fix and lint

Whether you're writing code manually or using LLMs to generate code, use Symflower's post-processing functionality with linting and code repair to improve code quality.

Symflower fix: Applies an automatic repair logic to fix code. Check the documentation for up-to-date information of what fixes are provided.

Symflower fix

Check out the documentation

Symflower lint: Use Symflower to run static analysis with preconfigured linting rules on your project. Default linting rules cover formatting to enforce style rules, and rules for simplification and more idiomatic code, enabling you to find bugs and performance issues.

Symflower lint

Check out the documentation

Managing tests

Symflower provides several features that make it easy to manage your tests. Use the add test code lens to add new test templates, duplicate test to duplicate existing tests with a single click, and Symflower's test review workflow to add generated tests to your test suite.

Create test: The create test code lens is enabled by default. Just navigate above the method you want to add a test template for and click create test. You'll see the corresponding test template being added to your test file.

"Create test" code lens

Check out the documentation

Duplicate test: If your workflow involves the creation of multiple similar tests with only minor differences (for instance, in a TDD environment), using the duplicate test code lens will give you a significant productivity boost. In your test file, just click duplicate test above the test you want to duplicate. Symflower will automatically highlight all the parts you need to update manually (such as the test name).

"Duplicate test" code lens

Check out the documentation

Test review workflow: Symflower provides an easy way to review generated tests. The test review workflow enables you to select which generated tests cases you want to add to your test suite. Just click the add test code lens to add selected tests to your test file.

Test review workflow

Check out the documentation

Test-backed diagnostics

Test-backed diagnostics: Discover and reproduce runtime exceptions. Once a test suite was generated, Symflower will automatically highlight any uncaught runtime exceptions in your IDE. For each exception found, a test case is provided that can be used to reproduce and fix the found problem.

Test-backed diagnostics

Check out the documentation

Symflower for LLMs

Symflower enhances LLM-based software development workflows by pairing static, dynamic and symbolic analyses with LLMs. The following functions are available with the Symflower binary:

Symflower run

Use this feature to symbolically execute programs to collect coverage data for analysis.

Symflower run

Check out the documentation

Symflower symbols

This feature queries all functions/methods in a repository. Use the symbols list to make sure LLMs thoroughly analyze your repository.

Symflower symbols

Check out the documentation

Symflower test

This feature executes the tests in your project and outputs test results and coverage information.

Symflower test

Check out the documentation

Symflower test runner

This feature performs package-level test impact analysis on your repositories to only run tests affected by the specified source code changes.

Symflower test runner

Check out the documentation

Symflower trace

Symflower trace is a task visualization tool that provides insights into application execution behavior. The output of the command is an HTML file with a tree visualization of a trace file.

Symflower trace

Check out the documentation

Quick start guide

Tutorial: Generate smart test template

To follow the feature tutorial below, start by copying the following code into a file named Triangle.java:

public class Triangle {
  private int sideA;
  private int sideB;
  private int sideC;

  public Triangle(int sideA, int sideB, int sideC) {
      this.sideA = sideA;
      this.sideB = sideB;
      this.sideC = sideC;
  }

public TriangleType getType() {
// Each side needs to be greater than 0
  if (sideA <= 0 || sideB <= 0 || sideC <= 0) {
      return TriangleType.invalid;
  }

// Two sides need to be bigger than the third
if(this.sideA + this.sideB < sideC || this.sideB + this.sideC < this.sideA || this.sideA + this.sideC < this.sideB){
return TriangleType.invalid;
}

  if (this.sideA == this.sideB && this.sideB == this.sideC) {
      return TriangleType.equilateral;
  }

  if (this.sideA == this.sideB || this.sideB == this.sideC || this.sideA == this.sideC) {
      return TriangleType.isosceles;
  }

  return TriangleType.scalene;
}
}

enum TriangleType {
  equilateral,
  isosceles,
  scalene,
  invalid
}

Use the sample code above and right-click anywhere in the function to open the context menu, then click "Symflower: Generate Test Template for Function". (Alternatively, use your defined hotkeys, the command palette, or the code lens to create the test template). The following new test template will be added to your test file:

import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.*;

public class TriangleTest {
    @Test
    public void Triangle() {
        int sideA = 123;
        int sideB = 123;
        int sideC = 123;
        Triangle expected = new Triangle(123, 123, 123);
        Triangle actual = new Triangle(sideA, sideB, sideC);

        assertEquals(expected, actual);
    }
}

Now all that is left is properly naming the method and replacing the sample values according to your test scenario.

Tutorial: Generate test suite for a file / function

Start by copying the following sample code into a file named Triangle.java:

public class Triangle {
  private int sideA;
  private int sideB;
  private int sideC;

  public Triangle(int sideA, int sideB, int sideC) {
      this.sideA = sideA;
      this.sideB = sideB;
      this.sideC = sideC;
  }

public TriangleType getType() {
// Each side needs to be greater than 0
  if (sideA <= 0 || sideB <= 0 || sideC <= 0) {
      return TriangleType.invalid;
  }

// Two sides need to be bigger than the third
if(this.sideA + this.sideB < sideC || this.sideB + this.sideC < this.sideA || this.sideA + this.sideC < this.sideB){
return TriangleType.invalid;
}

  if (this.sideA == this.sideB && this.sideB == this.sideC) {
      return TriangleType.equilateral;
  }

  if (this.sideA == this.sideB || this.sideB == this.sideC || this.sideA == this.sideC) {
      return TriangleType.isosceles;
  }

  return TriangleType.scalene;
}
}

enum TriangleType {
  equilateral,
  isosceles,
  scalene,
  invalid
}

Right-click anywhere in the function to open the context menu, then click "Symflower: Generate Test Suite for Function", "Symflower: Generate Test Suite for File", or use any of the other available usage options. Symflower will analyze the source code and generate a virtual file with the following test cases:

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.*;

public class TriangleSymflowerTest {
    @Test
    public void Triangle1() {
        int sideA = 0;
        int sideB = 0;
        int sideC = 0;
        Triangle expected = new Triangle(0, 0, 0);
        Triangle actual = new Triangle(sideA, sideB, sideC);

        assertTrue(EqualsBuilder.reflectionEquals(expected, actual, false, null, true));
    }

    @Test
    public void getType2() {
        Triangle t = new Triangle(0, 0, 0);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType3() {
        Triangle t = new Triangle(1, 0, 0);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType4() {
        Triangle t = new Triangle(1, 1, 0);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType5() {
        Triangle t = new Triangle(1, 1, 1);
        TriangleType expected = TriangleType.equilateral;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType6() {
        Triangle t = new Triangle(1, 2147483646, 3);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType7() {
        Triangle t = new Triangle(1, 3, 1);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType8() {
        Triangle t = new Triangle(128, 1, 1);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType9() {
        Triangle t = new Triangle(1342177280, 469764097, 872415232);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType10() {
        Triangle t = new Triangle(2, 1, 1);
        TriangleType expected = TriangleType.isosceles;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType11() {
        Triangle t = new Triangle(2147483647, 1, 1);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType12() {
        Triangle t = new Triangle(32768, 1, 32768);
        TriangleType expected = TriangleType.isosceles;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType13() {
        Triangle t = new Triangle(342289410, 194581503, 536870914);
        TriangleType expected = TriangleType.invalid;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType14() {
        Triangle t = new Triangle(524287, 524287, 1);
        TriangleType expected = TriangleType.isosceles;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }

    @Test
    public void getType15() {
        Triangle t = new Triangle(8191, 8190, 1);
        TriangleType expected = TriangleType.scalene;
        TriangleType actual = t.getType();

        assertEquals(expected, actual);
    }
}

The above test cases include one test for each unique execution path of your code. To easily copy them from your virtual file to your actual test suite, use the add test code lens above each respective test. Although those tests are already fully functional, you may want to update some values or update the test names to be more descriptive.

Commands

Command Description
Symflower: Generate Test Suite for Function Generates test cases for the current function and lets you review and add them to your test file interactively.
Symflower: Generate Test Suites for File Generates test cases for every function within the file and lets you review and add them to your test file interactively.
Symflower: Generate Smart Test Template for Function Generates a new test case template for the selected function to your test suite.
Symflower: Generate Smart Test Templates for File Generates a new test case template for every function within the file to your test suite.
Symflower: Restart Language Server Restarts the Symflower language server.
Symflower: Stop Language Server Stops the Symflower language server.

Supported languages & technologies

Symflower is currently only available for Java (versions 1-17, partly version 18-21).

Supported technologies:

  • Build tools:
    • Gradle
    • Maven
  • Mocking:
    • Mockito
  • Testing frameworks:
    • JUnit 4
    • JUnit 5
  • Frameworks:
    • Spring
    • Spring Boot

Requirements

  • Supported operating systems:
    • Linux
    • MacOS
    • Windows
  • Supported architectures:
    • x86 with 64bit
    • ARM with 64bit

Documentation

For more information you can browse the Symflower documentation and Symflower's changelog.

Community

Join the Symflower community on GitHub to submit issues and to discuss questions, problems, and solutions with other Symflower users. Find us at https://github.com/symflower/symflower.

Feedback

Please send us your questions, experience, or problems with Symflower. Your feedback helps us further improve this plugin. If you are missing a feature or found a problem that you think should be fixed, please open an issue on our community issue tracker or write us an email at hello@symflower.com. Subscribe to the Symflower newsletter to receive updates on new features, use cases and topics on software development.

© 2025 Symflower GmbH

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