import simulation

Can I import a simulation object and call it from another simulation?

eg: login_simulation has some login scripts that I would like to call from various other simulations

Currently when I do import login and call login_object in exec, I get a compiler warning and error

Warning : “imported is permanently hidden by definition…”

error: not found.

How can I resolve this?

So I found a workaround to this but I am not sure if it is the best way to go about.

I removed the object and curly braces. In my other simulation, I instantiated the class and referenced directly in scenario run

something like

`
class loginSimulation extends simuation{

val doLogin = exec(http(…)

}

`

and in other class

`
class doWorkSimulation extends simulation{
val login = new loginSimulation


scenario(“CRD_Home”).exec(login.doLogin)
}
}

`

It seems you have 2 members of the same name, because of your import.