<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unit testing: Various notes in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-various-notes/m-p/41555#M22261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been getting the unit-tests to run on the released version for both Windows and Linux. Here are some notes on the problems I found. I've raised bugs for most of the things I've found, so I've provided links from here and the bug report contains the detail. Hopefully this'll be of help to anyone else trying to run the unit tests.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Core&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.util.exec.RuntimeExecTest&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Will fail on Linux. Details in &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/jira/browse/AR-306" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/jira/browse/AR-306&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Repository&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.content.AbstractContentReadWriteTest.testGetReader()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Will fail on Linux. Details in &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/jira/browse/AR-307" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/jira/browse/AR-307&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.content.AbstractContentReadWriteTest.testDelete()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Will fail on Linux. Details in &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/jira/browse/AR-308" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/jira/browse/AR-308&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.content.metadata.OfficeMetadataExtracterTest&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.content.metadata.TextMiningContentTransformerTest.testBugFixAR1()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Missing files quick.doc and farmers_markets_list_2003.doc cause these to fail. See &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/forums/viewtopic.php?t=489" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/forums/viewtopic.php?t=489&lt;/A&gt;&lt;SPAN&gt;, and thanks to Robin Bramley for his helpful response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.content.metadata.UnoMetadataExtractorTest&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed on my Linux system as I had OpenOffice 1.1.2 installed. Upgrading&amp;nbsp; to 2.0 fixed it. Note that this test won't run and will report success unless the open office demon is accepting connections.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.content.transform.AbstractContentTransformerTest.testAllConversions()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Will fail on Linux. Details in &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/jira/browse/AR-309" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/jira/browse/AR-309&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.content.transform.StringExtractingContentTransformerTest.testDirectTransform()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;This failure turned out to be related to the default encoding that I was using on Linux. I was using UTF-8 and the javac was using that encoding when compiling. Running "export LANG=en_GB.ISO-8859-1" and recompiling fixed the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.policy.ClassBehaviourBinding&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;General error that the tests showed up. See &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/jira/browse/AR-310" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/jira/browse/AR-310&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.search.SearcherComponentTest.testLikeAndContains()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Will fail on all systems. Details at &lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/jira/browse/AR-311" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/jira/browse/AR-311&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.search.ISO9075Test.test*()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;As for StringExtractingContentTransformerTest, this test failed due to the encoding in use for my user on Linux. Running "export LANG=en_GB.ISO-8859-1" and recompiling fixed the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.search.impl.lucene.LuceneSearch&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Causes a sigsegv error on my Linux system. I've removed the test for now pending further investigation. I'll post more when I get it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;org.alfresco.repo.lock.LockBehaviourImplTest.testVersionServiceLockBehaviour01()&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Caused all following tests to fail by leaving the details for goodUser and badUser in the database, despite the transaction being rolled back. This turned out to be caused by my MySQL Db using InnoDB as the table type when the Alfresco tables were created. I dropped the database, changed MySQL so that the the default engine type was InnoDB and ran the test again and all was fine. See &lt;/SPAN&gt;&lt;A href="http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html" rel="nofollow noopener noreferrer"&gt;http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html&lt;/A&gt;&lt;SPAN&gt; for more info. I'm running MySQL version 4.1.12.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that was about the lot. The tests now run through, with the exception of the segv error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A couple of other test tips. You can run all the tests for a single project as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;cd projects/&amp;lt;project-name&amp;gt;&lt;BR /&gt;ant -f project-build.xml run-tests&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;where project name might be "repository" or "core".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can run a single test case like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;cd projects/&amp;lt;project-name&amp;gt;&lt;BR /&gt;ant -f project-build.xml run-test -Dtestcase=full.name.of.TestClass&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope all this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ian.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2005 18:01:26 GMT</pubDate>
    <dc:creator>ianpriest</dc:creator>
    <dc:date>2005-12-09T18:01:26Z</dc:date>
    <item>
      <title>Unit testing: Various notes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-various-notes/m-p/41555#M22261</link>
      <description>I've been getting the unit-tests to run on the released version for both Windows and Linux. Here are some notes on the problems I found. I've raised bugs for most of the things I've found, so I've provided links from here and the bug report contains the detail. Hopefully this'll be of help to anyone</description>
      <pubDate>Fri, 09 Dec 2005 18:01:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-various-notes/m-p/41555#M22261</guid>
      <dc:creator>ianpriest</dc:creator>
      <dc:date>2005-12-09T18:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unit testing: Various notes</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/unit-testing-various-notes/m-p/41556#M22262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for being so rigorous with our tests and taking the effort to raise bugs.&amp;nbsp; We'll get to the fixes as soon as we can.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2005 18:17:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/unit-testing-various-notes/m-p/41556#M22262</guid>
      <dc:creator>davidc</dc:creator>
      <dc:date>2005-12-09T18:17:57Z</dc:date>
    </item>
  </channel>
</rss>

