7 Replies Latest reply on Jun 3, 2010 4:53 PM by mlabriola

    "C:\Users\dmoore" in FlexUnit4 swc

    zdmytriv

      Failed to run tests. Got "initializationError"

       

      How come there is hardcoded path in FlexUnit4 SWC files "C:\Users\dmoore\..."?

       

      Could you please rebuild FlexUnit4 libraries to use relative paths?

       

      My OS: Ubuntu 9.10

       

      Stacktrace:

      at org.flexunit.runners::BlockFlexUnit4ClassRunner/validateInstanceMethods()[C:\Users\dmoore \Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:221]
      at org.flexunit.runners::BlockFlexUnit4ClassRunner/collectInitializationErrors()[C:\Users\dm oore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:207]
      at org.flexunit.runners::ParentRunner/validate()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\ParentRunner.as:267]
      at org.flexunit.runners::ParentRunner()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\ParentRunner.as:123]
      at org.flexunit.runners::BlockFlexUnit4ClassRunner()[C:\Users\dmoore\Documents\_Production\F lex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:99]
      at org.flexunit.internals.builders::FlexUnit4Builder/runnerForClass()[C:\Users\dmoore\Docume nts\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\FlexUnit4Builder.as:61]
      at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[C:\Users\dmoore\Docume nts\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
      at org.flexunit.internals.builders::AllDefaultPossibilitiesBuilder/runnerForClass()[C:\Users \dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\AllDefaultPossibilitiesBuilder.as:106 ]
      at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[C:\Users\dmoore\Docume nts\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
      at org.flexunit.runners.model::RunnerBuilderBase/localRunners()[C:\Users\dmoore\Documents\_P roduction\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:119]
      at org.flexunit.runners.model::RunnerBuilderBase/runners()[C:\Users\dmoore\Documents\_Produc tion\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:87]
      at org.flexunit.runners::Suite()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\Suite.as:170]
      at org.flexunit.internals.builders::MetaDataBuilder/buildWithSecondSignature()[C:\Users\dmoo re\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:174]
      at org.flexunit.internals.builders::MetaDataBuilder/buildRunner()[C:\Users\dmoore\Documents\ _Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:146]
      at org.flexunit.internals.builders::MetaDataBuilder/runnerForClass()[C:\Users\dmoore\Documen ts\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:115]
      at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[C:\Users\dmoore\Docume nts\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
      at org.flexunit.internals.builders::AllDefaultPossibilitiesBuilder/runnerForClass()[C:\Users \dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\internals\builders\AllDefaultPossibilitiesBuilder.as:106 ]
      at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[C:\Users\dmoore\Docume nts\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
      at org.flexunit.runners.model::RunnerBuilderBase/localRunners()[C:\Users\dmoore\Documents\_P roduction\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:119]
      at org.flexunit.runners.model::RunnerBuilderBase/runners()[C:\Users\dmoore\Documents\_Produc tion\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:87]
      at org.flexunit.runners::Suite()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runners\Suite.as:170]
      at org.flexunit.runner::Request$/classes()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runner\Request.as:201]
      at Function/http://adobe.com/AS3/2006/builtin::apply()
      at org.flexunit.runner::FlexUnitCore/runClasses()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:191]
      at Function/http://adobe.com/AS3/2006/builtin::apply()
      at org.flexunit.runner::FlexUnitCore/run()[C:\Users\dmoore\Documents\_Production\Flex Unit 4\GIT\FlexUnit4\src\org\flexunit\runner\FlexUnitCore.as:171]
      at FlexUnitTestProject/onApplicationCreationComplete()[/home/zenyk/workspace/Projects/Flex/F lexUnitTestProject/src/FlexUnitTestProject.mxml:22]
      at FlexUnitTestProject/___FlexUnitTestProject_Application1_creationComplete()[/home/zenyk/wo rkspace/Projects/Flex/FlexUnitTestProject/src/FlexUnitTestProject.mxml:7]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\co re\UIComponent.as:12266]
      at mx.core::UIComponent/set initialized()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1577]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:759]
      at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1072]

        • 1. Re: "C:\Users\dmoore" in FlexUnit4 swc
          mlabriola Level 4

          That path isn't what you think it is.

           

          When Flex builds a SWC file with debug information it keeps the path information from where the files existed when the user built them. This information is not used in anyway at runtime. Presently there is no way to tell the Flex compiler not to keep that information, but again, it isn't as though FlexUnit is looking for data in that directory or something similar.

           

          However, I would like to know where you grabbed the current code you are using from. Any code with a dmoore path is development code and shouldn't have leaked out into any of our release builds.

           

          I would *strongly* encourage you to grab the latest downloads from the flexunit site (http://www.flexunit.org/?page_id=14) or our build system (builds.flexunit.org) as you definitely have some outdated code. A library mismatch is the cause of the error you are seeing.

           

          Mike

          • 2. Re: "C:\Users\dmoore" in FlexUnit4 swc
            zdmytriv Level 1

            I took the latest code from the page you pointed and got similar exception but with "E:\hudson\jobs\..." build path this time. Could you please help me to debug this issue.

             

            I created Flex Project. Copied flexunit-4.0.0.swc and flexunit-uilistener-4.0.0.swc into libs directory. Wrote simple test unit and on application creationComplete created calling this method:

             

                        private function onApplicationCreationComplete(event:Event):void
                        {
                            core = new FlexUnitCore();
                            core.addListener(new UIListener(uiListener));
                            core.run( sampleSuite.SampleSuite );
                        }

             

            What I'm doing wrong?

             

            Stacktrace:

             

            at org.flexunit.runners::BlockFlexUnit4ClassRunner/validateInstanceMethods()[E:\hudson\jobs\ FlexUnit4-Flex4\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as: 221]
            at org.flexunit.runners::BlockFlexUnit4ClassRunner/collectInitializationErrors()[E:\hudson\j obs\FlexUnit4-Flex4\workspace\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner .as:207]
            at org.flexunit.runners::ParentRunner/validate()[E:\hudson\jobs\FlexUnit4-Flex4\workspace\Fl exUnit4\src\org\flexunit\runners\ParentRunner.as:267]
            at org.flexunit.runners::ParentRunner()[E:\hudson\jobs\FlexUnit4-Flex4\workspace\FlexUnit4\s rc\org\flexunit\runners\ParentRunner.as:123]
            at org.flexunit.runners::BlockFlexUnit4ClassRunner()[E:\hudson\jobs\FlexUnit4-Flex4\workspac e\FlexUnit4\src\org\flexunit\runners\BlockFlexUnit4ClassRunner.as:99]
            at org.flexunit.internals.builders::FlexUnit4Builder/runnerForClass()[E:\hudson\jobs\FlexUni t4-Flex4\workspace\FlexUnit4\src\org\flexunit\internals\builders\FlexUnit4Builder.as:61]
            at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[E:\hudson\jobs\FlexUni t4-Flex4\workspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
            at org.flexunit.internals.builders::AllDefaultPossibilitiesBuilder/runnerForClass()[E:\hudso n\jobs\FlexUnit4-Flex4\workspace\FlexUnit4\src\org\flexunit\internals\builders\AllDefaultP ossibilitiesBuilder.as:106]
            at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[E:\hudson\jobs\FlexUni t4-Flex4\workspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
            at org.flexunit.runners.model::RunnerBuilderBase/localRunners()[E:\hudson\jobs\FlexUnit4-Fle x4\workspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:119]
            at org.flexunit.runners.model::RunnerBuilderBase/runners()[E:\hudson\jobs\FlexUnit4-Flex4\wo rkspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:87]
            at org.flexunit.runners::Suite()[E:\hudson\jobs\FlexUnit4-Flex4\workspace\FlexUnit4\src\org\ flexunit\runners\Suite.as:170]
            at org.flexunit.internals.builders::MetaDataBuilder/buildWithSecondSignature()[E:\hudson\job s\FlexUnit4-Flex4\workspace\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder. as:174]
            at org.flexunit.internals.builders::MetaDataBuilder/buildRunner()[E:\hudson\jobs\FlexUnit4-F lex4\workspace\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:146]
            at org.flexunit.internals.builders::MetaDataBuilder/runnerForClass()[E:\hudson\jobs\FlexUnit 4-Flex4\workspace\FlexUnit4\src\org\flexunit\internals\builders\MetaDataBuilder.as:115]
            at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[E:\hudson\jobs\FlexUni t4-Flex4\workspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
            at org.flexunit.internals.builders::AllDefaultPossibilitiesBuilder/runnerForClass()[E:\hudso n\jobs\FlexUnit4-Flex4\workspace\FlexUnit4\src\org\flexunit\internals\builders\AllDefaultP ossibilitiesBuilder.as:106]
            at org.flexunit.runners.model::RunnerBuilderBase/safeRunnerForClass()[E:\hudson\jobs\FlexUni t4-Flex4\workspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:63]
            at org.flexunit.runners.model::RunnerBuilderBase/localRunners()[E:\hudson\jobs\FlexUnit4-Fle x4\workspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:119]
            at org.flexunit.runners.model::RunnerBuilderBase/runners()[E:\hudson\jobs\FlexUnit4-Flex4\wo rkspace\FlexUnit4\src\org\flexunit\runners\model\RunnerBuilderBase.as:87]
            at org.flexunit.runners::Suite()[E:\hudson\jobs\FlexUnit4-Flex4\workspace\FlexUnit4\src\org\ flexunit\runners\Suite.as:170]
            at org.flexunit.runner::Request$/classes()[E:\hudson\jobs\FlexUnit4-Flex4\workspace\FlexUnit 4\src\org\flexunit\runner\Request.as:201]
            at Function/http://adobe.com/AS3/2006/builtin::apply()
            at org.flexunit.runner::FlexUnitCore/runClasses()[E:\hudson\jobs\FlexUnit4-Flex4\workspace\F lexUnit4\src\org\flexunit\runner\FlexUnitCore.as:191]
            at Function/http://adobe.com/AS3/2006/builtin::apply()
            at org.flexunit.runner::FlexUnitCore/run()[E:\hudson\jobs\FlexUnit4-Flex4\workspace\FlexUnit 4\src\org\flexunit\runner\FlexUnitCore.as:171]
            at FlexUnitTestProject/onApplicationCreationComplete()[/home/zenyk/workspace/Projects/Flex/F lexUnitTestProject/src/FlexUnitTestProject.mxml:22]
            at FlexUnitTestProject/___FlexUnitTestProject_Application1_creationComplete()[/home/zenyk/wo rkspace/Projects/Flex/FlexUnitTestProject/src/FlexUnitTestProject.mxml:7]
            at flash.events::EventDispatcher/dispatchEventFunction()
            at flash.events::EventDispatcher/dispatchEvent()
            at mx.core::UIComponent/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\co re\UIComponent.as:12266]
            at mx.core::UIComponent/set initialized()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1577]
            at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:759]
            at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1072]

            • 3. Re: "C:\Users\dmoore" in FlexUnit4 swc
              mlabriola Level 4

              Yep, I will be glad to help.

               

              Okay, that method is checking to see if you have any tests labeled with the [Test] meta data and if those functions are public, take no params and return void.

               

              Can you ensure that sampleSuite.SampleSuite has at least one such method?

               

              Also, just to remove a variable, let's just use the trace output now and ignore the UI. So change your run to look like this:

               

                          private function onApplicationCreationComplete(event:Event):void
                          {
                              core = new FlexUnitCore();
                              core.addListener(new TraceListener() );
                              core.run( sampleSuite.SampleSuite );
                          }

               

              You will need to import TraceListener.

               

              Mike

              • 4. Re: "C:\Users\dmoore" in FlexUnit4 swc
                zdmytriv Level 1
                Okay, that method is checking to see if you have any tests labeled with the [Test] meta data and if those functions are public, take no params and return void.

                Yep that helped. Now everything works fine. Just added [Test] metatag to test methods.

                 

                Thanks!

                • 5. Re: "C:\Users\dmoore" in FlexUnit4 swc
                  mlabriola Level 4

                  Cool.

                   

                  Did you grab your original files from the flexunit site or somewhere else? I would just like to hunt down the place where you found that dmoore reference

                   

                  Mike

                  • 6. Re: "C:\Users\dmoore" in FlexUnit4 swc
                    zdmytriv Level 1

                    I took FlexUnit4.swc and FlexUnit4UIListener.swc from turnkey http://www.flexunit.org/?page_id=14.

                     

                    Also I was poking around and found it shared in somebodies dropbox at http://dl.dropbox.com/u/72459/FlexUnit4Turnkey.zip . Got this url here: http://forums.adobe.com/message/2826738