Vespa system tests framework
The Vespa system test framework is an automatic testing tool for creating and running system tests. It is loosely based upon the methodology used in JUnit and similar unit test frameworks, but it has added functionality for testing at system level using multiple nodes. It is written in pure Ruby.
Table of Contents
Repo layout: Library files that contain the framework itself are in lib/, the tests are in tests/ and utilities and automatic runners are in bin/.
Multinode testing is well supported since the framework is largely based upon RPC calls using DRb (distributed ruby). Methods for feeding data, checking an online index or doing a query and so on are executed in the context of one of the nodes in the Vespa installation. Each of the nodes must be running a ruby process called node_server.rb that acts as a server for the RPC calls.
Follow these steps to install.
1. Create CentOS 7 dev environment
Follow the 'Create dev environment' section in: Create C++ / Java dev environment on CentOS using VirtualBox and Vagrant
2. Add Vespa systemtest runtime dependencies:
sudo yum -y install \ libxml2-devel \ rh-ruby23-rubygems-devel \ rh-ruby23-ruby-devel \ rh-ruby23
3. Add more Vespa systemtest runtime dependencies:
sudo bash . /opt/rh/rh-ruby23/enable gem install libxml-ruby gnuplot distribution exit
4. Clone the system-test repo
git clone email@example.com:vespa-engine/system-test.git
1. Compile vespa:
cd $HOME/git/vespa sh bootstrap.sh java mvn --batch-mode --threads 2C -nsu install -DskipTests -Dmaven.javadoc.skip=true sh bootstrap-cpp.sh -u . . make -j 5 make install
2. Run systemtests in newly created Vespa systemtest enviroment
2.1 Modify .bash_profile to include the following in PATH:
2.2 Ensure hostname is set to localhost
sudo hostname localhost
2.3 In terminal window 1
2.4 In terminal window 2
cd $HOME/git/system-test cd tests/search/basicsearch runtest.sh basic_search.rb
We welcome contributions - see Contributing.md
Code licensed under the Apache 2.0 license. See LICENSE for terms.