Warning: This page has not been updated in over over a year and may be outdated or deprecated.
videos:testing_1
This is an old revision of the document!
Table of Contents
Video 16: Testing, Part 1: Setting Up a Test Environment
The sixteenth VuFind instructional video discusses some tools for ensuring that VuFind's code is of high quality: style checkers/fixers and tests. After watching this video, you'll be able to automatically fix common problems with code style, spin up a brand new VuFind test instance with a single command line script, and run automated tests.
Video is available as an mp4 download or through YouTube.
Scripts
Several scripts are created during the course of this video; they are transcribed here for your convenience.
chrome-headless.sh
#!/bin/bash google-chrome --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --window-size="1366,768" --disable-extensions
chrome-testmode.sh
#!/bin/bash google-chrome --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --window-size="1366,768" --disable-extensions
phing.sh
#!/bin/bash # Set environmental variables source ~/testenv.sh # Reinstall dependencies if [ ! -e $VUFIND_HOME/vendor ] then cd $VUFIND_HOME composer install fi # Run phing with preferred parameters $VUFIND_HOME/vendor/bin/phing -Dextra_shutdown_cleanup="sudo chown -R {USER}:{USER} $VUFIND_HOME/local/cache" -Dapacheconfdir="/etc/apache2/conf-enabled" -Dapachectl="sudo /etc/init.d/apache2" -Dmysqlrootpass={PASSWORD} -Dvufindurl=http://localhost/vufind_test -Dmink_driver=chrome $*
testenv.sh
export VUFIND_HOME=/{path}/vufind export VUFIND_LOCAL=$VUFIND_HOME/local
Related Resources
Transcript
Coming soon!
videos/testing_1.1620148640.txt.gz · Last modified: 2021/05/04 17:17 by demiankatz