Web Platform Dive into the web platform, at your pace.

A couple of months ago I have announced a Cypress.io course Testing The Swag Store targeted at the beginners who want to learn web end-to-end and component testing using Cypress.io test runner. The short announcement video can be seen below It is hard to believe, but I have been on a roll creating lots and lots of lessons for this course. It now covers end-to-end testing, React component testing,
こんにちは、プラットフォーム開発部の新卒エンジニアの松下です。 普段は会員基盤フロントエンドチームでログインやアカウント登録などの会員基盤システムの開発をしています。 早いものであと1ヶ月ちょっとで1年目が終了。春には次の新卒が入ってくるとのことで、うかうかしていられないなと思う今日このごろです。 さて本日はEnzymeを使ってReactのテストを書く方法を紹介したいと思います。 Enzymeは宿泊予約サイトのAirbnbが開発しているReactコンポーネントのテストツールです。 チームでは以前よりテスティングフレームワーク「Mocha」とアサーションライブラリ「Chai」でNode.jsアプリケーションの単体テストや結合テストを行ってきました。しかし、これらのツールだけではReactのテストを行うことができず、今回Enzymeの導入を検討することにしました。 目次 Enzymeのセットア
Too Long; Didn't ReadNowadays, a vast number of projects, small and large, is developed using <a href="https://nodejs.org/en/" target="_blank">Node.js</a> tools and hosted on <a href="https://github.com/" target="_blank">GitHub</a>. Authors of these projects often face the need to choose a tool for end-to-end testing. When we at DevExpress created <a href="https://devexpress.github.io/testcafe/" t
ReactTesting React Applications with JestLearn how to test React applications with the Jest JavaScript testing framework. IntroductionWriting tests is an integral part of application development. Testing results in software that has fewer bugs, more stability, and is easier to maintain. In this article, we'll look at how to test a React application using the Jest testing framework. Jest is a JavaS
JavaScript勉強会 #フロントエンドのテスト アジェンダ フロントエンドのテストの種類 node.jsのテストとの違い 何故ブラウザテストが必要か? Try it! karma.conf.jsの中身 broserifyされたモジュールのテスト フロントエンドのテストの種類 フロントエンドで行うテストは大きく分けて2種類ある。今回は単体/結合テストを行う。 単体/結合テスト JavaScriptをモジュール単位でテストする ブラウザ用テストランナー(testem or Karma) E2Eテスト 実際のユーザー動作、DOM Eventをエミュレートしてテストする ブラウザ自動化ツール(Selenium) node.jsのテストとの違い フロントエンドの単体/結合テストでは、node.jsのテストで用いたテストフレームワーク/アサーションライブラリに加え、ブラウザ用テストランナー(te
Chief Architect at Semaphore. A decade of experience in dev productivity, helping close to 50,000 organizations with operational excellence. Mocha is a testing library for Node.js, created to be a simple, extensible, and fast. It’s used for unit and integration testing, and it’s a great candidate for BDD (Behavior Driven Development). This article will walk you through its installation and configu
Jestとは Facebookで開発しているUnitTestフレームワーク。 特徴は以下です。 FAMILIAR APPROACH Jasmineベースなので記法は馴染みやすいものです。 MOCK BY DEFAULT CommonJSスタイルのrequire()をMockすることで単体テストを実現します。 SHORT FEEDBACK LOOP サクッとテストできる。 ブラウザとかPhantom.jsとか要らないよって意味だと思う。。。 何がいいのか? 素のJasmineと比べてこんな特徴があるようです。 テストファイルを勝手に探してくれる。 DefaultでMockされるので、あえて記述しない限り純粋な単体テストになる。 mockを使うことで、非同期処理を同期的に書ける。 Jasmine2.Xでは非同期サポートがされたとか聞きましたがよく知らない。 jsdomを使うことで、HTMLを含
この記事はECMAScript 2015の事始めとして、ライブラリをECMAScript 2015で書いて公開するというところから始めるのがいいのではという内容です。 ECMAScript 2015(ES2015)はES6とも呼ばれていてどちらも同じものを指しますが、この記事ではES2015に統一します。 ECMAScriptのバージョンについては次のページを参照してください。 ECMAScript · JavaScriptの入門書 #jsprimer 2018-12-27: 追記 textlint/textlint-rule-helperのmasterはTypeScriptの実装へ変換されています。 Babelの実装はhttps://github.com/textlint/textlint-rule-helper/tree/2.0.1から参照できます Babel から TypeScrip
For full functionality of this site it is necessary to enable JavaScript. Here are the instructions how to enable JavaScript in your web browser.
本連載は、テストコードをこれから書こうと考えているJavaScript技術者を対象に、テストコードの意義から、テスト駆動開発、JavaScriptでのテストコードの書き方、継続的インテグレーションなどテスト全般にわたって解説します。また、原理原則だけでなくWhyから説明し、チームメンバーを巻き込みながら開発現場に活かせる考え方を総合的に解説します。第4回目の本稿は、JavaScriptでのテストダブルの方法を、Sinon.jsというJavaScriptテストダブルモジュールを使って説明します。 対象読者 JavaScriptの基本をある程度理解している方 テストコードをこれから書こうと考えている方 テストダブルとは テストコードを実行する際に、次のような課題に直面したことはないでしょうか。 Ajaxへのサーバへの問い合わせのような外部リソースも含めた処理のテストを行う必要があるが、テストデ
In case you missed it, our own Britt Ballard (a fellow native Texan) published a fantastic post in our Back to Basics series on test-first methodology. My only issue with it is that the entire post is written in this super obscure language called Ruby! So I wanted to take a look at the same methodology from the point of view of an iOS developer, in tried and true Objective-C. Our desired code We w
Kiwi+CocoaPodsで始めるiOSアプリの振る舞いテスト入門:iOSアプリ開発でもCI/継続的デリバリしようぜ(2)(1/4 ページ) 現代の開発現場において欠かせないCI/継続的デリバリを、iOSアプリ開発に適用するためのツールやノウハウを解説する連載。今回は、iOSアプリの機能の振る舞いをテストするテスティングフレームワークの特長とインストールの仕方、主な使い方を解説します。 前回の「iOSアプリ開発でCI/継続的デリバリ環境を始めるための4種の神器」では、CI/継続的デリバリ環境を構築するために必要なツール・サービスを紹介しました。 今回はiOSアプリのためのテスティングフレームワークの1つである「Kiwi(キウィ)」を使った振る舞いテストの書き方について解説します。 振る舞いをテストするテスティングフレームワーク「Kiwi」とは KiwiはiOSアプリケーションの機能の振る
The following content comes from the forth module of my Pluralsight course entitled: Front-End First: Testing and Prototyping JavaScript Apps. The rest of the course covers an introduction to Unit Testing, Examples of Hard to Test Code, Mocha (a JavaScript test runner), Grunt (a JavaScript task runner), Mockjax (a way to mock Ajax requests), mockJSON (a way to generate semi-random complex objects
Users expect a high level of polish from iOS apps, so it’s up to you to design, develop and test your apps to meet ever-rising expectations. Think about it for just a moment: How much time have you poured into conducting basic manual user interface testing? You know the drill…launching your app from Xcode, and incessantly tapping the same series of buttons to make sure no regressions slipped into
今回はBDD系のフレームワークであるKiwiの導入と簡単なコードの説明をしていこうと思います。 https://github.com/akuraru/iOSxTDD/compare/0.2.1...1.0 Kiwiの概要 BDD(振る舞い駆動開発)を支援するためのフレームワークです。要求仕様に近い形でテストコードを記述することが出来ます。Kiwiはモックやスタブ、非同期テスト用の機能が実装されています。 https://github.com/allending/Kiwi 要するにXCTestでは書きづらいテストが多くあるので、書きやすくするフレームワークを使いましょうということです。 他にもテストを支援するフレームワークは多く存在するので調べてみてください。 Kiwiをターゲットに追加 Kiwi追加する方法はCocoaPodsを使うのが一般的でしょう。下記のようにPodfileにtarge
A test driven development cycle simplifies the thought process of writing code, makes it easier, and quicker in the long run. But just writing tests is not enough by itself, knowing the kinds of tests to write and how to structure code to conform to this pattern is what it's all about. In this article we will take a look at building a small app in Node.js following a TDD pattern. Besides simple 'u
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く