Getting started

An overview of Bluebook, how to create and run your first test case.

Download

At the moment there is no pre-built Bluebook binary available for download. You will have to install Bluebook from the source code. To install Bluebook from source code you will need to have Go >= 1.8 on your computer. Follow Go installation instructions on its official site. When Go is setup you can install Bluebook with the following command

$ go get -u github.com/bluebookrun/bluebook

If installation was successful, you should find bluebook in your executable path.

Example

Bluebook tests are written in Bluebook Configuration Language. Here is a simple example demonstrating test case with a single request.

variable "server" {
    default = "http://localhost"
}

resource "http_assertion" "status_200" {
    source = "status_code"
    comparison = "equals"
    target = "200"
}

resource "http_step" "my_request" {
    method = "GET"
    url = "${var.server}/ping"

    assertions = [
        "${http_assertion.status_200.id}",
    ]
}

resource "http_test" "my_test" {
    steps = [
        "${http_step.my_request.id}",
    ]
}

Run bluebook run in the directory where this file is stored to execute the tests. For more information on BCL and how to use Bluebook refer to the documentation page.