|
Project Information
|
This project has moved and is maintained by different people on GitHub.https://github.com/jonnybbb/easyb-junit/ Provides a way to run easyb behaviors through JUnit. Requires Easyb version 0.9.6. To use this you just need to create a class that extends the EasybSuite class. The class specified the base directory the Easyb behaviors are in, and gives a description for the suite. Like this: public class EasybTest extends EasybSuite {
@Override
protected File baseDir() {
return new File("spec");
}
@Override
protected String description() {
return "My Project Behaviors";
}
}Then you can run this test in your IDE, or using Ant, or whatever else and it should execute all the behaviors under the folder you specified (behaviors must have a file extension of 'specification' or 'story'). Here is what the results look like in Eclipse: Because of the way Easyb and jUnit work, the tests have to actually run before the jUnit execution actually begins. Which means that jUnit can't actually track the execution time of the behaviors. The EasybSuite can simulate this if you tell it to by overriding the trackTime() method. This will increase the runtime of the test, however. These times will not be totally accurate, but should give a decent idea of execution time. If you do not override this method, then all the execution times will be 0. Here's what it looks like with that method overriden: public class EasybTest extends EasybSuite {
@Override
protected File baseDir() {
return new File("spec");
}
@Override
protected String description() {
return "My Project Behaviors";
}
@Override
protected boolean trackTime() {
return true;
}
}
|