kickoff.yml - Format

Table of contents

As usually, you learn best form an example:

defaults:
    target:
        port: 8080
        host: www.somehost.com
        scheme: http
        path: en/home


Sections:
    defaultwebsite:
        rules:
            - HttpHeaderExposePHP
            - HttpHeaderXSSProtectionSecure
    images:
        target:
            path: pics/image.png
        rules:
            - HttpHeaderHasFarFutureExpiresHeader:
                threshold: 604800

More complex examples can be found in the example folder in the sources.

defaults

The defaults block consists of the following options:

target:
        port: 8080
        host: www.somehost.com
        scheme: http
        path: en/home
        headers:
            - ["Accept-Encoding", "gzip"]
        auth:
            username: somename
            password: somepassword

Currently the target as well as default rules and rulesets can be preconfigured for all sections.
Obviously, you configure the website, you want to test. Any configuration element you use here, will be used as default for any of the sections urls unless you overwrite them. For more information see the Sections paragraph.

The possible options are:

config description
scheme The default is http. If you want to test your application using a differen scheme (such as https://), you can add this here.
host The exact domain name, that you want to check.
port This is the port of your website. If you do not need to explicitly append the port to the url because the website is delivered on a non standard port according to the protocoll, you do not need to add this configuration element.
path The path of the resource you want to check. Most likely you will leave this blank in the default configuration but will pass a specific resources url in the section config block.
headers Sometimes you need specific headers to test specific handling of a resource, e.g. a redirect to a websites mobile version when a certain user agent is set. You can add you desired headers here.
auth To test a page, which requires basic authentication. Use "username" and "password" to set the auth headers. Both values are required.

Sections, what is it?

This is the main configuration block. Here you configure certain sections of your site. A section groups a typical resource type, where you wish to run your tests against. The name is completley free choosable, as long as you take care about the yaml format.

Typical section names might be: website, image, stylesheets, javascripts, robots.txt, favicon.ico. As you can see, you can run tests against a basic website or any of the embedded resources seperatly.

Sections, how to configure?

After the name of the section, you can define 2 different blocks. The first block is the config block, the second one is the block to apply your rules..

The target block

This block is used to configure the exact path of the resource, you wish to test. If you already have setup your default target nicely, most likely only the path needs to be set. But as mentioned before, you can override any of the default targets elements.

The rules block

This is finally the location, where you add and configure the rules for the specific resource. For most current tests it will be sufficient to add the names of the rule. A list of rules can be found here.

If you are not happy with the default configuration of a rule: Some rules provide the possibilty to be reconfigured in your configuration. The reconfigurable variables can be set as a simple "key, value" pair. There can be multiple "key, value"-pairs per rule. See more at the Configuring Rules section.

Rules

Besides using and configuring existing rules, you can add custom rules and add those rules to the sections rule block. Read more about creating your own rules in the Custom Rules section.