Sha256: 2ecdb11f30b442c27366c6af984406a710d15315c7aede7855e941c817a8f0dd

Contents?: true

Size: 1.76 KB

Versions: 78

Compression:

Stored size: 1.76 KB

Contents

# Rake test tasks for running beaker

There are some rake tasks that you can use to run Beaker tests from your local project dir.

To use them from within your own project, you will need to require the following file in your project's rakefile:

    require 'beaker/tasks/test'

You will also need to have Beaker installed as part of your bundle.

When you run:

    rake --tasks

from your project dir, you should see (as well as any rake tasks you have defined locally)

    rake beaker:test[hosts,type]  # Run Beaker Acceptance
    rake beaker:test:git[hosts]   # Run Beaker Git tests
    rake beaker:test:pe[hosts]    # Run Beaker PE tests

The last two tasks assume that you have an options file in `/acceptance` named `beaker-git.cfg` and `beaker-pe.cfg` respectively.

Your options file would look something like:

    {
      :type            => 'git',
      :pre_suite       => ['./acceptance/setup/install.rb'],
      :hosts_file      => './acceptance/config/windows-2012r2-x86_64.cfg',
      :log_level       => 'debug',
      :tests           => ['./acceptance/tests/access_rights_directory', './acceptance/tests/identity',
                            './acceptance/tests/owner', './acceptance/tests/propagation',
                            './acceptance/tests/use_cases', './acceptance/tests/access_rights_file', './acceptance/tests/group',
                            './acceptance/tests/inheritance', './acceptance/tests/parameter_target', './acceptance/tests/purge'],
      :keyfile         => '~/.ssh/id_rsa-acceptance',
      :timeout         => 6000
    }

To use the more generic test task, you will need to pass in the type as the 2nd argument to the rake task:

    rake beaker:test[,smoke]

This will assume that you have created the file:

    acceptance/beaker-smoke.cfg

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
beaker-6.4.1 docs/how_to/rake_tasks.md
beaker-6.4.0 docs/how_to/rake_tasks.md
beaker-6.3.0 docs/how_to/rake_tasks.md
beaker-6.2.0 docs/how_to/rake_tasks.md
beaker-6.1.0 docs/how_to/rake_tasks.md
beaker-5.8.1 docs/how_to/rake_tasks.md
beaker-4.42.0 docs/how_to/rake_tasks.md
beaker-5.8.0 docs/how_to/rake_tasks.md
beaker-5.7.0 docs/how_to/rake_tasks.md
beaker-4.41.2 docs/how_to/rake_tasks.md
beaker-4.41.1 docs/how_to/rake_tasks.md
beaker-5.6.0 docs/how_to/rake_tasks.md
beaker-4.41.0 docs/how_to/rake_tasks.md
beaker-5.5.0 docs/how_to/rake_tasks.md
beaker-5.4.0 docs/how_to/rake_tasks.md
beaker-5.3.1 docs/how_to/rake_tasks.md
beaker-4.40.2 docs/how_to/rake_tasks.md
beaker-5.3.0 docs/how_to/rake_tasks.md
beaker-4.40.1 docs/how_to/rake_tasks.md
beaker-5.2.0 docs/how_to/rake_tasks.md