Skip to main content

Generate your first smart test template

Open the file you want to analyze and choose any of the following options to trigger test template generation:

  1. Code lens: Click the "create test" code lens above any function to generate test templates for that function:

    Use code lens."

  2. Context menu: Right click into a function and select "Symflower: Generate Test Template for Function" from the context menu.

    Trigger the context menu."

  3. Keyboard shortcut: Define a keyboard shortcut to trigger Symflower's smart test template generation. Position your cursor within a function and hit your specified keybinding.

    Define a keyboard shortcut."

  4. Command palette: Position your cursor into a function. Open the command palette of your editor and start typing "Symflower". Select the entry "Symflower: Generate Test Template for Function".

    Use the command palette."

Symflower then generates a new test method either by extending an already existing test file or by creating a new one. The chosen file location is determined using the test path that is defined in your build configuration. If none can be found the test file is simply put within the same directory as your production code.

info

Symflower currently supports the build systems Maven and Gradle for automatic test path detection.

Give us feedback

If you are missing a feature or found a problem that you think should be fixed, we encourage you to open an issue on our community issue tracker or message us at hello@symflower.com.