Changeset 3687


Ignore:
Timestamp:
Apr 26, 2010, 9:08:06 AM (13 years ago)
Author:
Gregory Vincic
Message:

Refs #681. Fixed FileLocatorTest?, though test data needs to be updated on server. Am thinking of putting most test data into subversion and instead keep it small. It wont change much anyway.

Location:
trunk/client/servlet/test
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/servlet/test/build.xml

    r2597 r3687  
    3838  <property name="dist" location="dist" />
    3939  <property name="test" location="test" />
     40 <property environment="env"/>
     41  <path id="classpath">
     42    <fileset dir="../../external">
     43      <include name="**/*.jar" />
     44    </fileset>
     45
     46    <dirset dir="${build}" />
     47
     48  </path>
     49
    4050  <path id="classpath">
    4151    <fileset dir="../../../api/external">
     
    4353    </fileset>
    4454    <dirset dir="../build" />
    45     <dirset dir="../../../api/core/build" />
    46     <dirset dir="../../../api/core/test/build" /> <!-- Includes PropertiesFile -->
    47     <dirset dir="../../../api/waf/build" />
     55  <pathelement location="${env.CATALINA_HOME}/webapps/proteios/WEB-INF/lib"/>
     56    <pathelement location="${env.CATALINA_HOME}/webapps/proteios/WEB-INF/classes"/>
    4857    <dirset dir="${build}" />
    4958  </path>
     
    5564  <target name="compile">
    5665    <mkdir dir="${build}" />
     66  <copy file="${src}/test.properties" todir="${build}" />
    5767    <javac encoding="ISO-8859-1" srcdir="${src}" destdir="${build}" classpathref="classpath" debug="true" deprecation="true">
    5868      <compilerarg value="-Xlint:unchecked" />
     
    7888       All tests should run quietly unless something goes wrong.
    7989       -->   
    80     <junit printsummary="false" haltonfailure="true" forkmode="once" reloading="false">
    81       <formatter type="brief" usefile="false" />
     90    <junit printsummary="true" haltonfailure="false" forkmode="once" reloading="false">
     91      <formatter type="brief" />
    8292      <classpath refid="classpath" />
    8393      <batchtest>
    8494        <fileset dir="${build}">
    85           <include name="**/*Test.class" />
    86         </fileset>
    87         <fileset dir="${build}">
    88           <include name="**/Test*.class" />
     95          <include name="**/*Test*.class" />
    8996        </fileset>
    9097      </batchtest>
  • trunk/client/servlet/test/src/org/proteios/FileLocatorTest.java

    r2597 r3687  
    7777  {
    7878    FileLocator local = new FileLocator();
    79     List<File> files = local.find(dir, true, Pattern
    80       .compile(".*\\.ext\\.jar"));
     79    List<File> files = local.find(dir, true, Pattern.compile("corrupt_mzdata.xml"));
    8180    assertNotNull(files);
    82     assertEquals(2, files.size());
     81    assertEquals(1, files.size());
    8382    //
    84     files = local.find(dir, false, Pattern.compile(".*\\.ext\\.jar"));
     83    files = local.find(dir, false, Pattern.compile("no_such_file"));
    8584    assertNotNull(files);
    8685    assertEquals(0, files.size());
    87     //
    88     files = local.find(dir, true, Pattern.compile(".*\\.xml"));
    89     assertNotNull(files);
    90     assertEquals(5, files.size());
    91     //
    92     files = local.find(dir, true, Pattern.compile(".*"));
    93     assertNotNull(files);
    94     assertEquals(8, files.size());
    9586  }
    9687
     
    119110    FileLocator local = new FileLocator();
    120111    List<File> files = local.find(dir, true, Pattern
    121       .compile("helloWorld\\.ext\\.jar"));
     112      .compile("myExtension.*\\.ext\\.jar"));
    122113    assertEquals(1, files.size());
    123114    List<JarEntry> result = local.find(files.get(0), Pattern
    124115      .compile(".*\\.class"));
    125116    assertNotNull(result);
    126     assertEquals(1, result.size());
     117    assertEquals(3, result.size());
    127118  }
    128119}
  • trunk/client/servlet/test/src/org/proteios/PropertiesFile2.java

    r1916 r3687  
    4646   * ftp://bioinfo.thep.lu.se/proteios
    4747   */
    48   public static final String TEST_DATA = "test.data";
     48  public static final String TEST_DATA = "test.data.url";
    4949
    5050
  • trunk/client/servlet/test/src/test.properties

    r2597 r3687  
    11# $Id$
    22
    3 # Copyright (C) 2007 Gregory Vincic
     3# Copyright (C) 2007 Olle Mansson
    44
    55# This file is part of Proteios
     
    2323# Copy this file to test.properties and make necessary configuration
    2424# before running the tests.
    25  
    26 test.data = file:///home/leo/gregory/workspace/proteios-trunk/testData
     25
     26# Html output directory (relative to $test.build)
     27test.html.out=./html_out
     28
     29# Webunit
     30proteios.url=http://localhost:8080/proteios/app
     31test.username=demo
     32test.password=demo
     33number.of.users=20
     34number.of.iterations=5
     35load.time=500
     36
     37# TestMzDataExporterOnly (database integer id of PeakListSet to export)
     38peaklistset.id.to.test=1
     39
     40# Test data input directory url
     41# If local, "file://" + absolute path
     42test.data.url=file:///scratch/leo/gregory/proteiosData/testData
Note: See TracChangeset for help on using the changeset viewer.