Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-WWW-Mechanize CPAN distribution.

Report information
The Basics
Id: 28767
Status: resolved
Priority: 0/
Queue: Test-WWW-Mechanize

People
Owner: Nobody in particular
Requestors: JSWARTZ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Default test descriptions
Hi Andy, Using Test::WWW::Mechanize 1.14. It seems to me that some default test descriptions could be supplied automatically if not given, for example $mech->title_is('Invoice Status'); ==> ok - title is Invoice Status $mech->content_contains( "Andy Lester", "My name somewhere" ); ==> ok - content contains "Andy Lester" Obviously these aren't ideal test descriptions since they don't provide context, but in some cases they are sufficient, and avoid the tedium of essentially repeating the condition in the description. Would you be open to adding some of these if I supplied a patch? I understand this would be a backward incompatibility since people would now get a default description instead of a blank one, but I'm not sure whether you consider this important. Let me know, and thanks for the Mechanize family! Jon
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Thu, 9 Aug 2007 13:02:57 -0500
To: via RT <bug-Test-WWW-Mechanize [...] rt.cpan.org>
From: Andy Lester <andy [...] petdance.com>
So you're saying that these would be identical: $mech->title_is( 'Invoice Status' ); $mech->title_is( 'Invoice Status', 'Page title is "Invoice Status"' ) Roughly? That sounds like a swell idea. Make it so. Thanks! Show quoted text
> Would you be open to adding some of these if I supplied a patch? I > understand this would be a backward incompatibility since people would > now get a default description instead of a blank one, but I'm not sure > whether you consider this important.
Better than a patch, I mean to move Mech over to code.google.com some time, if you'd prefer to do it as a branch. -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Thu, 9 Aug 2007 11:26:16 -0700
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
On Aug 9, 2007, at 11:03 AM, andy@petdance.com via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > > > So you're saying that these would be identical: > > $mech->title_is( 'Invoice Status' ); > $mech->title_is( 'Invoice Status', 'Page title is "Invoice > Status"' ) > > Roughly? That sounds like a swell idea. Make it so. Thanks! >
Exactly. Will do. Show quoted text
>> Would you be open to adding some of these if I supplied a patch? I >> understand this would be a backward incompatibility since people >> would >> now get a default description instead of a blank one, but I'm not >> sure >> whether you consider this important.
> > Better than a patch, I mean to move Mech over to code.google.com some > time, if you'd prefer to do it as a branch. >
Sure. I was planning on doing this pretty soon (for myself, anyway) since I'm just starting a huge acceptance test suite and want to minimize the tedium. But I'm happy to wait until you get it up on code.google.com and create a branch - either way. Jon
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Thu, 9 Aug 2007 13:35:59 -0500
To: Jonathan Swartz via RT <bug-Test-WWW-Mechanize [...] rt.cpan.org>
From: Andy Lester <andy [...] petdance.com>
Show quoted text
> Sure. I was planning on doing this pretty soon (for myself, anyway) > since I'm just starting a huge acceptance test suite and want to > minimize the tedium. But I'm happy to wait until you get it up on > code.google.com and create a branch - either way.
Maybe I'll do the migration today. I'm not sure what it'll take. :-/ xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
CC: JSWARTZ [...] cpan.org
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Thu, 9 Aug 2007 11:52:58 -0700
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
And while we are on the subject of minimizing tedium... Is there any way to set the URL base for Mech, so that I don't have to keep typing a scheme and hostname? e.g. $mech->set_url_base('http://www.foo.org') $mech->get_ok('/bar'); $mech->get_ok('/baz'); being equivalent to $mech->get_ok('http://www.foo.org/bar'); $mech->get_ok('http://www.foo.org/baz'); This would be useful when running a large suite of tests against a single site. I looked in WWW::Mechanize and LWP::UserAgent and the various LWP and HTTP modules, but couldn't find a way to do this. Again, happy to do it if you are in agreement. Thanks Jon On Aug 9, 2007, at 11:27 AM, Jonathan Swartz via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > > > > On Aug 9, 2007, at 11:03 AM, andy@petdance.com via RT wrote: >
>> >> <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > >> >> So you're saying that these would be identical: >> >> $mech->title_is( 'Invoice Status' ); >> $mech->title_is( 'Invoice Status', 'Page title is "Invoice >> Status"' ) >> >> Roughly? That sounds like a swell idea. Make it so. Thanks! >>
> > Exactly. Will do. >
>>> Would you be open to adding some of these if I supplied a patch? I >>> understand this would be a backward incompatibility since people >>> would >>> now get a default description instead of a blank one, but I'm not >>> sure >>> whether you consider this important.
>> >> Better than a patch, I mean to move Mech over to code.google.com some >> time, if you'd prefer to do it as a branch. >>
> > Sure. I was planning on doing this pretty soon (for myself, anyway) > since I'm just starting a huge acceptance test suite and want to > minimize the tedium. But I'm happy to wait until you get it up on > code.google.com and create a branch - either way. > > Jon > >
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Thu, 9 Aug 2007 14:50:50 -0500
To: Jonathan Swartz via RT <bug-Test-WWW-Mechanize [...] rt.cpan.org>
From: Andy Lester <andy [...] petdance.com>
Show quoted text
> Is there any way to set the URL base for Mech, so that I don't have > to keep typing a scheme and hostname? e.g. > > $mech->set_url_base('http://www.foo.org') > $mech->get_ok('/bar'); > $mech->get_ok('/baz');
Yeah, there's a base() method in Mech, I believe. NOt sure if it sets, though. -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Thu, 9 Aug 2007 13:13:08 -0700
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > >
>> Sure. I was planning on doing this pretty soon (for myself, anyway) >> since I'm just starting a huge acceptance test suite and want to >> minimize the tedium. But I'm happy to wait until you get it up on >> code.google.com and create a branch - either way.
> > Maybe I'll do the migration today. I'm not sure what it'll take. :-/ >
Ok. My patch is done (including tests), so just let me know. Jon
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Thu, 9 Aug 2007 13:19:46 -0700
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
On Aug 9, 2007, at 12:51 PM, andy@petdance.com via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > >
>> Is there any way to set the URL base for Mech, so that I don't have >> to keep typing a scheme and hostname? e.g. >> >> $mech->set_url_base('http://www.foo.org') >> $mech->get_ok('/bar'); >> $mech->get_ok('/baz');
> > Yeah, there's a base() method in Mech, I believe. NOt sure if it > sets, > though. >
I see, so you only have to include the base the first time. That's good enough then - thanks. Jon
CC: JSWARTZ [...] cpan.org
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Fri, 7 Sep 2007 14:02:27 -0700
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
From: Jonathan Swartz <swartz [...] pobox.com>
On Aug 9, 2007, at 11:36 AM, andy@petdance.com via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > >
>> Sure. I was planning on doing this pretty soon (for myself, anyway) >> since I'm just starting a huge acceptance test suite and want to >> minimize the tedium. But I'm happy to wait until you get it up on >> code.google.com and create a branch - either way.
> > Maybe I'll do the migration today. I'm not sure what it'll take. :-/ > > xoa >
Hi Andy...any progress on this? I've got a patch ready for Test::WWW::Mechanize, including tests and docs, and I can send that to you or create a branch on code.google.com. Jon
On Fri Sep 07 17:03:17 2007, swartz@pobox.com wrote: Show quoted text
> On Aug 9, 2007, at 11:36 AM, andy@petdance.com via RT wrote: >
> > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > > >
> >> Sure. I was planning on doing this pretty soon (for myself, anyway) > >> since I'm just starting a huge acceptance test suite and want to > >> minimize the tedium. But I'm happy to wait until you get it up on > >> code.google.com and create a branch - either way.
> > > > Maybe I'll do the migration today. I'm not sure what it'll take. :-/ > > > > xoa > >
> > Hi Andy...any progress on this? I've got a patch ready for > Test::WWW::Mechanize, including tests and docs, and I can send that > to you or create a branch on code.google.com. > > Jon >
You got this ready? Mech is over on code.google.com and I wanna make a release soon.
Before you do any more work looking at this, take a look at the default descriptions I've just added to get_ok and post_ok. This thread is now closed. Future work at http://code.google.com/p/www-mechanize/issues/list if you want to open a new ticket there.
CC: JSWARTZ [...] cpan.org, Andy Lester <andy [...] petdance.com>
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Tue, 30 Oct 2007 11:56:18 -0700
To: Andy Lester via RT <bug-Test-WWW-Mechanize [...] rt.cpan.org>
From: Jonathan Swartz <swartz [...] pobox.com>
On Oct 29, 2007, at 9:27 AM, Andy Lester via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > > > On Fri Sep 07 17:03:17 2007, swartz@pobox.com wrote:
>> On Aug 9, 2007, at 11:36 AM, andy@petdance.com via RT wrote: >>
>>> >>> <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > >>>
>>>> Sure. I was planning on doing this pretty soon (for myself, anyway) >>>> since I'm just starting a huge acceptance test suite and want to >>>> minimize the tedium. But I'm happy to wait until you get it up on >>>> code.google.com and create a branch - either way.
>>> >>> Maybe I'll do the migration today. I'm not sure what it'll >>> take. :-/ >>> >>> xoa >>>
>> >> Hi Andy...any progress on this? I've got a patch ready for >> Test::WWW::Mechanize, including tests and docs, and I can send that >> to you or create a branch on code.google.com. >> >> Jon >>
> > You got this ready? Mech is over on code.google.com and I wanna > make a > release soon. >
It's ready. Do you want me to put my changes on a branch? Don't I need membership to the project to do this? Jon
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Tue, 30 Oct 2007 11:58:31 -0700
To: Andy Lester via RT <bug-Test-WWW-Mechanize [...] rt.cpan.org>, JSWARTZ [...] cpan.org, Andy Lester <andy [...] petdance.com>
From: Jonathan Swartz <swartz [...] pobox.com>
Show quoted text
> > On Oct 29, 2007, at 9:27 AM, Andy Lester via RT wrote: >
>> >> <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > >> >> On Fri Sep 07 17:03:17 2007, swartz@pobox.com wrote:
>>> On Aug 9, 2007, at 11:36 AM, andy@petdance.com via RT wrote: >>>
>>>> >>>> <URL: http://rt.cpan.org/Ticket/Display.html?id=28767 > >>>>
>>>>> Sure. I was planning on doing this pretty soon (for myself, >>>>> anyway) >>>>> since I'm just starting a huge acceptance test suite and want to >>>>> minimize the tedium. But I'm happy to wait until you get it up on >>>>> code.google.com and create a branch - either way.
>>>> >>>> Maybe I'll do the migration today. I'm not sure what it'll >>>> take. :-/ >>>> >>>> xoa >>>>
>>> >>> Hi Andy...any progress on this? I've got a patch ready for >>> Test::WWW::Mechanize, including tests and docs, and I can send that >>> to you or create a branch on code.google.com. >>> >>> Jon >>>
>> >> You got this ready? Mech is over on code.google.com and I wanna >> make a >> release soon. >>
> > It's ready. Do you want me to put my changes on a branch? Don't I > need membership to the project to do this?
Also, the anon checkout command on http://code.google.com/p/www- mechanize/source doesn't seem to work. % svn checkout http://www-mechanize.googlecode.com/svn/trunk/ www- mechanize svn: URL 'http://www-mechanize.googlecode.com/svn/trunk' doesn't exist
Subject: Re: [rt.cpan.org #28767] Default test descriptions
Date: Tue, 30 Oct 2007 13:58:42 -0500
To: bug-Test-WWW-Mechanize [...] rt.cpan.org
From: Andy Lester <andy [...] petdance.com>
Show quoted text
> > It's ready. Do you want me to put my changes on a branch? Don't I > need membership to the project to do this? > > Jon
Yes, you do. Email me at the address below your google mail ID. Or just mail me the patch. But don't reply to RT any more. Thanks, Andy -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance