34. 実際のBehatテストコード
# language: en
Feature: Do Some Sample Testing
Scenario: ls
Given I am in the "directory"
When I execute "command"
Then I should get "file1,file2"
feature (テストシナリオ)
35. 実際のBehatテストコード
step (テストコード)
<?php
/**
* Defines application features from the specific context.
*/
class FeatureContext implements Context, SnippetAcceptingContext
{
/**
* @Given I am in the :arg1
*/
public function iAmInThe($arg1)
{
throw new PendingException();
}
}
40. 1. 低コスト
• 拡張を利用したE2Eテストは作成コストが低い
# language : en
Feature: stock search
Scenario: get stock code
Given I am on the homepage
When I follow "ファイナンス"
When I fill in "searchText" with "九州電力"
When I press "searchButton"
Then I should see "9508"(例) yahooファイナンスで株価検索するテスト [5分で制作]