GithubHelp home page GithubHelp logo

isabella232 / beats-tester Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elastic/beats-tester

0.0 0.0 0.0 223 KB

E2E tests for the Beats

PowerShell 0.50% Shell 20.23% Makefile 22.79% Groovy 25.87% HTML 30.60%

beats-tester's Introduction

The Beats Tester

Vagrant + Ansible setup for testing the OS packages and basic e2e tests for all the Beats.

OS matrix

OS Support
awslinux
awslinux2
centos6-32
centos6-64
centos7-64
centos8-64
debian10-64
debian8-64
debian9-64
sles12-64
ubuntu1204-32
ubuntu1404-64
ubuntu1604-64
ubuntu1804-64
ubuntu2004-64
win12-64

Execute

First, you need to bring the machines up:

make setup

Then you can use Ansible to run the tests. Because they involve lots of VMs and commands executed over SSH, these tests are slow (currently 15 minutes in total). However, while creating tests or checking something quickly, you can use different Ansible commands to execute only a subset.

Here are some execution examples:

  • Test the most recent nightly builds (excluding OS X):

      RUN_SETTINGS=snapshot make run
    
  • All tests, all platforms, a particular release:

      # Edit version contained in run-settings-released.yml.
      RUN_SETTINGS=released make run
    
  • Only a particular Beat, Packetbeat in the example:

      export ANSIBLE_EXTRA_FLAGS="--tags packetbeat"
      make run
    
  • Only a particular OS, Debian 8 amd64 in the example:

      # Instead using 'make setup' launch vagrant machines manually.
      machine=tester-debian8-64
      vagrant up $machine
      vagrant ssh-config $machine > ssh_config
      export ANSIBLE_LIMIT="$machine"
      make run
    
  • Only a set of ansible groups in batches:

      # Run tests in batches for all hosts
      make batch
    
      # Run tests in batches for all Linux hosts
      GROUPS='centos debian sles' make batch
    
      # Run tests in batches for all Debian hosts
      GROUPS=debian make batch
    
      # Run tests in batches for Windows hosts
      GROUPS=windows make batch
    
  • Enable Ansible debug.

      export ANSIBLE_VERBOSE="-vvv"
      make run
    
  • Executing tests on your local macOS machine. In System Preferences -> Sharing enable Remote Login (SSH). Don't forget to disable Remote Login when you are done.

      export ANSIBLE_EXTRA_FLAGS="--ask-sudo-pass"
      export ANSIBLE_LIMIT="localhost"
      make run
    
  • To run just the APM Server tests, set ANSIBLE_EXTRA_FLAGS="--tags apm-server" in the environment.

Cleanup

You need to tear down the VMs when you are finished.

make clean

beats-tester's People

Contributors

andrewkroh avatar mikemadden42 avatar tsg avatar ruflin avatar v1v avatar elasticdog avatar monicasarbu avatar ph avatar kvch avatar adriansr avatar cachedout avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.