How to create batch(.bat) file after creating suite from TestNG?Can anyone explain entire process?

Answers were Sorted based on User's Feedback



How to create batch(.bat) file after creating suite from TestNG?Can anyone explain entire process?..

Answer / ajmal

OPen Note pad and enter below code
java -cp bin;* testng TestNG nameOfYourXmlFile
save it as all files then change file type to (.bat)
thats it.. u can run it using CMD of jenkins tool..

Is This Answer Correct ?    1 Yes 0 No

How to create batch(.bat) file after creating suite from TestNG?Can anyone explain entire process?..

Answer / kiran

Before running the code, select the class from the Package Explorer, right click and choose the TestNG> Convert to TestNG. You will be asked to give file name which will be further saved as FileName.xml. And run the xml file once.
On the other side: open Note pad and enter below code
java -cp bin;* testng TestNG nameOfYourXmlFile
and save as the name given to that .xml file. But while saving give the name in double quotes. Ex: "FileName".bat

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

How we handle pop-up web-based ?

0 Answers  


Using selenium ide is it possible to get data from a particular html table cell?

0 Answers  


Which of the selector ID, name, XPath or CSS should I use?

0 Answers  


What are the different types of drivers available in webdriver?

0 Answers  


How to check whether a text is underlined or not?

0 Answers  






What is the difference between implicit wait and explicit wait?

0 Answers  


Why selenium rc is used?

0 Answers  


difference between Implicit Wait and Explicit Wait with syntax.?

8 Answers   HCL,


List the advantages of webdriver over selenium server?

0 Answers  


What happens if I run this command. Driver.get(“www.softwaretestingmaterial.com”) ;

0 Answers  


Write a code snippet to launch internet explorer browser in webdriver.

0 Answers  


how to handle staleelementreferenceexception?

0 Answers  


Categories