I have been happily using Jasmine and Jasmine-JQuery on a project with great success. However, I was still unsure about how to handle mocking the ajax calls back to the server. It turns out the answer is already in Jasmine. Time to call out the spies! There is a wiki page on spies https://github.com/pivotal/jasmine/wiki/Spies, but I always enjoy a nice code sample. In my source file I have an ajax
JavaScriptのユニットテストは2年ほど前にQUnitから入って、最近はもっぱらJasmineを利用していました。近年のJavaScriptテスト関連情報をまとめたいなと思い、改めてQUnit最新Version1.10.0のドキュメントとソースを読んで仕様を把握して資料にまとめてみました。 Qunit1.10.0 from Koji Nakamura サーバーサイドJSを開発する時にQUnitを採用する選択肢は僕の中ではないのですが、ブラウザJSを開発する時にはこのシンプルさと導入のしやすさはやはり利点だなと再認識した次第です。
We are now 100% relying on @testacularjs. Finally! plus.google.com/11032358723052…— AngularJS (@angularjs) October 18, 2012 Vojta Jina created Testacular (GitHub: vojtajina / testacular, License: MIT, npm: testacular) to write better tests for AngularJS, Google’s client-side library that’s rapidly gaining support from the wider web development community. While established projects like Selenium ar
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
Yeti 0.2.12 is the first Yeti release to integrate into Jenkins with new support for JUnit XML output. We have just begun using Yeti to test YUI inside Jenkins. When the JUnit XML output is given to Jenkins, we get this nice shared copy of test results that’s available for the entire team to view. It’s broken down by browser and test file for easy navigation. We’re using this today to automate tes
- Any - Accelerate App Modernization Product News Log Management AI Assistant AI Monitoring AIOps Alerts Alerting Amazon Lambda Extend New Relic Analytics APM Increase Software Release Velocity AWS Azure Browser Monitoring Careers CaseStudy Change Tracking CI/CD Cloud Cloud Monitoring Cloud Optimizations CodeStream Open Source Consolidating Tools Consolidate Observability Platform Containers Cultu
README.md Istanbul - a JS code coverage tool written in JS Features All-javascript instrumentation library that tracks statement, branch, and function coverage and reverse-engineers line coverage with 100% fidelity. Module loader hooks to instrument code on the fly Command line tools to run node unit tests "with coverage turned on" and no cooperation whatsoever from the test runner HTML and LCOV
JavaScriptテストの基礎知識と使えるフレームワーク6選:フレームワークで実践! JavaScriptテスト入門(1)(1/3 ページ) しっかりとJavaScriptの“テスト”を行うために、最近のJavaScript事情やテストを取り巻く環境、今注目のテストフレームワークを6つ紹介する JavaScriptでもテストを書こう @ITの読者の方たちのほとんどは、どのような言語を主に利用しているのかなどの違いはあるにせよ、日常的にプログラムを書いている方たちが多いかと思います。 アプリケーションを作る、ライブラリを作成する、オープンソースプロジェクトに貢献するなど、皆さんがプログラムを書く場面はそれぞれいくつかあるはずです。それらプログラムを書く場面に共通して大切な習慣の1つとして、「作成するプログラムに対しては必ずテストコードを書く」ことがあるのは、誰にでも同意してもらえることでし
最近仕事ではNode.jsしか書いてないtoritoriです。 お仕事でもexpressやsocket.ioを使っているのですが WebアプリケーションのテストについてWeb上にあまり書かれていないような気がします。 特にソケット接続した後のメッセージ送信/受信の部分です。 今までのようなHTTPの単純なリクエスト/レスポンスとは手法が異なりますしどうしたものかと。 そこで「自分はこんな感じでテストしてますよー」という記事を書いてみます。 裏を返せば「もっといい方法あるよ!」というのを聞きたいのです>< サンプルについて socket.ioのexample を使います。 ただし、サンプルではログイン時に遷移しない方式なので もう少し実用的な動作に近づかせるため あえてログインURLから遷移するようにし、 セッションもRedisを使うようにしてexpressとsocket.ioでセッションを
nodeのアプリケーションに対するテストをmochaで書いていて、railsのアプリケーションに対するテストをrspecだとこう書くけどこれはmochaではどうすればいいのだろう、というのが幾つかあったので書き留めておきます。今回解説に使うコードは全てgithubにあるので、そちらも参考にして下さい。 今回テストの対象となるアプリケーションは以下の様なものです: socket.ioを使ってユーザ間でメッセージのやり取りが出来る ユーザは、最初にサーバに接続した歳にユーザ名を含んだjsonをサーバに送り、サーバはそのjsonを受け取ったらそのユーザ名をredisに書く それ以降は、ユーザはユーザ名とメッセージを含んだjsonをサーバに送り、サーバはそのjsonを受け取ったら他の全てのユーザにそのjsonを送る それでは早速解説していきます。 テストファイルの名前 テストを実行するのには、mo
Today I’m releasing Yeti 0.2.7, which correctly returns connected browsers to the capture page if you decide to cancel a test run. This is really useful when you notice test failures and want to save time by canceling before the batch is complete. Upgrade now You can install the latest Yeti with one command: npm install -g yeti Parallel testing coming soon Yeti 0.2.7 prefers to identify browsers b
目標はgrunt + phantomjs + jasmineの自動テスト環境 先日の大なごやJS Vol.3で、@_tk84さんが発表なさっていた、PhantomJSで自動テストにインスパイアされて、Gruntでそのあたりをコントロールできるようにしました。 今回のポイントは下記。 .coffeeを保存したら、.jsに自動でコンパイル .jsの更新を検知して、SpecRunner.htmlを自動生成 このとき更新された.jsと、対になるテストコードを含んだSpecRunner.htmlが生成される phantomjsで、SpecRunner.htmlを実行した結果を標準出力 出力をgrowlnotifyに渡してデスクトップ通知 @_tk84さんの元ネタのほうでは、EmacsとRubyな環境でしたが、自分はエディタには依存せず、nodeの実行環境だけで何とかできるように構成しました。 aho
こんにちは、中川です。 今回は「インタラクティブなJavaScriptテストフレームワークTestem 」にて紹介されていた、 JavaScriptのテストランナー「testem」を試してみたいと思います。 ※動作確認は、Mac OS 10.7、Node-v0.8.0 にて行ないました。 ■testem https://github.com/airportyh/testem ■インストール
describe("Jasmine", function() { it("makes testing JavaScript awesome!", function() { expect(yourCode).toBeLotsBetter(); }); }); Documentation User Guide Release Notes API Documentation Contributor Guide Download For pure JavaScript projects: VersionSizeDateSHA1
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く