Skip to content

Unit test generation for the Kakoune editor with Symflower

License

Notifications You must be signed in to change notification settings

symflower/symflower-kakoune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

symflower-kakoune

Symflower fully automatically generates high coverage unit tests for your source code: revealing bugs and security issues while you are coding. You can equip legacy projects with strong test suites and streamline your TDD workflow with automated test case generation to find every edge case. If you are interested in our secret sauce, take a look at our website on https://symflower.com/.

This plugin integrates Symflower CLI into the Kakoune editor (version 2019.07.01 or later), so you can generate unit tests while you write code.

Generate unit tests

Installation

  1. Install Symflower CLI

  2. Load rc/symflower.kak:

    git clone https://github.com/symflower/symflower-kakoune
    mkdir -p ~/.config/kak
    echo "source $PWD/symflower-kakoune/rc/symflower.kak" >> ~/.config/kak/kakrc

    Alternatively, use plug.kak:

    plug symflower/symflower-kakoune

Quick Start

Create a new directory and put the following file Copy.java in it:

mkdir sandbox
cd sandbox
cat > Copy.java << EOF
class Copy {
    static String[] copy(String[] from, String[] to) {
        for (int i = 0; i < from.length; i++) {
            to[i] = from[i];
        }

        return to;
    }
}
EOF
kak Copy.java -e symflower

This should write unit tests for Copy.java to CopySymflowerTest.java.

symflower-kakoune in action

Usage

  • The symflower command generates tests for source files in the current directory.
  • The symflower-unit-tests command generates tests for functions at the main selection.
  • The symflower-unit-test-skeletons command generates test skeletons for functions at the main selection:

Generate unit test skeletons

  • The symflower-alternative-file command jumps between a source file and the generated test file.

The symflower user mode gives quick access to commonly used commands:

Generate unit tests (shortcuts)

Supported Languages

  • Go 1.16
  • Java 1.8

Tutorials

Check out our tutorial at https://get.symflower.com/ to get a quick glimpse on how Symflower helps you implement features and fix bugs.

Requirements

  • Kakoune editor (version 2019.07.01 or later)
  • Supported operating systems:

Feedback

We encourage you to send us your feedback on how you like Symflower. 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 [email protected]. Subscribe to the Symflower newsletter to receive updates on new features, use cases and topics on software development.

© 2022 Symflower GmbH