TestingHudson

Ondřej Košarko edited this page Jan 11, 2016 · 1 revision

{{toc}}

Testing using Hudson

Plugging in selenium

  • create firefox-bin in /usr/bin pointing to /usr/lib/firefox/firefox because selenium wants to start firefox directly (not through .sh)
  • ant + testng + default selenium plugins do not work nicely, so you have to use testng plugins for displaying
  • there should be collections including more than 1 page of results
  • e.g., import #642

Hudson job script (simplified)

git submodule init
git submodule update

cp /opt/ufal-configs/local.conf config
cp /opt/ufal-configs/utilities.properties.local  Utilities/conf/
cd scripts

########## 1st timers
#make setup
#sudo make create_utilities_database
#sudo make create_database
##########

make update_utilities

########## 1st timers
#sudo make new_deploy
##########

sudo make deploy_guru

########## 1st timers
###sudo /installations/dspace/hudson/bin/dspace create-administrator
##########

sudo make init_statistics
sudo make init_indicies
sudo /installations/dspace/hudson/bin/dspace update-discovery-index
sudo make restart

Hudson job script (redeployment)

# located in /var/lib/hudson/jobs/
whoami
mvn -version
java -version
which mvn

cp /opt/ufal-configs/master-dev.local.conf config/local.conf
cd scripts

#########################################################
# Redeployment
#########################################################

sudo make clean_source || echo "cleaning not successful"
sudo make setup
sudo make deploy_guru
sudo make update_indicies
sudo make update_statistics
sudo make update_discovery
sudo make update_oai
sudo make restart
sudo make restart

Meaningful reports from maven

you can add to pom.xml e.g.,

+
+<!--
+  UFAL info
+-->
+         <reporting>
+            <plugins>
+              <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+                <version>2.6</version>
+                <reportSets>
+                  <reportSet>
+                    <reports><!-- select reports -->
+                      <report>index</report>
+                    </reports>
+                  </reportSet>
+                </reportSets>
+              </plugin>
+
+                  <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>findbugs-maven-plugin</artifactId>
+                  </plugin>
+            </plugins>
+          </reporting>
+
+
+
     <!--
        Runtime and Compile Time dependencies for DSpace.
     -->
     <build>
         <plugins>
+
+<!--
+  needed for UFAL info
+-->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>3.3</version>
+      </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>

see http://svn.ms.mff.cuni.cz/redmine/projects/dspace-modifications/repository/revisions/979b57161e3b46bacab160f851ba19292d205306/diff/sources/dspace-api/pom.xml

and use findbugs plugin in hudson

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.