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

Both sides previous revisionPrevious revision
videos:testing_1 [2023/05/09 20:57] – [Transcript] crhallbergvideos:testing_1 [2023/05/09 20:58] (current) – [Transcript] crhallberg
Line 116: Line 116:
 // Complete ~/chrome-headless.sh: // // Complete ~/chrome-headless.sh: //
  
-  #!/bin/bash +<code bash> 
-  google-chrome --disable-gpu --headless --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --window=size="1366,768" --disable-extensions+#!/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>
  
 So I am going to copy my ''chrome-headless.sh'' to another script, which I'm going to call ''chrome-testmode.sh''. And I'm going to edit that. And I'm just going to take off the headless switch, so this is going to create all the same settings, but this will let me actually see what chrome is doing while the tests run, which can be useful, particularly if the test is failing and you want to see why. So I am going to copy my ''chrome-headless.sh'' to another script, which I'm going to call ''chrome-testmode.sh''. And I'm going to edit that. And I'm just going to take off the headless switch, so this is going to create all the same settings, but this will let me actually see what chrome is doing while the tests run, which can be useful, particularly if the test is failing and you want to see why.
Line 124: Line 125:
 // Complete ~/chrome-testmode.sh: // // Complete ~/chrome-testmode.sh: //
  
-  #!/bin/bash +<code bash> 
-  google-chrome --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --window=size="1366,768" --disable-extensions+#!/bin/bash 
 +google-chrome --disable-gpu --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --window=size="1366,768" --disable-extensions</code>
  
 So I have these two scripts now I can start up chrome in either headless mode or test mode, as I see fit and I don't have to type all of those many parameters anymore because they're all just saved in these convenient scripts. Alright, we're getting closer there is just one more script that we need to create, and this is going to be phing.xml in my home directory. We need this because, as I mentioned, there are all of these Phing properties that we need to be able to override and it's just more convenient to do that in the script, so we don't have to type them every time we run tests. So I have these two scripts now I can start up chrome in either headless mode or test mode, as I see fit and I don't have to type all of those many parameters anymore because they're all just saved in these convenient scripts. Alright, we're getting closer there is just one more script that we need to create, and this is going to be phing.xml in my home directory. We need this because, as I mentioned, there are all of these Phing properties that we need to be able to override and it's just more convenient to do that in the script, so we don't have to type them every time we run tests.
Line 175: Line 177:
 // Complete ~/phing.sh: // // Complete ~/phing.sh: //
  
-  #!/bin/bash +<code bash> 
-  source /home/dkatz/testenv.sh +#!/bin/bash 
-  if [ ! -e $VUFIND_HOME/vendor ] +source /home/dkatz/testenv.sh 
-  then +if [ ! -e $VUFIND_HOME/vendor ] 
-      cd $VUFIND_HOME +then 
-      composer install +    cd $VUFIND_HOME 
-  fi +    composer install 
-  $VUFIND_HOME/vendor/bin/phing -Dapacheconfdir="/etc/apache2/conf-enabled" -Dapachectl="sudo /etc/init.d/apache2" -Dmysqlrootpass=tutorial -Dvufindurl=http://localhost/vufind_test -Dmink_driver=chrome $*+fi 
 +$VUFIND_HOME/vendor/bin/phing -Dapacheconfdir="/etc/apache2/conf-enabled" -Dapachectl="sudo /etc/init.d/apache2" -Dmysqlrootpass=tutorial -Dvufindurl=http://localhost/vufind_test -Dmink_driver=chrome $*</code>
  
 So now if I say ''phing.sh startup'' again. It's going to automatically reinstall my dependencies for me, and then it will start up the system again. So now if I say ''phing.sh startup'' again. It's going to automatically reinstall my dependencies for me, and then it will start up the system again.
videos/testing_1.1683665834.txt.gz · Last modified: 2023/05/09 20:57 by crhallberg