# Loadrunner java vuser script in gatling

**URL:** https://community.gatling.io/t/loadrunner-java-vuser-script-in-gatling/5476
**Category:** Gatling (Open-Source)
**Created:** [February 5, 2020, 5:57pm UTC](https://community.gatling.io/t/loadrunner-java-vuser-script-in-gatling/5476 "2020-02-05T17:57:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sayan\_chatterjee1](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@sayan\_chatterjee1](https://community.gatling.io/u/sayan_chatterjee1)
#### Post date: [February 5, 2020, 5:57pm UTC](https://community.gatling.io/t/loadrunner-java-vuser-script-in-gatling/5476/1 "2020-02-05T17:57:58Z")

</div>

Hi,  
In our project , we are migrating from loadrunner to gatling. There aregood number of scripts in ‘Java vuser’ protocol.

How can I run this in gatling. Highly appreciate your suggestion.

Java code is simple.  
Example:

**public class Actions**  
**{**  
**private ExecuteBlock mobileBlock\*\*;\*\***  
**public int init\*\*()\*\* throws Throwable {**

**web\*\*.set\_sockets\_option(“MAX\_TOTAL\_CONNECTIONS”,\*\* “2”);**  
**web\*\*.set\_max\_html\_param\_len(“99999”);**  
 **web****.set\_sockets\_option(“SSL\_VERSION”,\*\* “TLS1.1”);**

**return 0\*\*;\*\***  
**}_//end of init_**

**public int action\*\*()\*\* throws Throwable {**

**ExecuteBlock Block = new ExecuteBlock\*\*();\*\***  
**Block\*\*.runFunction(\<{my parameter}\>);\*\***  
**return 0\*\*;\*\***  
**}_//end of action_**

**public int end\*\*()\*\* throws Throwable {**  
**return 0\*\*;\*\***  
**}_//end of en_**

}

---

<div class="post-metadata">

### Author: ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)
#### Post date: [February 5, 2020, 10:06pm UTC](https://community.gatling.io/t/loadrunner-java-vuser-script-in-gatling/5476/2 "2020-02-05T22:06:41Z")

</div>

Short answer: Port the code to Gatling DSL. Do not even attempt to run them directly.

---

<div class="post-metadata">

### Author: ![sayan\_chatterjee1](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@sayan\_chatterjee1](https://community.gatling.io/u/sayan_chatterjee1)
#### Post date: [February 6, 2020, 1:17pm UTC](https://community.gatling.io/t/loadrunner-java-vuser-script-in-gatling/5476/3 "2020-02-06T13:17:22Z")

</div>

Thanks John. You mean, only option is to understand the API calls and create gatling scripts for those get/post calls. Is my understanding correct.

---

<div class="post-metadata">

### Author: ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)
#### Post date: [February 13, 2020, 2:39pm UTC](https://community.gatling.io/t/loadrunner-java-vuser-script-in-gatling/5476/4 "2020-02-13T14:39:48Z")

</div>

More or less, yes. For each call in your LoadRunner script, you’ll want a corresponding `exec( http(...)... )` call.
