0

I have a selenium project in eclipse that i want to distribute to manual testers with no Eclipse or Java knowledge. Hence i am looking to distribute it to them as executable files so that they dont need to use eclipse to run them. Can any one suggest the best way to do this without having to install any 3rd party extensions?

P.S : My organisation doesnt allow me to install 3rd party extensions on Eclipse. It will require a lot of approvals. Hence i am wondering if there is any method available inside Eclipse itself?

Siva Kumar
  • 1
  • 1
  • 9

2 Answers2

0

I've done it some years ago, in my eclipse version: file -> export -> java -> Runnable jar file

If you want an exe file you can use: Launch4J

Francesco Serra
  • 763
  • 8
  • 13
  • Thanks for your suggestion.. But as i mentioned my organisation doesnt allow me to download applications like Launch4j without a lot of approvals.. So do you know an alternate method of converting Runnable Jarfile to exe file without any 3rd party application? – Siva Kumar May 04 '16 at 06:19
  • 1
    I've done it a lot time ago ... Sorry I don't remember or something is changed. I think this link could be quite useful http://www.excelsior-usa.com/articles/java-to-exe.html – Francesco Serra May 04 '16 at 07:01
0

Export your project as jar file and create a .bat file which will include all the necessary libraries in your classpath with your project and then make a call to the underlying script (in case if you are using testng then testng has option to make command line calls)
else use Maven
EDIT: Something on below lines:
1. Create run.bat file
2. Content of the bat file:
JAVA_HOME={Path to your JDK}
CLASSPATH=%PATH%;{All the dependent jar files of your project as well as you project}
{Call to your Junit Script from command line} Something like this Run JUnit from command line
3. Run your batch file (run.bat)
I may not have provided the exact code but thats where you should be heading if you wish to run your JUnit tests from command line.
NOTE / FYI : Maven does not require any installation or approval..You just download the zip and unzip it and set environment variable and thats it.

Community
  • 1
  • 1
Mrunal Gosar
  • 4,595
  • 13
  • 48
  • 71
  • Thanks for your suggestion.. It would be great if you can be a bit more specific.. what do you exactly mean by "create a .bat file which will include all the necessary libraries in your classpath with your project and then make a call to the underlying script"? How to do this? And we are using Junit framework.. We cant use Maven as well – Siva Kumar May 04 '16 at 06:21