:ここ
は、たとえば春コントローラテスト(物語がファイルからロードすることができます)です。 RubyのRSpecとGoのGinkgoで使用されているアプローチを反映させるために、Java 8のlamdaを使用しています。
このライブラリを使用すると、充実した内容豊かなテストを作成できます。
`` `
package com.github.paulcwarren.ginkgo4j.examples;
import static com.github.paulcwarren.ginkgo4j.Ginkgo4jDSL.*;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import org.junit.runner.RunWith;
import com.github.paulcwarren.ginkgo4j.Ginkgo4jRunner;
@RunWith(Ginkgo4jRunner.class)
public class BookTests {
private Book longBook;
private Book shortBook;
{
Describe("Book",() -> {
BeforeEach(() -> {
longBook = new Book("Les Miserables", "Victor Hugo", 1488);
shortBook = new Book("Fox In Socks", "Dr. Seuss", 24);
});
Context("Categorizing book length",() -> {
Context("With more than 300 pages",() -> {
It("should be a novel",() -> {
assertThat(longBook.categoryByLength(), is("NOVEL"));
});
});
Context("With fewer than 300 pages",() -> {
It("should be a short story",() -> {
assertThat(shortBook.categoryByLength(), is("NOVELLA"));
});
});
});
});
}
}
` ``
また春をサポートしています。
(私はこのライブラリの著者です)。
こんにちはOlimpiu、[BDDの別のフレーバー](https://stackoverflow.com/questions/3359327/atdd-versus-bdd-and-the-properuse-of-a-framework/26524511#26524511 )。技術以外のステークホルダーも含めることは価値があるでしょうか?はいの場合は、[FitNesse](http://fitnesse.org/)や[Concordion](http://concordion.org/)などのツールを使用するとどうなりますか? – user3632158
@ user3632158 - はい、技術的でないステークホルダーも含めていただければ幸いです。この方向で実験しましたか? –
私たちのチームでは[Concordion](http://concordion.org)を使用しています。非技術的なビジネススペシャリストは、無料のWYSIWYG htmlエディタ(http://www.microsoft.com/en-us/download/details.aspx?id=36179)で仕様書を作成しています。仕様は開発者によって自動受入れテストを作成するために計測されます。 – user3632158