Skip to content

Instantly share code, notes, and snippets.

@wsdjeg
Created January 30, 2016 02:54
Show Gist options
  • Save wsdjeg/2c88ebb0d55f299fb2ed to your computer and use it in GitHub Desktop.
Save wsdjeg/2c88ebb0d55f299fb2ed to your computer and use it in GitHub Desktop.
Java Unit Test in VIM

###JavaUnit.vim

Stories in Ready Join the chat at https://gitter.im/wsdjeg/JavaUnit.vim

requirement

  1. jdk

  2. artur-shaik/javacomplete2

  3. scrooloose/syntastic

    also you can use my fork which provide gradle support, wsdjeg/syntastic

  4. Shougo/unite.vim

  5. tagbar

install

NeoBundle 'wsdjeg/JavaUnit.vim'
Plugin 'wsdjeg/JavaUnit.vim'

Command

JavaUnitExec

test the current methond(no need put the cursor on the methodName) 2015-11-16 23-40-05

JavaUnitExec [args ...]

test specification method

example JavaUnitExec testMethod1 testMethod2 testMethod3 ... 2015-11-16 23-40-25

JavaUnitTestMain

run the main methon of current class

also you can use JavaUnitTestAll,then will run all the testMethod in the current file 2015-11-16 23-40-43

support for maven project

JavaUnitTestMaven test current file

JavaUnitMavenTest

JavaUnitTestMavenAll test this project

JavaUnitMavenTestAll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment