-
Notifications
You must be signed in to change notification settings - Fork 33
Home
IntelliJBehave is an IntelliJ IDEA plugin for JBehave.
You can either install the plugin from within IntelliJ. Alternatively, download the binary zip file from downloads, unzip the contents at <IntelliJ Home>/plugins and restart IntelliJ.
Go to IntelliJ Settings --> IDE Settings --> File Types, select JBehave story files and ensure that *.story is a registered pattern.
We do not support
- Multiline scenario text
- Using Given stories
You can jump to the step definition from the step usage in the story by doing either of the following
- Press cmd+B for mac or ctrl+B for win/linux when the cursor is on the step usage text
- Perform cmd+click for mac or ctrl+click for win/linux on the step usage text
We do not support
- Custom parameter prefix apart from the default $ for parameterized steps
Error is highlighted if a step used in the story was not defined.
You can comment/uncomment lines in the story file by using cmd+/ for mac or ctrl+/ for win/linux.
You can create a new JBehave story file by selecting a folder in the project explorer and doing one of the following
- Press cmd+alt+S for mac or ctrl+alt+S for Win/Linux
- Right click on the folder, select New and the JBehave Story
You don't need to provide .story extension when asked to provide the name. Also the story would be created by using the Story File Template.
When you create a new story file the default contents are taken from the file template defined for story files. To see/modify the story file template go to IntelliJ Settings --> IDE Settings --> File Templates
We support step definitions written in Java or Groovy.
In any decent-sized project, with hundreds and thousands of step definitions, it is practically impossible to find unused steps. Text search is too cumbersome. Also, for parameterized steps, text search hardly works. With IntelliJBehave, you can use code inspections to find unused steps.
Although, undefined step usages are highlighted as an error in the story files, you can see a report of all the undefined steps in the whole project though code inspection as well.
If you go to IntelliJ Settings --> Project Settings --> Inspections, you will find that IntelliJBehave has added two new inspections "Unused step declaration" and "Undefined step" under a new category "JBehave" and has enabled them by default. Here, apart from other things, you can change the severity level of the probable issues that these inspections will find.
When you perform code inspections from menu option Analyze --> Inspect Code... or by one the other several possible ways, the results are displayed showing steps that are not being used in any of the story files in your project.
If you just want to run JBehave inspections, you can go to menu option Analyze --> Run Inspection by Name... and search for "JBehave".
Description coming up soon.
- Auto-complete steps
- Find usages from step definition
- Rename refactoring
- Safe delete
- Quick fix on errors
- Code folding for scenarios
- Live templates for steps
IntelliJBehave was tested for 10.5.x and above but might work on lower versions.
- Fixed memory leak in scenarios related to example tables.
- Recompiled on 1.6 to support Mac.
- Support for multiline steps
- Icon for story files
- Memory and speed optimizations
- Fix for some steps not being recognized
- Support for IntelliJ IDEA 11.x
- Code inspection to report undefined steps
- Support for table parameters
- Various bug fixes
Find unused steps through code inspection
Error Highlighting in story if step was not defined
Please provide your comments and rating at IntelliJBehave's official IntelliJ Plugin page.
If you find any bugs or would like to suggest a new feature, please create a new issue with adequate description and a code patch if possible.
Feel free to fork the code. If you would like to contribute directly to the trunk, send me your patch.
Copyright 2011 Aman Kumar
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.