saikrishna prasad
saikrishna prasad

Reputation: 21

How to call or invoke a Java program from EggPlant functional?

I need to invoke a Java program inside a sensetalk script or from EggPlant. Is there any possibility for doing the same?

Upvotes: 1

Views: 1191

Answers (2)

sphennings
sphennings

Reputation: 1083

There is no built in mechanism for doing this. If you can package your java code as something that can be invoked through the command line you can use EggPlant's shell command to run the Java code as if it was invoked through the shell.

I know this is a clunky solution especially if you are wanting to pass data back and forth between Java and EggPlant but that's the only solution I was able to come up with when I was working with EggPlant.

http://docs.testplant.com/ePF/SenseTalk/stk-system-interaction.htm

Upvotes: 2

Daniel Miakotkin
Daniel Miakotkin

Reputation: 141

set destinationFile to "/Users/username/eggPlantTemp.txt"
shell "java -jar /Users/username/IdeaProjects/S3_tests/target/S3_tests-1.0-SNAPSHOT.jar ios > " & destinationFile

LogSuccess file destinationFile

You can use shell. This command will execute jar (with parameter "ios"), record output in a file and then will show the file in eggPlant log.

Upvotes: 2

Related Questions