-1

Can we invoke .net dll in JMeter. I have a peice of code written in .net need to use its output in jmeter as a parameter. (I am trying to call .net writen code which generate a key in jmeter.) Can anyone please help?

Nikhil
  • 393
  • 1
  • 6
  • 25

2 Answers2

1

If .net dll exposes the COM interface, java can talk to that. If you can do something in java, then JMeter can do that as well.

Check this library which cna access COM interface. Check this as well for examples: http://danadler.com/jacob/


But is that something which can be done only in .net? If possible, create the lib in java.

vins
  • 15,030
  • 3
  • 36
  • 47
  • There is a have a code to generate HAMCSHA1 written in .net If i can create it in java (.jar file ) how can it be imported in jmeter. I am using https://www.youtube.com/watch?v=LTgwFadtPDc&t=750s the method mention in this video but i am not getting the value. Is there any other example you can share? – Nikhil Nov 24 '16 at 08:26
0

There are following options ordered by my personal preferences perspective

  1. Re-implement your .NET code in Java/Groovy using JSR223 Sampler
  2. Compile your code into an executable binary and call it using OS Process Sampler
  3. Use JSR223 Sampler mentioned in step 1 and a wrapper library like jni4net, but keep in mind that you will need a .NET Runtime (Windows with installed .NET Framework or Linux/MacOSX with installed Mono)
Dmitri T
  • 159,985
  • 5
  • 83
  • 133