タグ

devとtestに関するginpeiのブックマーク (9)

  • rjとtとjqコマンドでHTTPレスポンスを試験する - ゆーすけべー日記

    Web 開発者は HTTP レスポンスをよく見る。 以前 CDN を導入する際に、キャッシュがヒットしているかどうか、どこのエッジがキャッシュを返しているかを確認するためにヘッダをよく見ていた。また、ヘッダだけではなく、TTFB といったレスポンスタイムも気にしている。とにかく HTTP レスポンスをよく見る。 HTTP レスポンスを確認する3つの方法 Chrome さえあれば DevTools を見て一目瞭然である。 とはいえ、コマンドラインで確認したい時がしばしばある。 GUI を操作するよりも手軽である。 その場合はcurlコマンドを叩けばよい。 これでプロトコル、ステータス、ヘッダが分かる。 また、レスポンスタイムを測りたければ、その名もttfb.shというcurlをラップしたコマンドラインツールがある。 https://github.com/jaygooby/ttfb.sh この

    rjとtとjqコマンドでHTTPレスポンスを試験する - ゆーすけべー日記
    ginpei
    ginpei 2022/01/22
    rjでウェブAPI結果取得、jqでJSON解析して抽出、tで試験。パイプで繋げてCLIから利用。返却内容の試験の他、死活監視や応答時間計測も。
  • Common mistakes with React Testing Library

    Common mistakes with React Testing LibraryMay 4th, 2020 — 15 min read Hi there 👋 I created React Testing Library because I wasn't satisfied with the testing landscape at the time. It expanded to DOM Testing Library and now we have Testing Library implementations (wrappers) for every popular JavaScript framework and testing tool that targets the DOM (and even some that don't). As time has gone on,

    Common mistakes with React Testing Library
    ginpei
    ginpei 2020/05/09
    React Testing Library作者による「よくある誤用」まとめ。render()の戻り値よりscreen使え、toBeDisabled()等特化した検証使え、IDじゃなくてroleで要素探せ、ARIA系属性ちゃんと付けろ、よくある非同期試験の誤り、ESLintはいいぞ。
  • GitHub - microsoft/playwright: Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

    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

    GitHub - microsoft/playwright: Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
    ginpei
    ginpei 2020/02/05
    Chromium、Firefox、WebKitをGUIなしで実行、操作するヘッドレスなツール。クリック等の操作やスクリーンショット等。Puppeteer開発チームがその開発で得た知見を活かしてAPIを見直し、作り直したもの。
  • Testing Frameworks for Javascript | Write, Run, Debug | Cypress

    design-system assets cypress e2eAuthentication.cy.ts src componentsButton.cy.tsxButton.tsx describe('Auth', () => { it('user should be able to log in', () => { cy.visit('/') // open the login modal cy.get('button').contains('Login').click() // fill in the form cy.get('input[type="email"]').type('[email protected]') cy.get('input[type="password"]').type('test123') // submit the form

    Testing Frameworks for Javascript | Write, Run, Debug | Cypress
    ginpei
    ginpei 2018/06/16
    E2E試験ツール。内臓Chromium?を起動して試験実行。記述はChaiベースで馴染みがあり読み書きしやすい。各種OS、CIにも対応しているらしい。企業向け有料プランもあるがベータ版の間は全て無料。プロキシー未対応。
  • Why You Only Need to Test with 5 Users

    Summary: Elaborate usability tests are a waste of resources. The best results come from testing no more than 5 users and running as many small tests as you can afford. Introduction Some people think that usability is very costly and complex and that user tests should be reserved for the rare web design project with a huge budget and a lavish time schedule. Not true. Elaborate usability tests are a

    Why You Only Need to Test with 5 Users
    ginpei
    ginpei 2017/10/07
    ユーザビリティの試験は、一度に三から五人で。それ以上はコストに見合わない。それ以下は個人差のばらつきを排除できない。三人での試験、修正、再試験を繰り返すのが最良、という論文?
  • テストコードの期待値はDRYを捨ててベタ書きする ~テストコードの重要な役割とは?~ - Qiita

    はじめに みなさん、DRY原則はご存知でしょうか? DRY = Don't repeat yourselfの略で「繰り返しを避けること」という意味ですよね。 良いコードを書くための重要かつ基的な原則なので、みなさんよくご存知だと思います。 ですが、DRY原則はテストコードを書く場合は必ずしも最善にはならない場合があります。 他の人が書いたテストコードを見ていると、テストコードにDRY原則を適用したために、かえって悪いコードになっているケースをときどき見かけます。 この記事ではなぜテストコードをDRYにすると良くないのか、ということを説明します。 追記:タイトルを変更しました @t_wada さんのコメントを受けて、タイトルを見直しました。 「テストコードはDRYを捨ててベタ書きする」 => 「テストコードの期待値はDRYを捨ててベタ書きする」 【注意】この記事は画一的なテストコードの書き

    テストコードの期待値はDRYを捨ててベタ書きする ~テストコードの重要な役割とは?~ - Qiita
    ginpei
    ginpei 2017/03/09
    面倒だからと期待値をコードで表現すると、失敗するべき試験で失敗しなくなっちゃうのでべた書きしましょう、と。コメント欄にあるが必ずしもDRYが悪なわけではない。
  • Greenkeeper | Automate your npm dependency management

    An Important Message from the Makers of Greenkeeper We’ll stop Greenkeeper’s operation as an independent service on June 3rd, 2020. For your dependency update needs, we have a brilliant alternative for you: Snyk. The team behind Greenkeeper have spent the past months working with them on next-generation dependency updates as a part of their open-source security product. We invite all of our users

    ginpei
    ginpei 2016/04/09
    npmの依存パッケージの更新を監視し、package.jsonを更新してPR投げてくれるサービス。ビルド失敗したらそれも教えてくれる。
  • 実践Backbone.Marionette 現場の悩みと解決まで

    2014/1/22 gooラボopen tech talkで話したBackbone.jsとMarionette.jsの話です。Read less

    実践Backbone.Marionette 現場の悩みと解決まで
    ginpei
    ginpei 2014/04/09
    Marionetteでの設計とSinonで書く試験の話。長いけど実感籠ってて面白かった。
  • ブラウザを選ばずWebテストを自動化するSelenium

    Selenium RCで自動テストを実行するには 作成したテストスィートやテストケースをSelenium IDEで読み込めば、作成したテストを実行できます。しかし、Selenium IDEは、Firefoxのプラグインなので、この方法ではFirefox上でしかテストできません。そこで、Firefox以外のWebブラウザでテストするには、Selenium RCを利用します。 またSelenium RCを利用すると、人手を介さずにテストを実行し、テストの実行結果をファイルに出力できるため、継続的インテグレーション(CI)でも利用できます。 それでは、Selenium RCを利用して、Selenium IDEで作成したテストを実行してみましょう。 Selenium RCのインストール Selenium RCはJavaアプリケーションとして動作するので、あらかじめJRE(Javaの実行環境。バージ

    ブラウザを選ばずWebテストを自動化するSelenium
  • 1