Various Tests using TestNG Run One After the Other

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

Various Tests using TestNG Run One After the Other

youralok@gmail.com
Hi,

I am working on Selenium WebDriver with TestNG in Eclipse.
I have written a class and various test cases under @Test annotation.
I am trying to run all the test cases one after the other, but it doesn't run. I have used an object to open the web browser and normally, we use the same object to create several other objects to find xpath and perform action on them.

It is unable to use the object that I created as a public for opening the web browser and it is not able to find the xpath as no action is performed.

I don't want to use  'depends' as the current test/method wont execute if its predecessor method fails.

Please help

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/-/BbuMQDysxfcJ.
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: Various Tests using TestNG Run One After the Other

Krishnan Mahadevan
Kumar,
Can you please share your code ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:02 PM, Kumar <[hidden email]> wrote:
Hi,

I am working on Selenium WebDriver with TestNG in Eclipse.
I have written a class and various test cases under @Test annotation.
I am trying to run all the test cases one after the other, but it doesn't run. I have used an object to open the web browser and normally, we use the same object to create several other objects to find xpath and perform action on them.

It is unable to use the object that I created as a public for opening the web browser and it is not able to find the xpath as no action is performed.

I don't want to use  'depends' as the current test/method wont execute if its predecessor method fails.

Please help

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/-/BbuMQDysxfcJ.
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: Various Tests using TestNG Run One After the Other

youralok@gmail.com
Here it is attached.

Thanks,
Kumar

On Thursday, August 9, 2012 7:27:19 PM UTC+5:30, Krishnan wrote:
Kumar,
Can you please share your code ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:02 PM, Kumar <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="2SS9FB1JgF0J">your...@...> wrote:
Hi,

I am working on Selenium WebDriver with TestNG in Eclipse.
I have written a class and various test cases under @Test annotation.
I am trying to run all the test cases one after the other, but it doesn't run. I have used an object to open the web browser and normally, we use the same object to create several other objects to find xpath and perform action on them.

It is unable to use the object that I created as a public for opening the web browser and it is not able to find the xpath as no action is performed.

I don't want to use  'depends' as the current test/method wont execute if its predecessor method fails.

Please help

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/-/BbuMQDysxfcJ.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="2SS9FB1JgF0J">testng...@....
To unsubscribe from this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="2SS9FB1JgF0J">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/-/-OR4kv6wzRUJ.
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.

Code.txt (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Various Tests using TestNG Run One After the Other

Krishnan Mahadevan
Kumar,
The code looks ok to me. What is the issue you are facing ?

Can you please provide any stacktrace or add more details as to where you are stuck ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:29 PM, Kumar <[hidden email]> wrote:
Here it is attached.

Thanks,
Kumar

On Thursday, August 9, 2012 7:27:19 PM UTC+5:30, Krishnan wrote:
Kumar,
Can you please share your code ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:02 PM, Kumar <[hidden email]> wrote:
Hi,

I am working on Selenium WebDriver with TestNG in Eclipse.
I have written a class and various test cases under @Test annotation.
I am trying to run all the test cases one after the other, but it doesn't run. I have used an object to open the web browser and normally, we use the same object to create several other objects to find xpath and perform action on them.

It is unable to use the object that I created as a public for opening the web browser and it is not able to find the xpath as no action is performed.

I don't want to use  'depends' as the current test/method wont execute if its predecessor method fails.

Please help

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/-/BbuMQDysxfcJ.
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/-/-OR4kv6wzRUJ.
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: Various Tests using TestNG Run One After the Other

youralok@gmail.com
Thanks for reviewing the code. :)

I don't know what is stack trace, don't know how to get it nor I know if it is useful for me. Can you explain more about it?

My problem is this..

For example, in my code, my test "changesinproperties" fails, then subsequent tests are not running and I dont want that to happen.

Thanks,
Kumar

On Thursday, August 9, 2012 8:06:46 PM UTC+5:30, Krishnan wrote:
Kumar,
The code looks ok to me. What is the issue you are facing ?

Can you please provide any stacktrace or add more details as to where you are stuck ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:29 PM, Kumar <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JnSvI0XBNBgJ">your...@...> wrote:
Here it is attached.

Thanks,
Kumar

On Thursday, August 9, 2012 7:27:19 PM UTC+5:30, Krishnan wrote:
Kumar,
Can you please share your code ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:02 PM, Kumar <[hidden email]> wrote:
Hi,

I am working on Selenium WebDriver with TestNG in Eclipse.
I have written a class and various test cases under @Test annotation.
I am trying to run all the test cases one after the other, but it doesn't run. I have used an object to open the web browser and normally, we use the same object to create several other objects to find xpath and perform action on them.

It is unable to use the object that I created as a public for opening the web browser and it is not able to find the xpath as no action is performed.

I don't want to use  'depends' as the current test/method wont execute if its predecessor method fails.

Please help

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/-/BbuMQDysxfcJ.
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/-/-OR4kv6wzRUJ.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="JnSvI0XBNBgJ">testng...@....
To unsubscribe from this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="JnSvI0XBNBgJ">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/-/AkqsWyzJENQJ.
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: Various Tests using TestNG Run One After the Other

