QA Test Tools

From Koha Wiki

Jump to: navigation, search
Home
Home
Home > Documentation
Home > Documentation > Installation
Koha > Technical > Administration
Koha > Technical > Development
Koha > Technical > Development > Quality Assurance Testing

Contents

Introduction

This page assumes a git installation of Koha has been done, and that you have koha-deps and koha-perldeps installed, and are generally saavy enough to recognize that the instructions are only for a guideline, and not necessarily intended to be cut-and-paste mindlessly. However, boxes have been placed around things you may wish to cut-and-paste. And if there is prompting, the boxes are split apart.

Get The Source

cd
git clone git://git.koha-community.org/qa-test-tools.git

Configure Dependencies

sudo apt-get install libfile-chdir-perl libgit-repository-perl liblist-compare-perl \
libmoo-perl libperl-critic-perl libsmart-comments-perl dh-make-perl libtest-perl-critic-progressive-perl cpanminus

And to be on the safe side, run the perl-deps file through cpanm.

sudo cat perl-deps | cpanm

Also, you must read the README file in your qa-test-tools git directory. This is where up-to-date information about the tool will be available.

Setup Configuration Files

ln -s ~/qa-test-tools/perlcriticrc ~/.perlcriticrc
mkdir ~/bin
ln -s ~/qa-test-tools/koha-qa.pl ~/bin/koha-qa.pl

Next, set up PERL5LIB to include /home/{your user name}/qa-test-tools (remember the delimiter between items is a colon). This can be done in /etc/environment or your .bashrc file (remember to put export in front for the .bashrc). You want it in the same place as you did the configuration for Koha's required PERL5LIB.

Logout and log in for the environment variables to take effect.

Test It

cd ~/qa-test-tools
prove -v t/Perl.t

This hopefully will not fail. If it does, resolve the problems.

Change into the directory where Koha was cloned for your git installation.

koha-qa.pl -v 2 -c 1

Hopefully it will run and give pretty PASSes or FAILs. Worst case scenario a dependency was missed. If so, find it, install it, and rerun the koha-qa.pl script.

Documentation

Type koha-qa.pl without any options to get a list of available options, or

perldoc ~/qa-test-tools/koha-qa.pl
Personal tools