Loading ...
Sorry, an error occurred while loading the content.
 

Re: [fitnesse] nslim: mtee.dll can't load my fixture (can't find type)

Expand Messages
  • Rutje Frowein
    Hi Mike, I was using the 20081201 fitnesse.jar After your question I tried it on the 20090112 version. Same symptoms... -r
    Message 1 of 8 , Jan 31, 2009
      Hi Mike,

      I was using the 20081201 fitnesse.jar
      After your question I tried it on the  20090112 version.
      Same symptoms...

      -r

      On Sat, Jan 31, 2009 at 8:32 AM, Mike Stockdale <jediwhale@...> wrote:

      What version of fitnesse.jar are you using?


    • Rutje Frowein
      Also under the debugger it s in ApplicationUnderTest Line 53 Update cache: public RuntimeType FindType(NameMatcher typeName) { Type type =
      Message 2 of 8 , Jan 31, 2009
        Also under the debugger it's in ApplicationUnderTest Line 53 Update cache:
                public RuntimeType FindType(NameMatcher typeName) {
                    Type type = Type.GetType(typeName.MatchName);
                    if (type == null) {
                        type = SearchForType(typeName, cache)
                            ?? SearchForType(typeName, AssemblyTypes(assemblies))
                            ?? SearchForType(typeName, AssemblyTypes(AppDomain.CurrentDomain.GetAssemblies()));
                        if (type == null) throw new ArgumentException(TypeNotFoundMessage(typeName));
                        UpdateCache(type);
                    }
                    return new RuntimeType(type);
                }


        On Sat, Jan 31, 2009 at 10:51 AM, Rutje Frowein <ruthanon@...> wrote:
        Hi Mike,

        I was using the 20081201 fitnesse.jar
        After your question I tried it on the  20090112 version.
        Same symptoms...

        -r


        On Sat, Jan 31, 2009 at 8:32 AM, Mike Stockdale <jediwhale@...> wrote:

        What version of fitnesse.jar are you using?



      • Mike Stockdale
        The type name it s looking for is empty - Type not found in assemblies - which is very odd. Do you have a full stack trace? ... -- Cheers, Mike Stockdale
        Message 3 of 8 , Feb 1, 2009
          The type name it's looking for is empty - Type '' not found in assemblies - which is very odd.

          Do you have a full stack trace?

          Rutje Frowein wrote:

          Hi,

          I've been lurking for years and am excited by the whole concept of slim!


          I've been playing around with nslim attempting to get it running and I'm stumped.  I keep getting exceptions in loading the application under test.  thus far I have not made it to my fixture code.
          This is both with the compiled sample dll found in source/sample/ SlimSamples. cs using .net3.5 && a pared down version compiled in VS2005.



          Right now I'm getting Type "" not found exception in assemblies exception using my DataQuery.dll .net v2.0:
          An unhandled exception of type 'System.ArgumentExce ption' occurred in mtee.dll

          Additional information: Type '' not found in assemblies:
              file:///c:/WINDOWS/ Microsoft. NET/Framework/ v2.0.50727/ mscorlib. dll
              file:///C:/Dev/ PortfolioEdge/ Source/Test/ Common/fitnesse/ dotnet/Runner. exe
              file:///C:/Dev/ PortfolioEdge/ Source/Test/ Common/fitnesse/ dotnet/mtee. DLL

          My config file is based off the downloaded version (though I have tried the template on: http://www.syterra. com/FitnesseDotN et/SlimFramework .html)

          <?xml version="1.0" encoding="utf-8" ?>
          <config>
            <ApplicationUnderTes t>
              <addAssembly>dotnet\fitnesse. dll</addAssembly>
             
              <addAssembly>dotnet\DataQuery. dll</addAssembly>

            </ApplicationUnderTe st>

          </config>


          My page is from the fitnesse page on slim:

          !define TEST_SYSTEM {slim}
          !define COMMAND_PATTERN {%m -c slim.config. xml -r fitnesse.slim. Runner}
          !define TEST_RUNNER {dotnet\Runner. exe}


          |import|
          |fitnesse.slim. test|


          |should I buy milk|
          |cash in wallet|pints of milk remaining|go to store?|
          |      22      |      0                |    no      |

          The code i've been using is drawn from the samples.dll in the fitnesse folder;
          namespace fitnesse.slim. test
          {
              public class ShouldIBuyMilk
              {
                
                  private int dollars;
                  private int pints;


                  public void setPintsofMilkRemai ning(int pints)
                  {
                      this.pints = pints;
                  }

                  public void setCashInWallet( int dollars)
                  {
                      this.dollars = dollars;
                  }

                  public string goToStore()
                  {
                      return (pints == 0 && dollars > 2) ? "yes" : "no";
                  }

                  public void execute() { }
              }
          }

          If anyone can tell me what's going on it'd be great as I'd love to continue using this.

          TIA
          -r


          --
          Cheers,
          Mike Stockdale

          FitNesse.NET
          Syterra Software Inc.
        • Rutje Frowein
          Hi Mike, The problem, I think was the root path which is already dotnet. The path ended up being dotnet dotnet [name].dll. So I removed the dotnet in my
          Message 4 of 8 , Feb 1, 2009
            Hi Mike,
             
            The problem, I think was the root path which is already dotnet. The path ended up being dotnet\dotnet\[name].dll.  So  I removed the dotnet in my configuration file and now it works under the *debugger*.  Info for configuaration below.
             
            In the testpage, however, I'm still getting an exception in fitnesse.mtee.enginee.RuntimeMember.  The method TypedValue Invoke(object instance, object[] parameters) on Line 31 is throwing an exception which bubbles to the testpage:
             
            An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
            Additional information: Exception has been thrown by the target of an invocation.
             
            Exanining the info.Declaringtype I get: DeclaringMethod = 'type.DeclaringMethod' threw an exception of type 'System.InvalidOperationException'
            In the debugger there is no problem.  it neatly returns a result of null and continues.  There however, I'm breaking when it tries to listen to the port 8080 (the one in use for fitnesse on my machine).  What is the commandline to run Runner.exe from the command line?
             
            1. Passing in the page name as an 'Extra Argument" causes ParseCommandLine to fail when it tries to create the messenger (int.Parse)
            2. Passing in the port 8080 fails in Messenger.Make() as it is already in use
            3. Passing in nothing fails because the commandLineArguements are out of bounds
             
             thanks,
            -r
             
             
            So configuration file is now:
            <config>
              <ApplicationUnderTest>
               
             <addAssembly>fitnesse.dll</addAssembly>
                <addAssembly>DataQuery.dll</addAssembly>
              </ApplicationUnderTest>
            </config>
             
            Page setup now contains(note the dotnet\sim.config.xml path so it doesn't have to be in the root directory...):
            !define TEST_SYSTEM {slim}
            !define COMMAND_PATTERN {%m -c dotnet\slim.config.xml -r fitnesse.slim.Runner}
            !define TEST_RUNNER {dotnet\Runner.exe}

            |import|
            |fitnesse.slim.test|
             
             


             
            On Sun, Feb 1, 2009 at 8:29 AM, Mike Stockdale <jediwhale@...> wrote:

            The type name it's looking for is empty - Type '' not found in assemblies - which is very odd.

            Do you have a full stack trace?

            Rutje Frowein wrote:

            Hi,

            I've been lurking for years and am excited by the whole concept of slim!


            I've been playing around with nslim attempting to get it running and I'm stumped.  I keep getting exceptions in loading the application under test.  thus far I have not made it to my fixture code.
            This is both with the compiled sample dll found in source/sample/ SlimSamples. cs using .net3.5 && a pared down version compiled in VS2005.



            Right now I'm getting Type "" not found exception in assemblies exception using my DataQuery.dll .net v2.0:
            An unhandled exception of type 'System.ArgumentExce ption' occurred in mtee.dll


            Additional information: Type '' not found in assemblies:
                file:///c:/WINDOWS/ Microsoft. NET/Framework/ v2.0.50727/ mscorlib. dll
                file:///C:/Dev/ PortfolioEdge/ Source/Test/ Common/fitnesse/ dotnet/Runner. exe
                file:///C:/Dev/ PortfolioEdge/ Source/Test/ Common/fitnesse/ dotnet/mtee. DLL

            My config file is based off the downloaded version (though I have tried the template on: http://www.syterra. com/FitnesseDotN et/SlimFramework .html)


            <?xml version="1.0" encoding="utf-8" ?>
            <config>
              <ApplicationUnderTes t>
                <addAssembly>dotnet\fitnesse. dll</addAssembly>
               
                <addAssembly>dotnet\DataQuery. dll</addAssembly>

              </ApplicationUnderTe st>

            </config>


            My page is from the fitnesse page on slim:

            !define TEST_SYSTEM {slim}
            !define COMMAND_PATTERN {%m -c slim.config. xml -r fitnesse.slim. Runner}
            !define TEST_RUNNER {dotnet\Runner. exe}


            |import|
            |fitnesse.slim. test|


            |should I buy milk|
            |cash in wallet|pints of milk remaining|go to store?|
            |      22      |      0                |    no      |

            The code i've been using is drawn from the samples.dll in the fitnesse folder;
            namespace fitnesse.slim. test
            {
                public class ShouldIBuyMilk
                {
                  
                    private int dollars;
                    private int pints;


                    public void setPintsofMilkRemai ning(int pints)

                    {
                        this.pints = pints;
                    }

                    public void setCashInWallet( int dollars)
                    {
                        this.dollars = dollars;
                    }

                    public string goToStore()
                    {
                        return (pints == 0 && dollars > 2) ? "yes" : "no";
                    }

                    public void execute() { }
                }
            }

            If anyone can tell me what's going on it'd be great as I'd love to continue using this.

            TIA
            -r


            --
            Cheers,
            Mike Stockdale

            FitNesse.NET
            Syterra Software Inc.


          • Rutje Frowein
            Hi Mike, I fixed it! The problems I m having are using the relative paths. By adding the full path to my dlls in the config file...it just works (from the
            Message 5 of 8 , Feb 1, 2009

              Hi Mike,
               
              I fixed it!
              The problems I'm having are using the relative paths.  By adding the full path to my dlls in the config file...it just works (from the page).
               
              So maybe you can add more information about using relative paths (so I know what the root path is from config file).
               
              I really appreciate your help as well as the fact that you did the translation to .Net!
               
              Cheers,
               
              -r
            • Mike Stockdale
              I ll put in a more informative message. ... -- Cheers, Mike Stockdale FitNesse.NET Syterra Software Inc.
              Message 6 of 8 , Feb 2, 2009
                I'll put in a more informative message.

                Rutje Frowein wrote:

                Hi Mike,
                 
                I fixed it!
                The problems I'm having are using the relative paths.  By adding the full path to my dlls in the config file...it just works (from the page).
                 
                So maybe you can add more information about using relative paths (so I know what the root path is from config file).
                 
                I really appreciate your help as well as the fact that you did the translation to .Net!
                 
                Cheers,
                 
                -r

                --
                Cheers,
                Mike Stockdale

                FitNesse.NET
                Syterra Software Inc.
              Your message has been successfully submitted and would be delivered to recipients shortly.