About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
videos:testing_1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
videos:testing_1 [2021/05/04 17:06] – created demiankatzvideos:testing_1 [2021/05/04 17:17] demiankatz
Line 1: Line 1:
 ====== Video 16: Testing, Part 1: Setting Up a Test Environment ====== ====== Video 16: Testing, Part 1: Setting Up a Test Environment ======
  
-// Details coming soon! //+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 [[https://vufind.org/video/Testing1.mp4|mp4 download]] or through [[https://www.youtube.com/watch?v=69ocC-VALXY&feature=youtu.be|YouTube]]. 
 + 
 +===== Scripts ===== 
 + 
 +Several scripts are created during the course of this video; they are transcribed here for your convenience. 
 + 
 +==== chrome-headless.sh ==== 
 + 
 +<code bash> 
 +#!/bin/bash 
 +google-chrome --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --window-size="1366,768" --disable-extensions</code> 
 + 
 +==== chrome-testmode.sh ==== 
 + 
 +<code bash> 
 +#!/bin/bash 
 +google-chrome --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --window-size="1366,768" --disable-extensions</code> 
 + 
 +==== phing.sh ==== 
 + 
 +<code bash> 
 +#!/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 $* 
 +</code> 
 + 
 +==== testenv.sh ==== 
 + 
 +<code bash> 
 +export VUFIND_HOME=/{path}/vufind 
 +export VUFIND_LOCAL=$VUFIND_HOME/local 
 +</code> 
 + 
 +===== Related Resources ===== 
 + 
 +  - [[development:recommended_tools#meeting_project_standards|Recommended Tools for Meeting Project Standards]] 
 +  - [[development:testing:unit_tests|Unit Testing Documentation]] 
 + 
 +===== Transcript ===== 
 + 
 +// Coming soon! // 
 ---- struct data ---- ---- struct data ----
 ---- ----
  
videos/testing_1.txt · Last modified: 2023/05/09 20:58 by crhallberg