Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
795 views

Import Webdriver Selenium Java Script

I have looked for several days and I have been unable to find any instructions to help me import a Java Selenium Script into LoadRunner.  The only one I find is a DOTNET import.  Our functional team uses webdriver Java for the scripting in Selenium not the IDE. version.  Does anyone have any suggestions?  The goal is to leverage the work the functional team is doing, by using the same script in the Load Test environment.  Your assistance is greatly appreciated.

 

Larry

0 Likes
7 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Import Webdriver Selenium Java Script

Hi Larry,

Please check the following links. 

> https://admhelp.microfocus.com/lr/en/12.56/help/WebHelp/Content/VuGen/164965_t_how_to_develop_junit.htm

> https://community.softwaregrp.com/t5/LoadRunner-Practitioners-Forum/Execute-Junit-Test-in-Loadrunner-using-eclipse-java-program/td-p/586543

The links above talk about Eclipse plugin. You do not have to use it. Generally speaking you need to select the jar (the test) in Controller just like you add a script. Assuming the right JRE version is installed and configured as default and the jar dependecies are located in the same folder as the jar, the Controller is supposed to convert the jar behind the scenes to a Java DevOps type VuGen script and allow running it. If you need to run it on Load Generator as well, you will have to ensure the dependencies and JRE are configured on the LG as well.

I suggest trying that with a simple JAR first, such that does not have dependencies and then go for the real thing.

Regards,

Shlomi

0 Likes
Highlighted
Contributor.
Contributor.

Re: Import Webdriver Selenium Java Script

Hi Shlomi, I teamed up with Larry to work on this issue. As per the insructions provided in the link, I have installed Java 8, Eclispse (both 32 and 64) and LREclipseIDEAddInDevSetup.exe. However, I don't see Devops Vuser on the menu bar for 32 bit versionEclipse and for 64 it shows "Devops Vuser" on the menu but doest give any options to chose. Please refer to the screenshots for the same. Any help in this reagards is highly appreciated. Thanks in adv. 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Import Webdriver Selenium Java Script

Hi,

Regarding the 32 bit version, can you check Eclipse dropins folder and ensure hp.lr.continuousdelivery.eclipse42addin.jar was copied to it? If not copy it manually from the LoadRunner bin directory.

Regarding the fact you cannot see menu items, can you please let me know which version of Eclipse and LoadRunner you are using?

The IDE add-in allows adding LoadRunner API's to the code in order to be able to measure transaction response time and use some other LR APIs that are protocol agnostic. If you cannot get the IDE plugin work, I suggest opening a ticket to be handled in parllel to this thread.

I would appreciate if you try adding a simple Selenium test to LoadRunner Controller (even if it does not have LR APIs yet). Just create a selenium test (e.g. navigate to a URL). As I have explained earlier, the Controller will convert it to a LR script behind the scenes. I would like to see how it goes.

Regards,

Shlomi

 

 

0 Likes
Highlighted
Contributor.
Contributor.

Re: Import Webdriver Selenium Java Script

Hi Shlomi,

Thank you for your help with Eclipse 32 bit. Now that I am able to see the DevOps dropdown, I went ahead and had automation team develope a java script for us. I have exported the script and saved as a jar file. When I try to open the jar file using the controller, I am seeing the following error. Please refer to the screenshot. Thank you.

 

 

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Import Webdriver Selenium Java Script

Hi Thor,

(I hope you already opened support call. It will be easier addressing it this way)

LoadRunner converter expects a test class that inherits from either junit.framework.TestCase or com.thoughtworks.selenium.SeleneseTestCase. It should be one of the super classes, not a direct inheritance.

Maybe your test class does not inherit from one of these or maybe it is something else. Hard to tell. 

I believe we should debug it more closely.

Regards,

Shlomi

0 Likes
Highlighted
Contributor.
Contributor.

Re: Import Webdriver Selenium Java Script

Hi Shlomi, 

As insturcted I tried to add Selenium test to Loadrunner Controller. However, still seeing the same errors I have sent you earlier. Not really sure what would be my next step to troubleshoot the issue. 

 

--Thor

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Import Webdriver Selenium Java Script

Hi Thor,

I apologize but I cannot assist without actually seeing it.

As I mentioned earlier, I hope you opened a support ticket. If so, please send me a private message in the community to share the support ticket number. I will track it internally to see where it stands and help promoting it.

Regards,

Shlomi

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.