youralok@gmail.com
The reason I have dependencies used because of the sequence of the tests. They should run in a sequence and if any test fails in between, the next test case should run without any problem.

Thanks,
Kumar

On Thursday, August 9, 2012 8:16:49 PM UTC+5:30, Kumar wrote:
Thanks for reviewing the code. :)

I don't know what is stack trace, don't know how to get it nor I know if it is useful for me. Can you explain more about it?

My problem is this..

For example, in my code, my test "changesinproperties" fails, then subsequent tests are not running and I dont want that to happen.

Thanks,
Kumar

On Thursday, August 9, 2012 8:06:46 PM UTC+5:30, Krishnan wrote:
Kumar,
The code looks ok to me. What is the issue you are facing ?

Can you please provide any stacktrace or add more details as to where you are stuck ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:29 PM, Kumar <[hidden email]> wrote:
Here it is attached.

Thanks,
Kumar

On Thursday, August 9, 2012 7:27:19 PM UTC+5:30, Krishnan wrote:
Kumar,
Can you please share your code ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Aug 9, 2012 at 7:02 PM, Kumar <[hidden email]> wrote:
Hi,

I am working on Selenium WebDriver with TestNG in Eclipse.
I have written a class and various test cases under @Test annotation.
I am trying to run all the test cases one after the other, but it doesn't run. I have used an object to open the web browser and normally, we use the same object to create several other objects to find xpath and perform action on them.

It is unable to use the object that I created as a public for opening the web browser and it is not able to find the xpath as no action is performed.

I don't want to use  'depends' as the current test/method wont execute if its predecessor method fails.

Please help

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/-/BbuMQDysxfcJ.
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/-/-OR4kv6wzRUJ.
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/-/cL6parGqsmsJ.
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: Various Tests using TestNG Run One After the Other

Tomek Kaczanowski-3
Hi Kumar,

the behaviour you are observing is exactly what dependsOnMethods was
meant for. Maybe "priority" is what you are after - please see
http://testng.org/doc/documentation-main.html

--
Regards / Pozdrawiam
Tomek Kaczanowski
http://practicalunittesting.com


2012/8/9 Kumar <[hidden email]>:

> The reason I have dependencies used because of the sequence of the tests.
> They should run in a sequence and if any test fails in between, the next
> test case should run without any problem.
>
> Thanks,
> Kumar
>
>
> On Thursday, August 9, 2012 8:16:49 PM UTC+5:30, Kumar wrote:
>>
>> Thanks for reviewing the code. :)
>>
>> I don't know what is stack trace, don't know how to get it nor I know if
>> it is useful for me. Can you explain more about it?
>>
>> My problem is this..
>>
>> For example, in my code, my test "changesinproperties" fails, then
>> subsequent tests are not running and I dont want that to happen.
>>
>> Thanks,
>> Kumar
>>
>> On Thursday, August 9, 2012 8:06:46 PM UTC+5:30, Krishnan wrote:
>>>
>>> Kumar,
>>> The code looks ok to me. What is the issue you are facing ?
>>>
>>> Can you please provide any stacktrace or add more details as to where you
>>> are stuck ?
>>>
>>> Thanks & Regards
>>> Krishnan Mahadevan
>>>
>>> "All the desirable things in life are either illegal, expensive,
>>> fattening or in love with someone else!"
>>>
>>>
>>>
>>> On Thu, Aug 9, 2012 at 7:29 PM, Kumar <[hidden email]> wrote:
>>>>
>>>> Here it is attached.
>>>>
>>>> Thanks,
>>>> Kumar
>>>>
>>>> On Thursday, August 9, 2012 7:27:19 PM UTC+5:30, Krishnan wrote:
>>>>>
>>>>> Kumar,
>>>>> Can you please share your code ?
>>>>>
>>>>>
>>>>> Thanks & Regards
>>>>> Krishnan Mahadevan
>>>>>
>>>>> "All the desirable things in life are either illegal, expensive,
>>>>> fattening or in love with someone else!"
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Aug 9, 2012 at 7:02 PM, Kumar <[hidden email]> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am working on Selenium WebDriver with TestNG in Eclipse.
>>>>>> I have written a class and various test cases under @Test annotation.
>>>>>> I am trying to run all the test cases one after the other, but it
>>>>>> doesn't run. I have used an object to open the web browser and normally, we
>>>>>> use the same object to create several other objects to find xpath and
>>>>>> perform action on them.
>>>>>>
>>>>>> It is unable to use the object that I created as a public for opening
>>>>>> the web browser and it is not able to find the xpath as no action is
>>>>>> performed.
>>>>>>
>>>>>> I don't want to use  'depends' as the current test/method wont execute
>>>>>> if its predecessor method fails.
>>>>>>
>>>>>> Please help
>>>>>>
>>>>>> 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/-/BbuMQDysxfcJ.
>>>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msg/testng-users/-/-OR4kv6wzRUJ.
>>>> 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 view this discussion on the web visit
> https://groups.google.com/d/msg/testng-users/-/cL6parGqsmsJ.
>
> 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.