2 Replies Latest reply on Aug 27, 2009 7:59 AM by Roaders

    Tests do not run on Windows 2003 server

    Roaders Level 1

      I got all my unit tests running fine on my local machine but I had a few issues getting them to work on the build server.

       

      The first problem was that ant task was looking for c:\windows, the 2003 windows directory is c:\winnt.

       

      A change to WindowsSWFLauncher.java fixed this:

       

      private final String localTrustedDirectory = System.getenv( "windir" ) + "\\system32\\Macromed\\Flash\\FlashPlayerTrust\\";

       

      the next problem was that the FlashPlayerTrust directory didn't exist so I had to create it myself on the build server. (ant task should probably do this if it doesn't exist but my java skills aren't up to that!).

       

      At this point the runners got built and the trust file was created but the ant task timed out. If I ran the swf myself on the build server it launched but no tests ran. I manually created a trust file that trusted my whole deploy directory. The runners then launched ok and all reports got built.

       

      I think the reason the trust file didn't work is because the file location in the ant task generated cfg file is:

       

      C:\Build\AntWorkspace-FlexClient\ant\..\DEPLOY\REPORT\myRunner.swf

       

      when it should be

       

      C:\Build\AntWorkspace-FlexClient\DEPLOY\REPORT\myRunner.swf

       

      I imagine that this would be a fairly simple problem to fix.

        • 1. Re: Tests do not run on Windows 2003 server
          legrosb Level 3

          @Roaders - Thanks for the footwork on this.  I'll get the suggested fix into a patch and off to Mike.  Unforunately, the path that's being written to the local trust file involves a fix for the Ant task to handle absoluate path conversion for the SWF path that's passed in the SWF attribute.  The way we're launching the flash player on the Mac has proven to make this promblematic, so we haven't implemented the fix yet.  When it's in place though, the absolute path to the SWF should show up correctly in the file.  I'm gonna look into the FP security spec as well and see if we can grant the entire directory holding the TestRunner.swf local trust or not.  Thanks again for the help, hopefully this weekend I can dive in.

           

          -Brian

          • 2. Re: Tests do not run on Windows 2003 server
            Roaders Level 1

            No problem.

             

            You can grant access for a whole directory, it grants access for subdirectories as well. This is how I have got it working on my machine and on the build server.