JavaScript勉強会

JavaScriptの学習日記

Gherkin メモ

「Gherkin」(ガーキン)というプログラムの書き方が紹介されていました。

考え方が良さ気なので、後で調べてみようと思います。(備忘録)

 

gigazine.net

 

・Gherkinは期待された動作を理解する良い助けになる

Gherkinはテストのための記法の1つで、「こういう状態のとき、こういう動作を行えば、こうなることが期待される」という形式で記述していくものです。

ビアソンさんは「たとえ実際にテストでは使わなくとも、Gherkinを書くことでアプリがどういう動作を期待されているのか理解しやすくなる」と述べています。

 

blog.juliobiason.net

 

### Gherkin is your friend to understand expectations

Gherkin is a test description format which points "Given that the system is in a certain state, When something happens, then this is expected".

Even if you don't use any testing tool that reads Gherkin, it will give you a good understanding of what it is expected from the app.

 

Gherkinの発音、読み方

 

ejje.weblio.jp

 

gherkinとは

(酢漬け用)小キュウリ、ガーキン

Gherkin

ヘングステンベルグ ガーキンス 720ml×2個

ヘングステンベルグ ガーキンス 720ml×2個

 

 

ガーキンは、ピクルスとかに使われている小さいキュウリでした。

 

Gherkinの資料

 

Google検索

gherkin テスト - Google 検索

 

ドキュメント

cucumber.io

 

使い方など

www.guru99.com

f:id:jsstudy:20190624085800p:plain

 

 

magazine.joomla.org

f:id:jsstudy:20190624090029p:plain

 

 

www.functionize.com

f:id:jsstudy:20190624090330j:plain

 

 

sakanasoft.net

 

 

blog.eiel.info

 

 

qiita.com

 

 

magazine.rubyist.net

 

 

www.infoq.com

 

Gherkinは、RubyRailsの文化から発祥したようですが、他の言語でも取り入れられているようです。

 

PHPとかでもライブラリーがありました。

gherkin php - Google 検索

 

github.com

 

Behat Gherkin Parser

This is the php Gherkin parser for Behat. It comes bundled with more than 40 native languages (see i18n.php) support & clean architecture.

 

 

qiita.com

 

 

qiita.com

 

印象

  • いろいろ準備が必要そうで、ちょっと面倒くさいかも?
  • 実際にテストで使わなくても、コメントの書き方としてはありかも?

 

 

初めての自動テスト ―Webシステムのための自動テスト基礎

初めての自動テスト ―Webシステムのための自動テスト基礎