Home
Options

Suggestion on how to inject/reuse CLR Objects when automating with LPRun?

Hi.

I perform queries on a pretty large datacontext (proprietary CLR Object). The larger ones can take a couple of minutes to load. The Util.Cache feature has helped us immensely. With the introduction of LPRun, it is tempting to divide into a lot of different queries that can be versioned independently and batched together depending on what test suites should be run.

Ideally, I'd like a Util.Run(string QueryFilePath, QueryResultFormat format, params object[]).

I realize that this is difficult both because it doesn't match the signature of Main(string[] params) and because they may not be executing in the same appdomain. It would be hard to make the CLR object serializeable.
Any suggestions?

Comments

  • Options
    It's a good idea, but hard to implement because the query runs in a separate application domain.

    I've been considering the feature request to allow one query to reference another. This would enable a statically typed solution, which would be even better.
  • Options
    Yes, in order for this to work in proc, one probably need some compiler preprocessing. The referenced query must be compiled in as a method, its own dll or something.

    I am considering a solution where the .query files are textually merged prior to invoking LPRun and letting the inter-query exchange happen through singletons accessed through myextensions so that the queries can both be executed individually and in a larger context without code change.
Sign In or Register to comment.