If you want to upgrade to CWB 1.1-SNAPSHOT .0.RELEASE a couple of things you need to take into account. 1.1 is the new development main line, 1.0 (CTF) will no longer be supported.
Library changes
- Packages have been renamed and restructured to allow for separate modules, Maven artifacts have been renamed as well.
- Important for custom steps: AbstractSteps has been split into AbstractCoreSteps and AbstractSahiSteps. Migrating old SAHI based projects probably should switch to AbstractSahiSteps.
- Standard step classes are now available as beans so you can more easily reuse steps
- Separate package to allow for REST webservice testing
- Upgraded dependency on Cucumber 1.1.8 and Spring framework 4
- More debug logging output possible with the special ConsoleReporter and IntelliJReporter
...
Code Block | ||
---|---|---|
| ||
<dependency> <groupId>com.foreach.cwb</groupId> <artifactId>cwb-core</artifactId> <version>1.1-SNAPSHOT<.O.RELEASE</version> <scope>test</scope> </dependency> <!-- Only include SAHI if you want to use SAHI steps --> <dependency> <groupId>com.foreach.cwb</groupId> <artifactId>cwb-sahi</artifactId> <version>1.1-SNAPSHOT<.O.RELEASE</version> <scope>test</scope> </dependency> <!-- Only include REST if you want to use the REST webservice tests --> <dependency> <groupId>com.foreach.cwb</groupId> <artifactId>cwb-rest</artifactId> <version>1.1-SNAPSHOT<.O.RELEASE</version> <scope>test</scope> </dependency> |
IntelliJ IDEA integration
Upgrade to IntelliJ 13 (the community edition should work). It is no longer necessary to add the library as sources in your IntelliJ project. Sometimes IntelliJ 13 does not detect the right glue when running a scenario or feature, and if you want to use the new IntelliJReporter for extended logging you must put it manually in the run configuration as well.
Info |
---|
We have built a custom version of the IntelliJ cucumber-java plugin that should help overcome these issues, it is attached in a zip file to this blog post. This is a work in progress, but it would be handy if people could test drive it. |
Installing the custom plugin
- Shutdown IntelliJ
- Download the Upgrading to Cucumber Web Bridge 1.1-SNAPSHOTcucumber-java.zip file and unzip in ${user.home}\.IntelliJIdea13\config\plugins
- Start Intellij, when going to Settings -> Plugins and looking for cucumber, you should see Cucumber for Java installed with version 1000.1
Configuring the run configuration
The custom plugin allows you to specify a glue and formatter in the default configuration, these will then automatically be used when creating a new run configuration (possibly you have to delete existing ones).
Maven build script
You can remove the section related to maven-dependency-plugin since this is obsolete with IntelliJ 13. You can also remove the test sources source.jar from your IntelliJ project.
...