Not able to run test cases in batch with TestNG xml | Selenium Forum
M
Posted on 15/01/2017
I am not able to run two test cases in batch using TestNG.xml with Test Suite Runner. Not getting an option of TestNG in Run Configurations while running the Test.

Able to run individual test cases successfully.

Please look at the attachment for further help.

M
Replied on 15/01/2017

create a new project make java files again.


M
Replied on 16/01/2017

I made new Project 6 and made two new java files Test1 and Test2 in it.

But Run function in eclipse is giving an option to run a java file in some other project still.

Please refer attachment. I have TestNG library within Project 6 and also specific package with java files in it.

Kindly help on how can I batch run these tests.


M
Replied on 17/01/2017

zip and send the project.


M
Replied on 18/01/2017

Sent the zipped project.


M
Replied on 19/01/2017

it is working for me.

Responsive image

M
Replied on 19/01/2017

i have made some changes to the testng file.


M
Replied on 20/01/2017

I am able to run individual Test1 class with TestNG configutation. But still not getting option to 'Run as TestNG' for testng.xml.

So I created a New Run configuration to run it. But now it is showing TestNGexception error in console while running.

Can you please check testng.xml and suggest necessary changes to run it successfully?


M
Replied on 21/01/2017

i sent you the testng.xml file use that. there was the problem in your testng.xml file.


M
Replied on 23/01/2017

Yes I am able to Run my test suite using testng.xml file provided.

Can you please explain about what was exact problem in my testng.xml file?

Shall I use same xml file provided by you in my future just by editing class names?


M
Replied on 25/01/2017

[quote:3hmic12r]Shall I use same xml file provided by you in my future just by editing class names?[/quote:3hmic12r]
yes.

[quote:3hmic12r]Can you please explain about what was exact problem in my testng.xml file?
[/quote:3hmic12r]

there were Hyphen in your testng.xml.