Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Verify and Continue a verification point....
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Manjunath Bellur  
View profile  
 More options Jun 24, 5:52 am
From: Manjunath Bellur <manjunath.bel...@gmail.com>
Date: Wed, 24 Jun 2009 15:22:15 +0530
Local: Wed, Jun 24 2009 5:52 am
Subject: Verify and Continue a verification point....

Hi,    I am using Selenium RC and TestNG. I have a testcase written to
verify multiple point in a page.

public class Testthepage {

@Beforeclass (alwaysRun = true)
public void setUp () {
  openUI.setUP ()

}

@Test
public void verifyUI () {

   selenium.open (<URL>);
   assertTrue (selenium.isElementPresent ("id=txtfiled"));
   assertTrue (selenium.isElementPresent ("id=submit"));
   assertTrue (selenium.isElementPresent ("id=drpdwn1"));
   assertTrue (selenium.isElementPresent ("id=radiobtn"));

}

@Test
public void Verify () {
....
..... etc

}
}

My test case steps are below.
   a) Open the Page (<some URL>)
   b) Verify Text Field "t1" is prensent
   c) Verify button "go" is present.
   d) Verify dropdown "dr1" present.
   e) Verify radio "rd1" present.

Now if the first verification fails (Verification point b ) the other
Verification c to e will not get executed. My requirement is to make sure
even though the first verification point fails it should continue with other
assert statements, however the whole testcases should show as Failed. How do
I make this work using TestNG.

Please help me on solving this problem.

Thanks and Regards,
Manjunath


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
konstantin  
View profile  
 More options Jun 24, 12:09 pm
From: konstantin <konstantin.a.sa...@gmail.com>
Date: Wed, 24 Jun 2009 09:09:18 -0700 (PDT)
Local: Wed, Jun 24 2009 12:09 pm
Subject: Re: Verify and Continue a verification point....
Manjunath,
  you can do this way:

boolean isTxtfiledPresent = selenium.isElementPresent ("id=txtfiled");
...
boolean isRadiobtnPresent = selenium.isElementPresent ("id=radiobtn");

assertTrue("isTxtfiledPresent = "+isTxtfiledPresent+...,
isTxtfiledPresent && .. && isRadiobtnPresent);

Konstantin

On 24 июн, 13:52, Manjunath Bellur <manjunath.bel...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cédric Beust ♔  
View profile  
 More options Jun 24, 12:23 pm
From: Cédric Beust ♔ <cbe...@google.com>
Date: Wed, 24 Jun 2009 09:23:19 -0700
Local: Wed, Jun 24 2009 12:23 pm
Subject: Re: [testng-users] Re: Verify and Continue a verification point....

Yes, that's the best way.  You might want to add a message to this approach
so that the final assert will fail with an error that will tell you exactly
which boolean was false...

--
Cedric

2009/6/24 konstantin <konstantin.a.sa...@gmail.com>

--
***Cédric
*

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manjunath Bellur  
View profile  
 More options Jun 25, 2:48 am
From: Manjunath Bellur <manjunath.bel...@gmail.com>
Date: Thu, 25 Jun 2009 12:18:45 +0530
Local: Thurs, Jun 25 2009 2:48 am
Subject: Re: [testng-users] Re: Verify and Continue a verification point....

Thanks Konstantin and Cedric,       This is a nice idea.  However every
testcase having this kind of verification would have many boolean variables
declared, which may be cumbersome and confusing.

Cedric : Would that be a good idea to extend the current assert* statements
to Verify and Continue.  *assert** can take an extra parameter (TRUE or
FALSE (default to False)). This means the execution of next steps will
continue if TRUE is passed, else would come out of testcases. However in
both the cases if any step has failed the whole testcase is marked as
Failed.

If you agree with this, will be eagerly waiting for the next version of
TestNG. :)

Let me know your thoughts,

Thanks and Regards,
Manjunath

2009/6/24 Cédric Beust ♔ <cbe...@google.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
konstantin  
View profile  
 More options Jun 25, 8:05 am
From: konstantin <konstantin.a.sa...@gmail.com>
Date: Thu, 25 Jun 2009 05:05:17 -0700 (PDT)
Local: Thurs, Jun 25 2009 8:05 am
Subject: Re: Verify and Continue a verification point....
You can do this in your project. assert* - just static method which
call fail() in some condition. So you can define these conditions,
make your own assertCollectionTrue(Collection<Boolean>) or something
like this.

On 25 июн, 10:48, Manjunath Bellur <manjunath.bel...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cédric Beust ♔  
View profile  
 More options Jun 25, 11:05 am
From: Cédric Beust ♔ <cbe...@google.com>
Date: Thu, 25 Jun 2009 08:05:57 -0700
Local: Thurs, Jun 25 2009 11:05 am
Subject: Re: [testng-users] Re: Verify and Continue a verification point....

Yes, like Konstantin is saying, it's probably preferable for you to write
these extended assert methods for the cases you need.  There are a lot of
assert methods in the TestNG classes and I don't think that adding a boolean
to all of them (or duplicating the existing methods) is worth it.

But I'm thinking of a more general system that might be of assistance to you
in order to solve the kind of problem you're encountering, I'll try to find
some time to write a blog post about it and I'll let you know.

--
Cedric

On Thu, Jun 25, 2009 at 5:05 AM, konstantin <konstantin.a.sa...@gmail.com>wrote:

--
***Cédric
*

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cédric Beust ♔  
View profile  
 More options Jun 25, 12:28 pm
From: Cédric Beust ♔ <cbe...@google.com>
Date: Thu, 25 Jun 2009 09:28:30 -0700
Local: Thurs, Jun 25 2009 12:28 pm
Subject: Re: [testng-users] Re: Verify and Continue a verification point....

The blog post is up:

http://beust.com/weblog/archives/000514.html

Comments welcome.

--
***Cédric
*

2009/6/25 Cédric Beust ♔ <cbe...@google.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manjunath Bellur  
View profile  
 More options Jun 26, 11:54 am
From: Manjunath Bellur <manjunath.bel...@gmail.com>
Date: Fri, 26 Jun 2009 21:24:46 +0530
Local: Fri, Jun 26 2009 11:54 am
Subject: Re: [testng-users] Re: Verify and Continue a verification point....

Hi Cedric,    Thanks for the blog. I would have the assertsoft as mentioned
by you. However, it would be good if the Framework itself provides this
feature. Like me, many other will also be or may face the same problem. :).

Thanks and Regards
Manjunath

2009/6/25 Cédric Beust ♔ <cbe...@google.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cédric Beust ♔  
View profile  
 More options Jun 26, 12:15 pm
From: Cédric Beust ♔ <cbe...@google.com>
Date: Fri, 26 Jun 2009 09:15:56 -0700
Local: Fri, Jun 26 2009 12:15 pm
Subject: Re: [testng-users] Re: Verify and Continue a verification point....

Hi Manjunath,

Noted.  Be sure to read the comments, a few people have already chimed in
and offered improvements on the original idea.  I'll wait to see how this
unfolds before deciding what TestNG could provide.

--
***Cédric
*

2009/6/26 Manjunath Bellur <manjunath.bel...@gmail.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Manjunath Bellur  
View profile  
 More options Jun 26, 1:15 pm
From: Manjunath Bellur <manjunath.bel...@gmail.com>
Date: Fri, 26 Jun 2009 22:45:41 +0530
Local: Fri, Jun 26 2009 1:15 pm
Subject: Re: [testng-users] Re: Verify and Continue a verification point....

Sure, Thanks for the help :). If you decide on implementing in TestNG
itself, just let me know and I will be ready to grab the next version of
TestNG.
Thanks and Regards
Manjunath

2009/6/26 Cédric Beust ♔ <cbe...@google.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google