There has not been a major update to the GivWenZen main project since 2011. I have decided to build and release a fork of this project, updated to work with the latest Fitnesse. I am not the maintainer of the original project; this is a fork for my own development purposes, which I have decided to make public. As such, feature requests, issues and so on are likely to be met at worse than a snail's pace. However, should you send me pull requests, I'm more than happy to oblige.
I have chosen to focus on getting GivWenZen to build as a Maven project. To that end, here is what you need to include GivWenZen in your Maven project:
Add the dependency to your pom project:
<dependency>
<groupId>com.github.bernerbits</groupId>
<artifactId>givwenzen</artifactId>
<version>1.0.6</version>
</dependency>
That's it! Note that if you are using GivWenZen with a testing framework you will want to include <scope>test</scope>
in your dependency.
Note that the Fitnesse instructions below assume that you want to write your GivWenZen fixtures in the default package of bdd.steps
. You can override this by using:
|script |
|start|Giv Wen Zen For Slim|your.package.name.here |
Derek Berner
GivWenZen allows a user to use the BDD Given When Then vocabulary and plain text sentences to help a team get the words right and create a ubiquitous language to describe and test a business domain.
The idea was taken from Cucumber and my desire to create Cucumber like specifications and tests in FitNesse. Like Cucumber, GivWenZen does not distinguish between "Given", "When", "Then" or "And" but you should. Regular expression parsing is used to determine what step method should be executed for each given when then step in a test. Regular expression parsing is also used to find parameters to the step method. Also see how other ideas from Cucumber map to FitNesse.
1) Start with an example fixture actual class found in the givwenzen_test.jar.
2) In a FitNesse table it could look like this.
import and start should go in SetUp or SuiteSetUp
|import|
|org.givwenzen|
|script|
|start|giv wen zen for slim|
|script|
| given| a ToDo item is due tomorrow |
| when | the date changes to tomorrow |
| then | a notification exists indicating the ToDo is due |
package bdd.steps;
@DomainSteps
public class ExampleSteps {
@DomainStep( “a ToDo item is due (.*)” )
public void createToDoWithDueDateOf(CustomDate date) {
// do something
}
@DomainStep( “the date changes to (.*)” )
public void theDateIs(CustomDate date) {
// do something
}
@DomainStep( “a notification exists indicating the ToDo is due” )
public boolean verifyNotificationExistsForDueToDo() {
// do something
return false;
}
}
More example can be found in the FitNesseRoot in source. It is easy to get started.
Simple scenarios More complex scenarios
http://groups.google.com/group/givwenzen_user
http://groups.google.com/group/givwenzen_developer
ant
java -jar ./lib/fitnesse.jar
Open http://localhost/ in the browser of your choice.
Here you will find an example test and a user guide for GivWenZen.
License: MIT.
Libraries required for main classes:
- commons-logging.jar - Apache License 2.0.
- google-collect-snapshot-20080530.jar - Apache License 2.0.
- javassist.jar - Mozilla Public License 1.1.
- log4j-1.2.9.jar - Apache License 2.0.
- reflections-0.9.2.jar - GNU Lesser General Public License