Categories
|
free software
JUnitGenerator V2.0Products: IntelliJ IDEA, Android Studio Vendor: Bell Tracy, Ltd. Email: Website: http://code.google.com/p/junit-generator-v2 Description:
This plugin generates JUnit tests from right click 'Generate...' menu while focused on a java class. The unit test output code can be customized using a provided velocity template to format the code based on the origin class.
If a unit test is created where one already exists, the user is prompted for overwrite or merge operation. The merge operation allows the user to selectively create the target file content. A future revision will allow the user to generate their own test case macros. Full documentation URL:
http://code.google.com/p/junit-generator-v2/downloads/list
3 updates are hidden
show all updates
Recent change notes:This revision contains the following updates to issues:
Previous release notes: Revision 2.0.9 contains the following updates:
General usage instructions:This plugin was originally written by: Alex Nazimok. I have updated JUnit Generator and made it much more customizable.This plugin allows users to generate customized test-case skeletons in a specified directory, which it will create if the directory does not already exist. A velocity template is used to generate these test cases which can be customized as needed. These templates have access to a large amount of metadata making the generated tests very dynamic. Several options are allowed, including the ability to decide whether or not to generate tests for all overloads of a method and how to name them. Also, for all private methods boiler plate reflection access and invocation code is created. A test can be easily generated by pressing Alt+Ins and selecting JUnit Test or you can optionally add a keybinding to it under the keymap part of the IntelliJ settings page. This plugin runs out of the box for IntelliJ 7, and will run fine in IntelliJ 6.x, however since there are version issues between the IntelliJ IDEA 6 and IntelliJ IDEA 7 SDK's, I have uploaded two versions, 2.0.6 and 2.0.7 respectively. If you download this plugin through IntelliJ you will get the 2.0.7 Version which runs on IntelliJ 7.x, however if you download the 2.0.6 version here, you only need to extract the junitgen.jar from the zip file and place it in the IntelliJ plugins folder, located under the config folder in 'Documents and Settings' in order to run this on IntelliJ 6.x I have added JUnitGeneratorV2.0 as a project on Google Code. There you will be able to find the IntelliJ 6 version and a version compiled specifically to run on a Macs. I have also uploaded the source code and instructions to compile it. You can find the Google Project here: http://code.google.com/p/junit-generator-v2/ Also, feel free to leave any comments or suggestions. ***Google Code Website: http://code.google.com/p/junit-generator-v2/ |
||||||||||||||||||||||||||||
Comments:
Any ideas?
I am the formerly anonymous poster who was getting class version errors.
I then noticed that you have a special build for Mac's (my OS). I downloaded that and installed and it fixed the problem.
Still a little confused why Mac's need a separate build - but happy that it is now working and happy with your plugin in general.
See other comments below on class version errors.
---
1. Install/Enable JUnitGenerator V2.0 in IDEA plugins preferences.
2. Quit IntelliJ.
3. Place contents of zip file in ~/Library/Application Support/IntelliJIDEA80
(Overwrite any existing junitgen.jar and resources/ folder)
4. Restart IntelliJ
---
The directory is ~/Library/Application Support/IntelliJIDEA80
---
1. Install/Enable JUnitGenerator V2.0 in IDEA plugins preferences.
2. Quit IntelliJ.
3. Place contents of zip file in ~/Application Support/IntelliJIDEA80
(Overwrite any existing junitgen.jar and resources/ folder)
4. Restart IntelliJ
---
Voila. No startup errors, and you can generate a JUnit test.
Please add this to the instructions. Thank you.
PS: Thanks for making this plugin - and fix - available. I use JUnitGenerator a *lot*, saves me a ton of time.
On Mac OS X the plugins directory is ~/Library/Application Support/IntelliJIDEA80
Hopefully that is the correct location. If it is let me know and I'll add it into the description.
Now barring a major discontinuity between the windows and linux version, and the mac version, do you think its a possibility that you are looking in the incorrect plugins folder? On both filesystems, I've found this location to be /.IntelliJIdea70/config/pluins, albeit the root was entirely different. Maybe you could try searching for something along those lines.
Btw, I just downloaded and tried this with intelliJ 8 on windows and this method worked correctly, however I had to create the plugins folder under config, since no other plugins were installed.
Hope that helps,
Bryan
I unzipped the contents of the file into this location and started up IntelliJ. Nothing happened - i.e. there's no "generate Junit test" and so on menu items.
How does the plugin "register" with IntelliJ? Since this is a manual install, IntelliJ presumably has no idea that this library should be used at startup.