Skip to content

Instantly share code, notes, and snippets.

View naninunenoy's full-sized avatar

Nakano Yosuke naninunenoy

  • Tokyo
View GitHub Profile
@naninunenoy
naninunenoy / WritingAutomatedTests.jpn.md
Last active October 2, 2019 10:16
Zenject/WritingAutomatedTests.md(Google翻訳)

original

Zenject/WritingAutomatedTests.md at master · modesttree/Zenject · GitHub

自動化された単体テストと統合テストの作成

Writing Automated Unit Tests and Integration Tests

依存性注入を使用して適切に疎結合されたコードを記述する場合、プロジェクト全体を起動する必要なく、テストを実行する目的でコードベースの特定の領域を分離する方がはるかに簡単です。これは、ユーザー主導のテストベッドまたはNUnitを使用した完全自動テストの形式をとることができます。自動テストは、継続的インテグレーションサーバーで使用する場合に特に役立ちます。これにより、新しいコミットがソース管理にプッシュされるたびにテストを自動的に実行できます。

When writing properly loosely coupled code using dependency injection, it is much easier to isolate specific areas of your code base for the purposes of running tests on them without needing to fire up your entire project. This can take the form of user-driven test-beds or fully automated tests using NUnit. Automated tests are especially useful when used with a continuous integration server. This allows you to automatically run the tests whenever new commits are pushed to source control.