You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
The document discusses testing JavaScript code. It covers why JavaScript is hard to test, how to make JavaScript more testable, and tools that can help with testing. Specifically, it notes that untestable JavaScript code is a major problem, provides examples of testable versus untestable code, and recommends using unit test frameworks like Jasmine along with functional test frameworks. It also rec
261: JasmineでJavaScriptのテスト (view original Railscast) Other translations: Other formats: Written by Naomi Fujimoto Railsデベロッパーの多くはアプリケーションのRubyコードをテストすることの重要性を理解しています。しかし多くの場合JavaScriptについてはブラウザでアプリケーションを実行してエラーを確認するだけの手動テストで済まされてしまいます。ウェブアプリケーションがますます複雑化しクライアント側に多くの機能を持つようになる中で、JavaScriptコードを自動的にテストする方法を持つことが望まれます。今回のエピソードでは、そのための一つの方法を見ていきます。 対象のアプリケーションを以下に示します。標準的な注文フォームで、クレジットカード番号を入力するテキスト
Monday 26 July, 2010 by moschel Last week we released Syn and mentioned how all testing solutions suffer from some fatal flaw. Today, we are releasing a beta of FuncUnit, which has "solved" JavaScript web application testing. Features Functional Testing - Test complex behavior like drag-drop. High Fidelity - Create identical events that a mouse and keyboard create. Run tests in a real browser. Aut
Testing Backbone applications with Jasmine and Sinon Part 1: Introduction 3 March 2011 Overview This is the first in a series of articles demonstrating how to test a Backbone.js application, employing the Jasmine BDD test framework and the Sinon.JS spying, stubbing and mocking library. In this part, we’ll take a brief look at Backbone, and then move on to an introduction to some of the features of
■概要 qunit-tapとproveを使ってJSの単体テストのCIをする方法に感化されて、まずは環境づくりに挑戦してみます。 ■インストール手順 centos 5.5に環境を作るまでの手順です。 ○phantomjsをインストール http://code.google.com/p/phantomjs/wiki/BuildInstructionsのコメントとかも参考にしながら進めました。 # vim /etc/yum.repos.d/atrpms.repo [atrpms] name= CentOS-$releasever - ATrpms baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing/ gpgcheck=1 gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms en
■概要 前回までで、phantomjsが大体わかったので、jasmine with CoffeeScriptな環境を作成します。 ■説明 ・CoffeeScriptのコンパイルを楽したい。ここではwatchrを利用してみます。 $ sudo gem install watchr $ mkdir demo; cd demo $ mkdir src; mkdir spec $ vim coffee.watchr watch(/(src|spec)\/.*\.coffee/) { |md| system("coffee -cb #{md[0]}") } $ watchr coffee.watchr (別の端末で) $ vim src/test.coffee console.log "a" $ ls src test.coffee test.js <= できてます! ・ではjasmineを利用して
こんにちは、プログラマのおぐらです。毎度おなじみ流浪のJasmineチュートリアルをお送りします。 前回のJasmineによるJavaScriptのテスト その3では、beforeEachとafterEachによる「テストの事前準備と後始末」について解説しました。今回は実際にテストを記述する部分を詳細に説明していきます。 テストコード Jasmineでは、テストコードがそのまま英文として読めるように設計されています(これはビヘイビア駆動開発の特徴でもあります)。 expectメソッドとMatcherメソッド xUnit系のテスティングフレームワークにおけるassert系メソッドに相当するものが、expectメソッドとMatcherメソッドです。 テスト対象であるvalueが期待値である「5」と同一であることを検証する場合、xUnit系では、 assertEquals(5, value);
describe("CreditCard", function() { it("cleans number by removing spaces and dashes", function() { expect(CreditCard.cleanNumber("123 4-5")).toEqual("12345"); }); it("validates based on mod 10", function() { expect(CreditCard.validNumber("4111 1111-11111111")).toBeTruthy(); expect(CreditCard.validNumber("4111111111111121")).toBeFalsy(); }); it("validates when text field loses focus", function() {
<< 2010/12/ 1 2 3 4 5 1. 最近のJavaScriptのテスティングフレームワークについて調べてみた 6 1. いい仕事したいじゃん 7 1. Jasmineをもう少し詳しく紹介してみる 8 9 10 11 1. 今さら始めるRails 3 12 13 14 15 16 17 18 19 20 1. 素の Ruby 環境で Fabrication 21 1. 超今さら初めてのgisty 22 23 24 25 26 27 28 1. Rinari+RhtmlでRailsのコードを書くことにした 29 30 31 >> _ 最近のJavaScriptのテスティングフレームワークについて調べてみた あるいは kanazawa.js v0.0.1 勉強会 : ATND に参加してきた。 今回はとりあえず今注目している JavaScript テスティングフレームワークの紹介と
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く