0

I have legacy test scripts written in C for use with Loadrunner. I would like to use Grinder instead of Loadrunner. Grinder provides support for anything in Java which can easily be imported into Jython, Grinder's default programming language.

In order to reuse the test scripts written in C could I wrap them in Cython? (http://en.wikipedia.org/wiki/Cython) Cython is a compiled language which will produce extension modules that can be imported into regular Python or CPython code. Once I have this CPython code, will it work in Grinder or does Grinder specifically need Jython? The question is whether Grinder can support default Python?

Jai
  • 319
  • 2
  • 9
  • 30

1 Answers1

0

Look in the \data subdirectory under your LoadRunner script and you will find the original header and page source that the script was built from.

You are likely better off writing a preprocessor that pulls the original source for the calls and builds a Mock Grinder Script for modification. if you're really cagey you could pull the dynamic parameterization (correlation) tags from the .c files as well as use the script .prm file and parameter tags to modify the grinder prototype as you build it. If you attempt to use the LoadRunner scripts directly you are going to run into all sorts of issues with missing libraries for the support of the scripts.

James Pulley
  • 5,606
  • 1
  • 14
  • 14
  • Firstly, the script in Loadrunner is not a web based recorded script. It is a custom C-script written to call C based API. Second, I don't quite follow your explanation, sorry. My original question was will Cython compiled code work with Grinder? – Jai Mar 28 '13 at 19:53
  • For me, I would just rewrite it rather than attempt to port it directly. I made an assumption that your script was web based, as the majority of items are out there. This proved to be an incorrect assumption. Your template code will probably port quite easily barring the C specific variable declarations and pointer items which may not match up with your target tool – James Pulley Mar 29 '13 at 17:10