Welcome to Hypothesis!¶ Hypothesis is the property-based testing library for Python. With Hypothesis, you write tests which should pass for all inputs in whatever range you describe, and let Hypothesis randomly choose which of those inputs to check - including edge cases you might not have thought about. For example: from hypothesis import given, strategies as st @given(st.lists(st.integers() | st
この記事はVOYAGE GROUP エンジニアブログ Advent Calendar 2014の6日目の記事です。 こんにちは、VOYAGE GROUPで片手間データサイエンティスト業に従事している@hagino3000です。 昨今のBigQueryムーブメントに乗って、分析用のデータをBigQueryに投入しはじめた方も多いと思います。しかし、BigQueryを使い出すと、集計バッチ等のテストコードがローカル環境で完結しなくなり、BigQueryそのものを参照したくなります。本記事ではいくつかのアプローチを紹介します。 サンプルコードはPython + nose + BigQuery-Pythonを使っています。 何が問題か 何故テストコードで悩むかというと、BigQueryは次の2つの特徴を持つから。 ローカル環境が作れない 少量のデータでもクエリに5秒程度かかる 特にクエリに時間がか
» Locust Documentation Edit on GitHub Locust Documentation¶ Getting started¶ What is Locust? Features Name & background Authors License Installation Pre-release builds Install for development Your first test Locust’s web interface Direct command line usage / headless More options Next steps Writing Locust tests¶ Writing a locustfile Auto-generating a locustfile User class Tasks Events HttpUser cla
I help out a lot on the #sqlalchemy channel on Freenode IRC. When people ask questions there, one of the issues that comes up often is unit testing applications that use SQLAlchemy. Almost all developers instinctively use SQLite for testing due to its simplicity and the possibility to use an in-memory database that leaves no garbage behind to be cleaned up. It seems like a clean and easy solution,
Overview Installation Guide Browsing and Interactions Splinter API Driver APIs Community Splinter Development splinter¶ Splinter is a simple and consistent API for web application automation. Documentation Changelog Key features: Easy to learn: The API is designed to be intuitive and quick to pick up. Faster to code: Automate browser interactions quickly and reliably without fighting the tool. Pow
Web の負荷試験ツールとして代表的なのは Apache JMeter だと思いますが、 Apache JMeter 自体が結構重いのと、テストシナリオの保守が GUI ツールでは結構ツライ (シナリオファイルは XML ですが、とても人間が手を加えられるような代物じゃない) なあということで代替となるものを探していました。 で、心惹かれたのが以下のツールです。 Gatling Tsung Locust Gatling は非常によさそうなんですが、うーん要 JDK か……あとは複数台から負荷を掛けることができないというのもちょっとマイナスですね。まあどっちもどうにかしようと思えばどうにかなるポイントではあるんですけど。 Tsung は Erlang 製で、仕事で Erlang 使う可能性も出てくる気がするのでこれで慣れ親しんでおくのもいいかなーと思ってシナリオファイルを覗いてみたら ド直球
Needle: Automated tests for your visuals¶ Needle is a tool for testing your CSS and visuals with Selenium and nose. It checks that visuals (CSS/fonts/images/SVG/etc.) render correctly by taking screenshots of portions of a website and comparing them against known good screenshots. It also provides tools for testing calculated CSS values and the position of HTML elements.
Contents unittest を効果的に使うための覚書 目的 ルール: テスト対象のモジュール(module-under-test)をテストモジュールに直接importしない ガイドライン: モジュールスコープでの依存を最小限にする ルール: 各テストメソッドでは、1つの事実だけを確認する ルール: テストメソッドは内容を表すようにしよう ガイドライン: setupはヘルパーメソッドで提供しよう。テストケースのselfで共有するのはやめよう。 ガイドライン: フィクスチャは可能な限り簡潔に ガイドライン: フックやレジストリなどの利用は注意深く ガイドライン: 依存関係を明確にするためにモックを利用する ルール: テストモジュール間でテキストを共有しない まとめ https://twitter.com/tokibito/status/412074246026698753 ということで
yuheiさんが書き残してくれたありがたい記事を参考にゴニョゴニョしてて気になって事があったので、調べてみた時のメモ Djangoでテストを速くするためにいろいろやってみた - brainstorm この記事には以下の対応が書かれていました。 対応2 sqlite3のin-memory databaseにしてみる 対応3 southでテスト時にmigrateを使わず、syncdbでテーブル作成を行わせる この記事の結果を見た時に、あれ?これってそんなに効果ないんだっけ?て気になったのでちょっと調べてみた次第。 前提&環境 Djangoは1.4系 South(DBマイグレーションツール)を利用 Migrationファイルは79ファイルある テストランナーはカスタマイズして、Django本体&サードパーティライブラリのテストは動かないようにしている。 MySQL5.6.13を使用(homebr
Get Python Tricks » 🔒 No spam. Unsubscribe any time. Python Testing Tutorials On this page, you will find tutorials on how to test different types of Python applications, from commandline apps all the way up to web applications. You’ll learn about the best practices and techniques to follow when testing your Python applications. Why Is Testing Important? We all make mistakes and if left unchecked
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く