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

Explain what is assertion in selenium and what are the types of assertion?

0 Answers  


Who is the best faculty for selenium in twin cities (Hyderabad/secundrabad)

2 Answers   KJL, NA,


in real time , which framework is used ? is it datadriven or keyword or hybrid ?? please answer

2 Answers   Cap Gemini,


What is the selenium's recording language?

0 Answers  


What is regular expressions? How you can use regular expressions in selenium?

0 Answers  






What is the price of selenium license per server?

0 Answers  


While injecting capabilities in webdriver to perform tests on a browser which is not supported by a webdriver what is the limitation that one can come across?

0 Answers  


Explain what are the limitations of selenium ide?

0 Answers  


How to capture bitmaps in selenium?

0 Answers  


What are the main advantages of selenium grid?

0 Answers  


How can we handle web-based pop-up?

0 Answers  


How to deal with frame in webdriver?

0 Answers  


Categories