Pillar Acceptance test
Contains test for investigating the function aspects of deployed pillars. Multiple pillars can be tested at the same time, typically the pillars contributing to a collection. Both full pillars and checksum pillars can be investigated. Examples of the newest test reports for the reference pillars can be found here:
See this for Pillar test specification.
Setup
Download the test deployment script tar.gz. Either through the browser or use curl:
curl -sS -L "https://sbforge.org/nexus/service/local/artifact/maven/redirect?g=org.bitrepository.reference&a=bitrepository-reference-pillar&v=LATEST&r=snapshots&p=tar.gz&c=acceptance-test-deploy" -o bitrepository-reference-pillar.tar.gz
Unpack it and cd into the
pillar-tests
directory.> tar -xzf bitrepository-reference-pillar.tar.gz > cd pillar-tests
Create the test structure, where the 3rd and following arguments are the names of the pillars which needs to be tested. The ${VERSION} should refers to the version of the bitrepository.org reference code used for acceptance test
deploy/pillartests.sh create ${VERSION} ${PILLAR1} ${PILLAR2} ...
This will perform the following steps:
- The pillar test of the indicated version will be downloaded and unpacked into a download folder.
- The unpacked directories, minus the lib dir will be added to a new local git repository.
- The new directory 'mastertest' will be created based on a pull clone the download git repository. The purpose of this dir is to manage the local changes which needs to be done to the files used for configuring the tests.
- A test folder is created with a sub folder for each pillar test. Each pillar dir is a clone of the master test repository. Pillar specific modifications can be made to the files here.
- The pillar test now needs to be setup for the specific context.
- Setup client configuration. This means creating a conf dir in the
mastertest
dir containing theRepositorySettings.xml
,ReferenceSettings.xml and the client certificate
to use in the test. This will typically be the settings used in the collection with the pillars to test. This can be automated by creation adeploy/fetchconf.sh
script, which retrieves this configurtion files. A example deploy/fetchconf.sh.example is included. - Update the files under testprops in the
mastertest
to fit your test context. Note that the defaultpillar-integration-test.properties
test is used to test locally started reference pillar using a locally started messagebus. Commit the
mastertest
changes to gitgit add conf/* git commit -m "Added Repository- and ReferenceSettings"
For each pillar test
Pull the changes from
mastertest
:git pull
- Update the
RepositorySettings
to only recognize the pillar to test, eg. the test will ognore the other pillars. - Update the
pillar-integration-test.properties
with the pillarID for the pillar to test.
- Setup client configuration. This means creating a conf dir in the
Running the tests
Cd into test/$PILLAT2TEST
- Run the test script in the bin dir.
For function testing:
bin/runpillartest.sh
For function performance testing:
bin/runperformancetest.sh
testprops/pillar-test.xml
andtestprops/pillar-performance-test.xml
files. Additional configurations can be found in the testprops/pillar-integration-test.properties file.
Updating the tests
deploy/pillartests.sh update $VERSION
If no version is supplied the tests are updated to the latest snapshot
Customizing tests
Running checksum pillar tests
The default test suite will run a full pillar test. If a checksum pillar needs to be tested, the line
TEST_FILE="testprops/full-pillar-test.xml"
in the bin/runpillartest.sh
file should be change to point to the checkpillar test file (runs the checksumPillarTest group of tests).
TEST_FILE="testprops/checksum-pillar-test.xml"