みなさんこんにちは。@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を行う方法について解説してい
Gaming, Opera GX Pimp your smartphone with GX Mods, now available in Opera GX on Android and iOS February 8th, 2024 Transform the look and feel of your smartphone and tablet and browse like a badass by installing dozens of Mods... New green energy-powered AI data cluster with NVIDIA DGX supercomputing coming to Iceland February 7th, 2024 We’re excited to announce plans to deploy a new AI cluster i
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
A php framework for autotesting your business expectations. Behat is an open source Behavior-Driven Development framework for PHP. It is a tool to support you in delivering software that matters through continuous communication, deliberate discovery and test-automation. Focused on communication Behat is like no other testing framework you have used. Instead of proving that your system was built ri
(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ページを開く