Tests Vs Methods in TestNG

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Tests Vs Methods in TestNG

youralok@gmail.com
Hi,

Please see the attached screenshot and it shows methods passed instead of tests.

Why?

Do I need to ensure it shows tests passed or its okay?

Thanks,
Kumar

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/j8YVpLz_EmAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

TestNG_TestsVsMethods.png (31K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tests Vs Methods in TestNG

吴亭
Tests means how many <test> tags you have in your xml files.

Br
Tim

2012/8/9 Kumar <[hidden email]>
Hi,

Please see the attached screenshot and it shows methods passed instead of tests.

Why?

Do I need to ensure it shows tests passed or its okay?

Thanks,
Kumar

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/j8YVpLz_EmAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Tests Vs Methods in TestNG

youralok@gmail.com
Tim, 

I agree.

I have more than one @test annotations in my code, but still it shows only one test, but correct number of methods.

I have a method immediately after the @test annotation.

Thanks,
Kumar.

On Thursday, August 9, 2012 8:24:57 PM UTC+5:30, Tim-Ericsson wrote:
Tests means how many <test> tags you have in your xml files.

Br
Tim

2012/8/9 Kumar <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="aJ-o9CorHOQJ">your...@...>
Hi,

Please see the attached screenshot and it shows methods passed instead of tests.

Why?

Do I need to ensure it shows tests passed or its okay?

Thanks,
Kumar

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/j8YVpLz_EmAJ.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="aJ-o9CorHOQJ">testng...@....
To unsubscribe from this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="aJ-o9CorHOQJ">testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/3omKddYZWL0J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Tests Vs Methods in TestNG

youralok@gmail.com
By the way, I am not using any xml file here.

What is the purpose of using xml files here?
How efficient can I make my automation test with it?

Thanks,
Kumar

On Thursday, August 9, 2012 8:27:25 PM UTC+5:30, Kumar wrote:
Tim, 

I agree.

I have more than one @test annotations in my code, but still it shows only one test, but correct number of methods.

I have a method immediately after the @test annotation.

Thanks,
Kumar.

On Thursday, August 9, 2012 8:24:57 PM UTC+5:30, Tim-Ericsson wrote:
Tests means how many <test> tags you have in your xml files.

Br
Tim

2012/8/9 Kumar <[hidden email]>
Hi,

Please see the attached screenshot and it shows methods passed instead of tests.

Why?

Do I need to ensure it shows tests passed or its okay?

Thanks,
Kumar

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/j8YVpLz_EmAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/HdWT2v-smf8J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Tests Vs Methods in TestNG

吴亭
In reply to this post by youralok@gmail.com
Hi Kumar,

Actually, you can use xml files to compose your suite like this:

<suite name="xx">

<listeners>
<listener class-name="a.b.c.xxx"></listener>
</listeners>

<test name="yy">
<classes>
<class name="a.b.c.GGGG"></class>
</classes>
</test>
<test name="yfy">
<classes>
<class name="a.b.c.GGGG"></class>
</classes>
</test>
</suite>

If you do not define this and run your code using testng eclipse plugin, it will help you generate a default xml file in your tmp folder.

Br,
Tim
2012/8/9 Kumar <[hidden email]>
Tim, 

I agree.

I have more than one @test annotations in my code, but still it shows only one test, but correct number of methods.

I have a method immediately after the @test annotation.

Thanks,
Kumar.


On Thursday, August 9, 2012 8:24:57 PM UTC+5:30, Tim-Ericsson wrote:
Tests means how many <test> tags you have in your xml files.

Br
Tim

2012/8/9 Kumar <[hidden email]>
Hi,

Please see the attached screenshot and it shows methods passed instead of tests.

Why?

Do I need to ensure it shows tests passed or its okay?

Thanks,
Kumar

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/j8YVpLz_EmAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/3omKddYZWL0J.

To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Tests Vs Methods in TestNG

⇜Krishnan Mahadevan⇝
Kumar,
I think you need to spend sometime reading the documentation on the testng site. Most of your questions would be answered on your own once you read the documentation. 

When you right click your class and run it as run as TestNG test, what TestNG does is, it adds up your @Test annotated test methods into a <test> tag which again gets wrapped up into a <suite>. 

In short a test suite <suite> contains of one or more <test> tests. Every <test> contains one or more @Test annotated test methods. 

On Thursday, August 9, 2012, 吴亭 wrote:
Hi Kumar,

Actually, you can use xml files to compose your suite like this:

<suite name="xx">

<listeners>
<listener class-name="a.b.c.xxx"></listener>
</listeners>

<test name="yy">
<classes>
<class name="a.b.c.GGGG"></class>
</classes>
</test>
<test name="yfy">
<classes>
<class name="a.b.c.GGGG"></class>
</classes>
</test>
</suite>

If you do not define this and run your code using testng eclipse plugin, it will help you generate a default xml file in your tmp folder.

Br,
Tim
2012/8/9 Kumar <<a href="javascript:_e({}, &#39;cvml&#39;, &#39;youralok@gmail.com&#39;);" target="_blank">youralok@...>
Tim, 

I agree.

I have more than one @test annotations in my code, but still it shows only one test, but correct number of methods.

I have a method immediately after the @test annotation.

Thanks,
Kumar.


On Thursday, August 9, 2012 8:24:57 PM UTC+5:30, Tim-Ericsson wrote:
Tests means how many <test> tags you have in your xml files.

Br
Tim

2012/8/9 Kumar <[hidden email]>
Hi,

Please see the attached screenshot and it shows methods passed instead of tests.

Why?

Do I need to ensure it shows tests passed or its okay?

Thanks,
Kumar

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/j8YVpLz_EmAJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/3omKddYZWL0J.

To post to this group, send email to <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users@googlegroups.com&#39;);" target="_blank">testng-users@....
To unsubscribe from this group, send email to <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users%2Bunsubscribe@googlegroups.com&#39;);" target="_blank">testng-users+unsubscribe@....
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users@googlegroups.com&#39;);" target="_blank">testng-users@....
To unsubscribe from this group, send email to <a href="javascript:_e({}, &#39;cvml&#39;, &#39;testng-users%2Bunsubscribe@googlegroups.com&#39;);" target="_blank">testng-users+unsubscribe@....
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.