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 to create and run testng.xml?

0 Answers  


What are the significant changes/upgrades in various selenium versions?

0 Answers  


When we use findElement () and findElements () findElement ()?

0 Answers  


Which is the only browser that supports selenium ide to be used?

0 Answers  


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

2 Answers   Cube Digi,






in real world, how do we log reports using selenium? is it with log4j or testNG listener?? please answer asap

2 Answers  


What does a single “/” bar in XPath do?

0 Answers  


What regular expression special character(s) means "any character?"

0 Answers  


How does click on button without using click method

2 Answers  


Is webelement an interface or a class?

0 Answers  


What is the command to insert text into the HTML text box using Selenium?

0 Answers  


How does one capture a page title in selenium 2.0?

0 Answers  


Categories