Testing with IronRuby Query

Hi,

I have just got IronRuby up and running. I’m intending on using it with
Cucumber to test some of the DLLs on our server.

It all seems to have been set up correctly and I have require’d one of
the DLLs from a location on our server. I have access to the DLL’s via a
shared drive, but they are on a different machine to my own. The DLLs
sit on the webserver in the bin directory within the wwwroot directory
of an IIS server. The class interfaces are quite simple, but the DLLs do
a lot of work calling other services, databases etc.

Now, on my machine, where my test scripts are, if I import one of these
DLLs using

require ‘mydll.dll’

What does this actually do?

  1. Does it make a copy of the DLL code which I can use but is running
    on my machine? Or;
  2. Does it reference the DLL on the webserver itself such that I am
    running code on the webserver?

I ask as to test the DLLs effectively they will need to have the same
resources available to them as on the webserver (access to the DB etc).
If the code is running on my machine, then I can’t test effectively.

Any advice appreciated…

Thanks,

Gordon

Gordon, I’m a bit confused about what you’re trying to do … let me see
if I understand …

It all seems to have been set up correctly and I have require’d one of
the DLLs from a location on our server. I have access to the DLL’s via a
shared drive, but they are on a different machine to my own. The DLLs
sit on the webserver in the bin directory within the wwwroot directory
of an IIS server. The class interfaces are quite simple, but the DLLs do
a lot of work calling other services, databases etc.

So you have a bunch of DLLs you want to use in IronRuby, and they are
located on a shared drive on a different machine than where you want to
run IronRuby on? Because Windows treats a shared drive just like a local
drive, IronRuby will be able to access these files just fine.

running code on the webserver?

I ask as to test the DLLs effectively they will need to have the same
resources available to them as on the webserver (access to the DB etc).
If the code is running on my machine, then I can’t test effectively.

All execution is happening on the machine running IronRuby; the DLLs
bits are just being loaded from the shared drive. It sounds like that’s
not what you want, as you need those DLLs be in their production
environment to work correctly. To test those DLLs effectively, you
either need to run IronRuby on the same machine as where those binaries
will work, or you need to make those binaries work on your dev machine.

Keep in mind this is not a limitation of IronRuby; the problem you are
trying to solve is not a job for just a programming language. Sounds
like you’d ideally want a web-service on your server so you can expose
functionality you want to test to your dev machines. Or even something
like remote procedure calls. But I’d just test these binaries in a
special environment where the web services are mocked out; testing
things in production is always tricky, and not always worth it.

~js

From: [email protected]
[mailto:[email protected]] On Behalf Of Ivan Porto
Carrero
Sent: Wednesday, December 23, 2009 10:59 AM
To: [email protected]
Subject: Re: [Ironruby-core] Testing with IronRuby Query

when you do require ‘MyAssembly.dll’

ironruby looks in it’s search paths to see if it can find the file in
one of those locations. If it exists it will just load the file with
Assembly.LoadFromPath

Not much magic

You may have to change the trust level in your .net security
configuration to allow network locations but that counts for other .NET
stuff too.

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto C.
Blog: http://flanders.co.nz
Google Wave:
[email protected]mailto:[email protected]
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

On Wed, Dec 23, 2009 at 6:59 PM, Gordon M.
<[email protected]mailto:[email protected]> wrote:
Hi,

I have just got IronRuby up and running. I’m intending on using it with
Cucumber to test some of the DLLs on our server.

It all seems to have been set up correctly and I have require’d one of
the DLLs from a location on our server. I have access to the DLL’s via a
shared drive, but they are on a different machine to my own. The DLLs
sit on the webserver in the bin directory within the wwwroot directory
of an IIS server. The class interfaces are quite simple, but the DLLs do
a lot of work calling other services, databases etc.

Now, on my machine, where my test scripts are, if I import one of these
DLLs using

require ‘mydll.dll’

What does this actually do?

  1. Does it make a copy of the DLL code which I can use but is running
    on my machine? Or;
  2. Does it reference the DLL on the webserver itself such that I am
    running code on the webserver?

I ask as to test the DLLs effectively they will need to have the same
resources available to them as on the webserver (access to the DB etc).
If the code is running on my machine, then I can’t test effectively.

Any advice appreciated…

Thanks,

Gordon

Posted via http://www.ruby-forum.com/.


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core