0

I am using Selenium and Java with Eclipse and TestNG.

Now I want to make a .jar file for running this test case on another system that doesn't have Selenium and Java.

How can this be done?

0

You can run TestNG programatically (more details here):

TestListenerAdapter tla = new TestListenerAdapter();
TestNG testng = new TestNG();
testng.setTestClasses(new Class[] { Run2.class });
testng.addListener(tla);
testng.run();

And together with the Eclipse Export Wizard, you can create an executable for it.

that don't have ... Java setup

But naturally you need a JRE to execute .jar

However, if you simply boot up a container with Selenium, you will be able to manage changes extremely more easily than with executable files. More details here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.