みなさんこんにちは。@ryuzeeです。 Behatは良さそうなので引き続き検証しています。 今回は、BehatとSeleniumを組み合わせて、受け入れテスト型のテストを自動化してみたので、その方法について説明しましょう。 なお、前回の記事を読まれていない場合はまずそちらを参照してください。 PHPでBDD(Behavior Driven Development)する方法 Seleniumの課題僕が関わっている案件では受入テストを自動化しているケースももちろんあって、その際はPHPUnitとSeleniumを組み合わせています。 このテストには以下のような課題があります。 画面の操作をするphpコードが大量にあって、ソースを見ただけでは何をしているのか分かりにくいSeleniumは操作に画面の要素名利用するため、例えばサイトのデザインを大幅に変えたりすると、テストの中身も大幅に書き換えな
みなさんこんにちは。@ryuzeeです。 RubyであればRSpecやCucumberとか使って、むしろBDDしているケースの方が多いようですが、PHPでやっている事例はあまり聞きません。 とりあえずPHPでもBDDできることは確認できたので、その方法をご紹介します。 ※実戦投入にはもうちょっと検証は必要かもしれません。 BDDとは?BDDとはビヘイビア駆動開発(Behavior Driven Development)でテスト駆動開発から派生したものです。 テスト駆動開発とドメイン駆動設計を統合したようなイメージになります。 対象における「振る舞い」や「制約条件」の検証のために、自然言語的な記述でテストコードを記述します。 スペックファーストで仕様を作ってから実装するという流れになります(コードを書く前に振る舞いを決める)。 ということで、以下ではPHPでBDDを行う方法について解説してい
Desktop Opera One updates with new webpage Translator and improved Split Screen July 3rd, 2025 We're introducing a new built-in webpage translator to Opera One following your requests. We're also adding improvements to Split Screen. Mindfulness, Opera Air Opera Air’s redesigned Boosts now smoother, more intuitive June 4th, 2025 Hey all, Today we have another update for Opera Air, our browser built
This document introduces Behavior Driven Development (BDD) and Behat, a tool that implements BDD for PHP projects. BDD works by writing feature descriptions, or stories, in a simple language anyone can understand before writing any code. Behat uses the Gherkin syntax to write stories. It provides a six step process to write and test stories through the creation of feature files, object definitions
Feature: Prove that software meets my business expectations In order to know when I have correctly implemented a feature As a PHP developer I want a tool to execute tests based on the agreed specifications Background: Given I have discussed a feature with the product team And we have agreed a set of requirements in plain language Scenario: Work is complete Given I have correctly implemented the fe
(In Russian) OK, CSS sprite tools exist. I'm pretty confident I actually made the very first one 🙂 But they break from time to time (like mine currently). And then the command line is cool (as opposed to scary) and oh-so-quick. And imagemagick is cool and oh-so-powerful. So let's see how we can create CSS sprites from the command line alone. Creating the image Starting with a list of separate ima
Symfony2 is not ready for production yet. The final release is planned for March 2011 and will support PHP 5.3.2 and up. Use symfony 1.4 for your projects. HTTP Cache¶ The best way to improve the performance of an application is probably to cache its output and bypass it altogether. Of course, this is not possible for highly dynamic websites, or is it? This document will show you how Symfony2 cach
※2011-01-12:FAQ2件、追記しました。 au、SOFTBANK機種名も表示できます。 昨年から、マルチデバイス対応を進めてきましたが、ようやく形になりましたので、公開します。なお、この手法はGoogle公開のga.phpをhackしていますので、あくまで自己責任で。 1.Google Analytics for Mobile Hack の特徴 本改造により、グーグルアナリティクスで以下の携帯アクセス解析が出来るようになります。・・・というか、現在のGoogle Analytics 携帯版では出来ないんですね。 ・SOFTBANK機種名取得 ・auデバイス名/機種名変換 (現在取れている機種名はデバイスIDで商品名とは違う) ・ページタイトル取得 ※参考URL手法により ・Android機種名取得 ・iPad、iPhone、iPodTouchのOSバージョン (not set)
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く