Child pages
  • Pillar Acceptance test
Skip to end of metadata
Go to start of metadata
A general pillar aceptance test is provide as part of the Reference Pillar Module.

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:

Setup

  1. 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=pillar-test-deploy&" -o bitrepository-reference-pillar.tar.gz
  2. Unpack it and cd into the pillar-tests directory.

    > tar -xzf bitrepository-reference-pillar-XXX-SNAPSHOT-pillar-test-deploy.tar.gz
    > cd pillar-tests
  3. Create the test structure, where the 4th and following arguments are the names of the pillars which needs to be tested.

    deploy/pillartests.sh create ${VERSION} ${PILLAR1} ${PILLAR2} ...

    This will perform the following steps:


    1. The pillar test of the indicated version will be downloaded and unpacked into a download folder.
    2. The unpacked directories, minus the lib dir will be added to a new local git repository.
    3. 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.
    4. 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.
  4. The pillar test now needs to be setup for the specific context.
    1. Setup client configuration. This means creating a conf dir in the mastertest dir containing the CollectionSettings.xmlReferenceSettings.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 a deploy/fetchconf.sh script, which retrieves this configurtion files. A example deploy/fetchconf.sh.example is included.
    2. Update the files under testprops in the mastertest to fit your test context. Note that the default pillar-integration-test.properties test is used to test locally started reference pillar using a locally started messagebus.
    3. Commit the mastertest changes to git

      git add conf/*
      git commit -m "Added Collection- and ReferenceSettings"
    4. For each pillar test 


      1. Pull the changes from mastertest:

        git pull
      2. Update the CollectionSettings to only recognize the pillar to test, eg. the test will ognore the other pillars.
      3. Update the pillar-integration-test.properties with the pillarID for the pillar to test. 

Running the tests

  1. Cd into test/$PILLAT2TEST

  2. Run the test script in the bin dir.
    1. For function testing: 

      bin/runpillartest.sh
    2. For function performance testing: 

      bin/runperformancetest.sh
    The concrete tests are defined in testprops/pillar-test.xml and testprops/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"
  • No labels