自己紹介 ども。KAYACでJS書いてる@kyo_agoです 最近はスマホ環境で色々JS書いてます 今回はかなり内容に主観が入ってます
自己紹介 ども。KAYACでJS書いてる@kyo_agoです 最近はスマホ環境で色々JS書いてます 今回はかなり内容に主観が入ってます
はじめに JavaScript でテストするためのフレームワークは QUnit と Jasmine が人気を二分していたみたいですが、最近は Jasmine が優勢?雑誌やブログで Jasmine を推しているのをよく見かけました。中には「QUnit はオワコン。これからは Jasmine!」って感じの過激な意見も。 私は QUnit を使ってきましたが、Jasmine の勢いは見逃せない。 ってわけで Jasmine 試してみます。どちらが優れているかは、実際に使ってみないと分からないですから。 Jasmineについて introduction.js RSpec 風に記述できる、JavaScript のテスティングフレームワーク。スタンドアロン版とRuby版とNode版があります。スタンドアロン版は QUnit 同様に、ブラウザで実行するタイプ。Ruby 版と Node 版は、なんとコマ
Ghost Driver is a pure JavaScript implementation of the WebDriver Wire Protocol for PhantomJS. It's a Remote WebDriver that uses PhantomJS as back-end. GhostDriver is designed to be integral part of PhantomJS itself, but it's developed in isolation and progress is tracked by this Repository. Current GhostDriver stable version: see releases PhantomJS-integrated version is "1.2.0" (detro@2af7099a9)
Word of caution: This is a prototype. Web applications are using more JavaScript than ever before. The following image (thanks to Gineer) shows the shift in the architecture types of web applications from simple thin clients to thicker clients driven by rich presentations and client logic. Since most of the newer web applications include business logic embedded into the client using JavaScript, w
February 28, 2012 This article will be appearing in my forthcoming book on Backbone.js and continues the section on unit testing. We previously looked at Jasmine and will now look at QUnit and SinonJS. QUnit is a powerful JavaScript test suite written by jQuery team member Jörn Zaefferer and used by many large open-source projects (such as jQuery and Backbone.js) to test their code. It’s both capa
Date#strftime var date = new Date(2011, 5, 29); date.strftime("%Y-%m-%d"); "2011-06-29" Problems ahead var date = new Date(2009, 11, 5); date.strftime("%Y"); //=> "2009" date.strftime("%m"); //=> "12" date.strftime("%d"); //=> "05" date.strftime("%y"); //=> "9" Test setup <!DOCTYPE html> <html> <head> <title>Date.prototype.strftime test</title> </head> <body> <script type="text/javascript" src="st
2004 01 02 03 04 05 06 07 08 09 2004年9月:1エントリ 10 2004年10月:1エントリ 11 2004年11月:1エントリ 12 2004年12月:1エントリ 2005 01 02 03 04 2005年4月:13エントリ 05 2005年5月:18エントリ 06 2005年6月:28エントリ 07 2005年7月:42エントリ 08 2005年8月:39エントリ 09 2005年9月:41エントリ 10 2005年10月:22エントリ 11 2005年11月:20エントリ 12 2005年12月:35エントリ 2006 01 2006年1月:12エントリ 02 2006年2月:6エントリ 03 2006年3月:10エントリ 04 2006年4月:17エントリ 05 2006年5月:9エントリ 06 2006年6月:12エントリ 07 2006年7
この内容はJsTestDriver WikiのConfigurationFileを意訳したものです。 http://code.google.com/p/js-test-driver/wiki/ConfigurationFile JsTestDriverの設定ファイルはYAMLで書きます。 設定ファイルはテストで使用するファイルをJsTestDriverが読み込むために使用され、標準はJsTestDriverコマンドを実行したカレントディレクトリの「jsTestDriver.conf」を参照します。 この参照先はコマンドラインオプションの「--config」から変更することができます。 各ファイルのベースパスはjsTestDriver.confと同じディレクトリとなりますが、コマンドラインオプションの「--basePath」から変更することができます。また、設定ファイル内のbasepathで
mofmof.js にはユニットテスト機能があり、同期/非同期テストの混在や遅延評価もシンプルに記述できます。 以下のコードは、http://mofmof-js.googlecode.com/svn/trunk/test/base.js.htm でテストできます。 同期/非同期の混在 String#test は String#stream の機能を流用して実装されており、 同期/非同期のテストを混在する事ができます。 String#stream と異なり、項目が false を返しても最後まで実行します。 テストしたいを目的に応じて、 関数, 配列, 真偽値 の何れかで定義します。 "関数で評価 > 配列の要素2つを比較 > 真偽値評価".test({ args: { msg: "hello" }, "関数で評価": function() { return this.args.msg ==
というか、この辺の用語がいつも混乱してとても困っていたのでいったん整理。今回のターゲットは何やら最近 JavaScript を含む Web アプリのテストでよく名前を聞く capybara-webkit からスタート。 間違ってたら突っ込んでください! 間違ってなかったら褒めてください! 名前capybara-webkitCapybara の driver. Capybara のテストを WebKit を通じて実行できる。WebKit と言えばみんな大好き、Google Chrome や Safari のエンジンですね。capybaraテスティングフレームワークに対して Web アプリのテストを書きやすくする語彙を提供してくれる( DSL や Driver で実装されている )。driver は default で rack_test で、JavaScript を含む場合は Seleniu
npm install mocha -g npm install shouldmochaの--watchオプションが期待通り動けば問題ないんだけど、ホットリロード動いてないのでファイル監視はwatchrでやらせることにした。 guardでもよかったんだけど、guardは皆決まりきったサンプル動かしてる人達が多くて、独自な挙動をとらせようとするとRuby詳しくない自分にはwatchrの方が取り回しがよかった。 gem install rb_fsevent watchrrb_fseventはMacの場合。それ以外の環境だと別のモジュール(ぐぐれ)が必要 たぶんgrowlnotifyが必要 Growl - Downloads mochaに渡している項目はこんな感じ。 mocha -c --reporter list -r should --ignore-leaks --growl --compi
2011年12月25日日曜日 JsTestDriver導入 テスト駆動JavaScriptで紹介されてたJsTestDriverとjstdutilを、ubuntu11.10に導入した時の手順を記録しておきます。 インストール方法以外の手順は基本的にどのOSでも同じなので、WindowsやMac等にも応用できると思います。 1. インストール 1-1. インストール前の準備 JsTestDriverの動作にはJavaがインストールされている必要があります。 また、後で紹介するjstdutilを使用する場合はrubyが必要です。 以下のようにして必要なソフトをインストールします。 $ sudo apt-get install openjdk-7-jre $ sudo apt-get install ruby 1-2. ファイルのダウンロード JsTestDriverのダウンロー
本稿は、Sencha公式ドキュメントの Unit Testing with Jasmine の翻訳です。 I. 導入 このチュートリアルでは既存のExtアプリケーションを取り上げ、ユニットテストするJasmineアサーションライブラリを紹介します。 読者はJavaScript, Ext JS 4, MVCアーキテクチャ及びHTML, CSSの基本及びリソースの使い方について精通している人が対象です。 なぜテストするのか? アプリケーションをテストするには多くの理由があります。 テストはすべてのユースケースを手動で消し込んでゆくことなくアプリケーションの機能性を検証できます。 さらに、アプリケーションがリファクタリングやアップデートされる時に、 テストはそれらの変更がシステムに当たらしバグを呼び込まないように検証することが出来ます。 II. はじめに このチュートリアルではExtJSにバンド
I’m currently in the midst of creating an application that utilizes Socket.IO for real-time communication between users. Using mocha and should.js I was able to test objects within my node app. However, I quickly found that there were some odd synchronization issues between clients that the test cases couldn't cover. To test the interaction between clients I needed a way to programatically communi
「エンジニアサポート新年会2012 CROSS」のセッションの1つでJavaScriptのセッションが行われました。 エンジニアサポート新年会2012 CROSS http://tech.nifty.co.jp/party/2012/index.htm JavaScript 八面六臂 2回戦 http://tech.nifty.co.jp/party/2012/sessions/bRoom2.htm そこでJavaScriptのユニットテストツールの話が有り、新旧のツールが上げられていたのでメモ。 昔から有る QUnit 、Jasmine 。新しく出てきたものとして mocha 、Buster が紹介されました。 QUnit 公式サイト。 QUnit - jQuery JavaScript Library http://docs.jquery.com/QUnit 【レポート】jQueryテ
Your source for the latest news, product updates, and industry insights
CIKA4D | Website Games Online Terbaik Indonesia Gratis Untuk Semua Pencinta Game Online CIKA4D hadir memberikan terobosan terbaru melalui mesin games online yang sangat berkualitas super dahsyat yang menjadi pilihan para pecinta games online yang bisa menghasilkan uang secara instan dengan adanya ribuan games online lengkap yang bisa anda mainkan dengan modal kecil saja kamu sudah bisa meraih juta
HEADS UP! This article was written for an older version of node. More up-to-date information may be available elsewhere. One of my first node.js libraries was nano: A no fuss CouchDB client based on the super pervasive request. In foresight that was a good idea, even though there's a ton of clients for CouchDB none of them is as simple as nano, and the fact that its based on request is great. When
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く