External logic within a WEB HTTP Protocol

Hi Guys,

My team is working on migrating some core scripts(Services and WEB) from NeoLoad to LoadRunner.

Our project has an integration with external Java framework, to handle different types of business logic.

That logic can be anything from capturing data being sent through the DBMS_OUTPUT by PROCs / Function calls, to resolving hosts for different types of environments, based on scopes and other requirements .

With NeoLoad, this can be easily achieved by having a JS action that invokes that specific method, required by the downstream transactions(Java binaries need to be available within the working directory).

I'd like to know what would be the equivalent approach for that in LoadRunner, where external Java logic can be used and then later consumed by downstream transactions within a script/solution.

We use version 24.1 build 264.

Thanks!

  • 0  

    Hi there Lior
    I think you might be able to use Java over HTTP if  you need to use java functions 

    You might be able to record a browser just like with the web record/replay and the functions that are used are the web functions in the background.

    You would also need to add the framework in the classpath setting and you can then just write java around the web functions that are recorded.
    I hope this helps.
    Thanks David

  • 0 in reply to   

    Hi David,

    Thank you for getting back to me.

    I was able to get the external Java logic successfully invoked when using Java VU and/or Java over HTTP.

    The issue is that these Java protocols, ones selected, do not seem to support/work with any other(non-Java) type of protocol within the same script.

    There is an option to go with multiple protocols though, but the Java ones wont to be available when this is selected.

    You could write your Java code around the recorded WEB functions(WEB - HTTP/HTML protocol), but you wont be able to have your JAR imported to

    that script, as its runtime-settings don't have the Java environment section available in it.

    Am i missing something here?


    Thanks again!

  • 0   in reply to 

    Hi Lior
    I am sorry for not being clear on this point.
    We do not support multi-protocol with java , we only support JavaOverHTTP which does web protocol and java protocol .
    You can't mix and match languages 

  • Suggested Answer

    0

    You can do the same thing via Loadrunner DevWeb protocol / LoadRunner Developer which supports additional libraries for any custom coding via node js modules.

    Take a look at this link for more details. Third party modules and libraries (microfocus.com)

  • 0 in reply to   

    Thanks for getting back to me with this, David!

    I am working with their(opentext) technical team on figuring out how this can be addressed.

  • 0 in reply to 

    Hi Venkat.

    Node.js would not be an option for us, as the entire framework was written in Java, and being used by other Performance and Automation projects..

    I have worked on a project where we had to implement way of "transpiling" one language into other(using JSweet or TeaVM), so that Java code was converted to JavaScript, but again, that would not be an option here..

    I also believe that an alternative approach of calling Java logic from C(instead of Node.js) could also be an option - but this time, we'd need a Java Native Interface(JNI) to be implemented for that.

    Thanks

  • 0   in reply to 

    You might put the Java calls behind a web based API and use a rest based approach to call the Java logic. Now you can use any protocol for your scripting.

    How to ask questions

    Reward contributions via likes or 'verified answers'

  • 0 in reply to   

    We were also looking into that approach along with the other two mentioned in my previous response(using "transpiling" and/or JNI). 

    Unfortunately, we don't have the bandwidth of getting it implemented.

    We are waiting opentext technical team to get back to us on that and hear from them how this can be addressed.