LoadGen 2007 with BizUnit

I'm a big fan of LoadGen as well as BizUnit. Combining the two makes them even better. The latest LoadGen version, LoadGen 2007, also has support for WCF which makes it a "must have" in the testing toolbox. The problem is that the dll's in this version is not signed with a public key token and therefor cannot be used in BizUnit.

If you want to create LoadGen test cases in BizUnit, but are not intrested in using new functionality such as WCFTransport, you can solve the problem by just downloading and installing LoadGen 2004 instead.

But I have a few WCF services that I want to stress test within BizUnit. So what can I do to make LoadGen 2007 work in BizUnit?

Here is how I solved the problem.

1. Install LoadGen 2007.

2. Backup the files located in "c:\Program Files\LoadGen\Bins" (default install location)

3. Disassemble the LoadGen.dll and store the resulting MSIL assembler text in LoadGen.il.
Run the following command from a VS.NET command prompt:

ildasm LoadGen.dll /out:LoadGen.il

4. Assuming you already have an assembly key pair file, sign the LoadGen.dll.
Run the following command from a VS.NET command prompt:

ilasm LoadGen.il /dll /key=KeyPair.snk

5. Get the public key token from LoadGen.dll.
Run the following command from a VS.NET command prompt:

sn -Tp LoadGen.dll

PublicKeyMarked

This public key token will later be written in the format of:

(11 3E 3E 72 63 03 58 84 )

6. Repeat step #3 for all the dll's. Open each *.il file in a text editor and look for references to unsigned dll's.
For example:

.assembly extern LoadGen
{
     .ver 2:0:0:0
}
.assembly extern LoadGenHelper
{
     .ver 2:0:0:0
}

7. Add the public key we got from step #5 to these references and save the files.
For example:

.assembly extern LoadGen
{
     .publickeytoken = (11 3E 3E 72 63 03 58 84 )
     .ver 2:0:0:0
}
.assembly extern LoadGenHelper
{
     .publickeytoken = (11 3E 3E 72 63 03 58 84 )
     .ver 2:0:0:0
}

8. Repeat step #4 for all the *.il files to sign the dll's. You only need to do this for the dll's that you plan to use in BizUnit.

9. Repeat step #3, 4, 6 and 7 for LoadGenConsole.exe as well so that it references the signed dll's instead.

10. Open BizUnit in Visual Studio and remove the old reference to LoadGen.dll and create a new reference to the signed LoadGen.dll instead. Build the project.

Note: You only need to do this for the dlls that you plan to use, but to reduce later confusion I did all the dlls at once.

Good luck!

posted @ Saturday, January 03, 2009 1:57 PM

Print

Comments on this entry:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345