Skip to Content
Infrastructure as Code ―クラウドにおけるサーバ管理の原則とプラクティス
book

Infrastructure as Code ―クラウドにおけるサーバ管理の原則とプラクティス

by Kief Morris, 宮下 剛輔, 長尾 高弘
March 2017
Intermediate to advanced
352 pages
9h 3m
Japanese
O'Reilly Japan, Inc.
Content preview from Infrastructure as Code ―クラウドにおけるサーバ管理の原則とプラクティス
210
11
章 インフラストラクチャの変更のテスト
11.4.6
 
テストのセットアップ
皆さんは、統一性、再現性、反復可能性が重要だという話にはもううんざりしてきたことだろう。も
しそうなら、我慢して気持ちを引き締めていただきたい。これらは自動テストの本質なのである。動作
に統一性のないテストには価値はない。そのため、環境とデータの統一的なセットアップを保証するこ
とは、自動テストのキーポイントなのである。
インフラのセットアップに関連するテスト(たとえば、VMの構築と検証)では、インフラのオート
メーションは、反復可能性と統一性に実際役立つ。ここで問題が難しくなるのは、「状態」のためであ
る。そのテストは、データについて、あるいはすでに環境に加えてある構成 /設定について、どのよう
な前提条件を設けているのだろうか。
自動テストの一般原則は、個々のテストが独立しており、必要とする初期状態が保証されているこ
とである。テストはどのような順序でも実行できなければならないし、特定のテストを単独で実行する
ことができなければならない。そして、いつも同じ結果を返さなければならない。
だから、ほかのテストがすでに実行されていることを前提としたテストは書くべきでない。たとえ
ば、例11-7 はふたつのテストを示している。第1のものはウェブサーバーに nginxがインストールされ
ていることをテストし、第2のものはホームページが適切なコンテンツによってロードされることをテ
ストする。
11-7  密結合し過ぎているテ
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

詳解 Terraform 第3版 ―Infrastructure as Codeを実現する

詳解 Terraform 第3版 ―Infrastructure as Codeを実現する

Yevgeniy Brikman, 松浦 隼人
入門 Kubernetes

入門 Kubernetes

Kelsey Hightower, Brendan Burns, Joe Beda, 松浦 隼人

Publisher Resources

ISBN: 9784873117966Other