@techreport{oai:ipsj.ixsq.nii.ac.jp:00098620, author = {宮下, 剛輔 and 栗林, 健太郎 and 松本, 亮介 and Gosuke, Miyashita and Kentaro, Kuribayashi and Ryosuke, Matsumoto}, issue = {15}, month = {Feb}, note = {システムの大規模・複雑化に伴い,サーバの構築・運用を効率化するために,サーバの状態をコードで記述する手法が数多く提供されている.それらの手法を効率良く扱うプロセスとして,テスト駆動開発の手法をサーバ構築に応用した Test-Driven Infrastructure が提案されている.このプロセスを支援するテストフレームワークもいくつか登場しているが,あるものは特定の構成管理ツールに依存,またあるものは OS 毎の違いを自ら吸収しなければならないなど,汎用性に難がある.そこで,本論文では,特定の構成管理ツールや OS に依存することなく,サーバの状態を汎用的かつ可読性の高いコードでテスト可能なテストフレームワークを提案する.提案手法では,汎用性を高めるために,これまでの OS や構成管理ツール固有の振る舞いを整理して一般化し,運用業務で発生するコマンド群,特に確認作業に関するコマンド群を体系化・抽象化した汎用コマンド実行フレームワークを定義する.続いて,テストコード記述の抽象度を高め可読性を上げるために宣言的かつ自然言語に近い記法で汎用コマンド実行フレームワークを操作できる制御テストフレームワークを定義する.これにより,管理者が OS や構成管理ツールの違いを気にすることなくサーバの状態を容易にテストできるようになり,サーバの運用・管理コストを低減できる.また,フレームワークを用途別に分離して定義することにより,制御テストフレームワークを独自の記述に変更する事も容易である.提案するテストフレームワークを serverspec と名付けた., As the increase of large and complex systems, many ways to describe states of servers as code are supplied. As the effective process to handle these ways, Test-Driven Infrastructure is proposed. It is the application of Test-Driven Development to the server configuration. Several test frameworks that support this process are appearing, but they have difficulty in vesatility because some frameworks depend on specific configuration management tools and others need the consideration of differences between OSes to write test code. In this paper, we propose a test framework that doesn't depend on specific configuration management tools or OSes for testing states of servers by versatile and readable code. In our proposal, we arrange and generalize the behavior of OSes and configuration management tools and define the versatile command execution framework for increasing the versatility. Next, we define the test framework that control the command execution framework by declarative and natural language like description to increase the level of abstraction and readability. By this test framework, system administrators can test states of servers easily without considering the diffrences between OSes or configuration management tools, and can decrease the costs of server operations. Also by defining the frameworks separated into purposes, we can replace the control test framework with another one that have original notation easily. We named the proposed test framework serverspec.}, title = {serverspec: 宣言的記述でサーバの状態をテスト可能な汎用性の高いテストフレームワーク}, year = {2014} }