Output not showing on console on executing TestNG suite | Selenium Forum
M
Posted on 09/10/2015
Hi Guys,

I tried to to execute below code using testng.xml and out put not showing on console.

And I am not getting warning messages and error. Please find the below code to resolve this.

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Yahoo">

<test name="Yahoo Test">
<classes>
<class name="Test.YahooTest" ></class>
</classes>
</test>

<test name="Yahoo News Test">
<classes>
<class name="Test.YahooNewsTest" ></class>
</classes>
</test>


</suite>

Note: Package and Class names are entered correctly in class tag

M
Replied on 09/10/2015

[quote="lokesh":12uwlg24]Hi Guys,

I tried to to execute below code using testng.xml and out put not showing on console.

And I am not getting warning messages and error. Please find the below code to resolve this.

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Yahoo">

<test name="Yahoo Test">
<classes>
<class name="Test.YahooTest" ></class>
</classes>
</test>

<test name="Yahoo News Test">
<classes>
<class name="Test.YahooNewsTest" ></class>
</classes>
</test>


</suite>

Note: Package and Class names are entered correctly in class tag[/quote:12uwlg24]

Just now I got the console error

13:09:14,685 INFO [main] Main - javax.xml.transform.TransformerFactory=null
13:09:14,710 INFO [main] Main - java.endorsed.dirs=C:\Program Files\Java\jre1.8.0_60\lib\endorsed
13:09:14,721 INFO [main] Main - launchFile: D:\Selenium\eclipse\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
13:09:15,911 FATAL [main] Main - No embedded stylesheet instruction for file: file:/D:/Selenium/eclipse/Module-9/testng.xml
org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/D:/Selenium/eclipse/Module-9/testng.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:223)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:187)
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73)
Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/D:/Selenium/eclipse/Module-9/testng.xml
at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:213)
... 2 more

Please help me how to resolve this.


M
Replied on 10/10/2015

testng part seems fine to me. must be something wrong with test cases themselves.


M
Replied on 10/10/2015

When I run my test-cases individually it works fine. Now how I need to find what is causing this issue. I have deleted and recreated the my XML file then also it showing same error.


M
Replied on 11/10/2015

I'm working on running multiple test cases using testng.xml.
I've made the xml file correctly.
Now I run xml file : Run as ->TestNgSuite
No output is shown Responsive image Responsive image Responsive image

I tried running it using different Run Configurations, then I'm able to run it as per the configurations so made.. Responsive image Responsive image
Can you help me to get it done by TestNgSuite?? Responsive image Responsive image

If it had been a problem with Test Cases or the XML i guess it would not have given output using different Run Configurations... Responsive image


M
Replied on 11/10/2015

Yes, It will work through Run Configurations. When I run again using TestNG it will not work.

@Ashish Can you please help me how resolve this issue.


M
Replied on 12/10/2015

how about you upload project here.


M
Replied on 12/10/2015

@Ashish please find the attached project folder


M
Replied on 12/10/2015

@Ashish
Pls find the attached project.


M
Replied on 13/10/2015

hi siddhart,

you project is working fine.

Responsive image

M
Replied on 13/10/2015

hi lokesh,

your project is also working fine. I just had to get rid of thorow new exception in @before test


[attachment=1:e7agw9pv]Screenshot (4).png[/attachment:e7agw9pv]

[attachment=0:e7agw9pv]Screenshot (7).png[/attachment:e7agw9pv]

Responsive image

M
Replied on 13/10/2015

Hi Ashish/Lokesh,

I initially was running this project on a different pc with windows 7, today I imported it in windows 10 & I was able to run it successfully.
There might be some issue with configuration/pc/os.


M
Replied on 13/10/2015

there is always some configuration issue.


M
Replied on 14/10/2015

@ Ashish still it is not working for me

I am using the eclipse Version: Mars Release (4.5.0). is their any problem in this version.

Can you please provide me the Version of eclipse you using or link to download.


M
Replied on 15/10/2015

hi,

use eclipse luna not mars.


M
Replied on 15/10/2015

It works fine for me after using Eclipse Luna thanks Responsive image