You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(14) |
Oct
(22) |
Nov
(21) |
Dec
(7) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(4) |
Feb
(26) |
Mar
(62) |
Apr
(60) |
May
(73) |
Jun
(41) |
Jul
(64) |
Aug
(39) |
Sep
(19) |
Oct
(18) |
Nov
(55) |
Dec
(24) |
| 2005 |
Jan
(35) |
Feb
(122) |
Mar
(130) |
Apr
(62) |
May
(57) |
Jun
(103) |
Jul
(71) |
Aug
(142) |
Sep
(67) |
Oct
(27) |
Nov
(49) |
Dec
(56) |
| 2006 |
Jan
(42) |
Feb
(65) |
Mar
(30) |
Apr
(43) |
May
(13) |
Jun
(25) |
Jul
(5) |
Aug
(14) |
Sep
(18) |
Oct
(55) |
Nov
(126) |
Dec
(82) |
| 2007 |
Jan
(83) |
Feb
(83) |
Mar
(173) |
Apr
(30) |
May
(64) |
Jun
(156) |
Jul
(50) |
Aug
(29) |
Sep
(25) |
Oct
(26) |
Nov
(51) |
Dec
(9) |
| 2008 |
Jan
(36) |
Feb
(71) |
Mar
(93) |
Apr
(123) |
May
(34) |
Jun
(14) |
Jul
(21) |
Aug
(26) |
Sep
(49) |
Oct
(38) |
Nov
(19) |
Dec
(46) |
| 2009 |
Jan
(18) |
Feb
(16) |
Mar
(46) |
Apr
(4) |
May
(18) |
Jun
(9) |
Jul
(11) |
Aug
(4) |
Sep
(31) |
Oct
(19) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(15) |
Feb
(9) |
Mar
|
Apr
(20) |
May
(5) |
Jun
(8) |
Jul
(2) |
Aug
(9) |
Sep
(6) |
Oct
(21) |
Nov
(20) |
Dec
(11) |
| 2011 |
Jan
(11) |
Feb
(5) |
Mar
(6) |
Apr
(1) |
May
(12) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(4) |
Oct
(3) |
Nov
(3) |
Dec
(5) |
| 2012 |
Jan
(28) |
Feb
(7) |
Mar
(3) |
Apr
|
May
(5) |
Jun
(6) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(4) |
Nov
(5) |
Dec
(4) |
| 2013 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Culley H. <cu...@fa...> - 2004-04-29 18:30:13
|
Yes I have been using these methods. This does not work:
$this->get('http://example.com');
$this->authenticate(HTTP_USER, HTTP_PASSWORD);
$this->post(blah blah);
//title of doc received is "401 Authorization Required"
On Apr 29, 2004, at 11:21 AM, Jason Sweat wrote:
> $this->assertFalse($this->get('http://url.with.auth/'));
> $this->assertTrue($this->authenticate('user','passwd'));
>
> And then hopefully the SimpleBrowser would remember it from this point
> on and
> continue to provide it for all requests when challenged, even posts.
>
|
|
From: Culley H. <cu...@fa...> - 2004-04-29 18:22:58
|
It might but then I am going to hit the bug where I am using an email
address for the user and SimpleTest can't yet handle two @ symbols. I
suppose I could create a different account for testing...
On Apr 29, 2004, at 11:10 AM, Jason Sweat wrote:
> Have not tried it myself, but does
> $this->Get('http://user:pa...@ww.../');
> work?
|
|
From: Jason S. <jsw...@ya...> - 2004-04-29 18:21:18
|
--- Culley Harrelson <cu...@fa...> wrote:
> Basic authentication. a 401 response.
>
> On Apr 29, 2004, at 10:49 AM, Jason Sweat wrote:
>
> > What do you mean by "protected url"?
Again, have not worked with it, but did you see the authenticate method of the
WebTestCase?
Retries a request after setting the authentication for the current realm.
* return: True if successful fetch. Note that authentication may still have
failed.
* access: public
boolean authenticate (string $username, string $password)
* string $username: Username for realm.
* string $password: Password for realm.
My assumption (based on reading the doc) would be it would work like:
$this->assertFalse($this->get('http://url.with.auth/'));
$this->assertTrue($this->authenticate('user','passwd'));
And then hopefully the SimpleBrowser would remember it from this point on and
continue to provide it for all requests when challenged, even posts.
HTH
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
|
|
From: Jason S. <jsw...@ya...> - 2004-04-29 18:10:48
|
--- Culley Harrelson <cu...@fa...> wrote:
> Basic authentication. a 401 response.
Have not tried it myself, but does
$this->Get('http://user:pa...@ww.../');
work?
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
|
|
From: Culley H. <cu...@fa...> - 2004-04-29 17:56:17
|
Basic authentication. a 401 response. On Apr 29, 2004, at 10:49 AM, Jason Sweat wrote: > What do you mean by "protected url"? |
|
From: Jason S. <jsw...@ya...> - 2004-04-29 17:49:10
|
--- Culley Harrelson <cu...@fa...> wrote: > Is there a way to use the WebTestCase::post on a protected url? I made > a few feeble attempts to do this and failed. What do you mean by "protected url"? __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover |
|
From: Culley H. <cu...@fa...> - 2004-04-29 17:44:51
|
Is there a way to use the WebTestCase::post on a protected url? I made a few feeble attempts to do this and failed. culley |
|
From: Jason S. <jsw...@ya...> - 2004-04-28 10:40:59
|
Marcus, You should have a look at this thread when you get back from holiday: http://www.sitepoint.com/forums/showthread.php?p=1200289 Jason __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover |
|
From: Lemalin <le...@gi...> - 2004-04-27 09:42:11
|
For the record, I test a page that has an unopened tag form that leads
SimpleTest to create an empty form in _complete_form of the page.
ex :
<html><head><title>Bug page</title></head><body>
<form id="1">Valid form</form>
Invalid closed form tag</form>
</body></html>
This leads to the following php error each time I try to set a field in
the page :
Fatal error: Call to a member function on a non-object in
\simpletest\page.php on line 502
The error occurs in the setField method of the page. One fix may be :
Replace the following code in the setField method of the SimplePage class :
for ($i = 0; $i < count($this->_complete_forms); $i++) {
if ($this->_complete_forms[$i]->setField($name, $value)) {
$is_set = true;
}
}
By this code :
for ($i = 0; $i < count($this->_complete_forms); $i++) {
if(is_object($this->_complete_forms[$i])) {
if ($this->_complete_forms[$i]->setField($name, $value)) {
$is_set = true;
}
}
}
Hope this helps
T.L.
> Thanks Lemalin,
>
> Quick fix for my problem was to change SimpleOptionTag::getDefault() in
> tag.php from:
>
> function getDefault() {
> if ($this->getAttribute('value')) {
> return $this->getAttribute('value');
> }
> return $this->getContent();
> }
>
> to this:
>
> function getDefault() {
> if ($this->getAttribute('value') ||
> $this->getAttribute('value') === '0') {
> return $this->getAttribute('value');
> }
> return $this->getContent();
> }
>
> Im sure it's the same for radio button etc.
>
>
> Lemalin wrote:
>
>>I have come accross the same problem and have tracked the problem down :
>>the reason is the simple string containing 0 does not return TRUE when
>>tested with php. Try the following code :
>>$test = "0";
>>echo ($test) ? "ok" : "not ok";
>>... returns "not ok".
>>
>>Or this is precisely the test used in the getValue methods of the widgets
>> :
>>if ($this->_widgets[$i]->getValue()) {
>> $values[] = $this->_widgets[$i]->getValue();
>>}
>>The problems occurs as well whith radio buttons.
>>
>>Hope this downtrack helps
>>T.L.
>>
>>
>>
>>
>>>Jason Sweat wrote:
>>>
>>>
>>>
>>>>--- Brenden Vickery <bre...@w3...> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>Hi...
>>>>>
>>>>>
>>>>>
>>>>>
>>>>Hello, I am not an expert with WebTester, as I have just started using
>>>> it
>>>>myself.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> <select name="userGender" id="userGender">
>>>>> <option value="0" selected="selected">Male and Female</option>
>>>>> <option value="M">Male</option>
>>>>> <option value="F">Female</option>
>>>>> </select>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>I wonder if it is a bug, if it has to do with the fact that php would
>>>>consider
>>>>a string '0' to be false.
>>>>i.e.
>>>>$test = '0';
>>>>echo ($test) ? 'TRUE' : 'FALSE';
>>>>
>>>>
>>>>
>>>I was initially using simpletest wrong, by trying to set the option to 0
>>>but Jason caught the error that was getting me confused. I believe there
>>>is a bug when an option has value="0".
>>>
>>>I created this test in the class testOfSelection in SimpleTests unit
>>>tests to show the error:
>>>
>>>function testSettingZeroMappedOption() {
>>> $tag = &new SimpleSelectionTag(array('name' => 'a'));
>>> $a = &new SimpleOptionTag(array('value' => '0'));
>>> $a->addContent('AAA');
>>> $tag->addTag($a);
>>> $b = &new SimpleOptionTag(array('value' => 'bbb', 'selected'
>>>=> ''));
>>> $b->addContent('BBB');
>>> $tag->addTag($b);
>>> $c = &new SimpleOptionTag(array('value' => 'ccc'));
>>> $c->addContent('CCC');
>>> $tag->setValue('AAA');
>>> $this->assertEqual($tag->getValue(), '0');
>>> }
>>>
>>>It returns this result:
>>>Fail: Unit
>>>tests->tag_test.php->testofselection->testsettingzeromappedoption->Equal
>>>expectation fails at character 0 with [AAA] and [0]
>>>
>>>I cant track the problem down but hopefully Ive done this test right and
>>>it can help out somewhat.
>>>
>>>Brenden Vickery
>>>
>>>
>>>
>>>-------------------------------------------------------
>>>This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
>>>For a limited time only, get FREE Ground shipping on all orders of $35
>>>or more. Hurry up and shop folks, this offer expires April 30th!
>>>http://www.thinkgeek.com/freeshipping/?cpg=12297
>>>_______________________________________________
>>>Simpletest-support mailing list
>>>Sim...@li...
>>>https://lists.sourceforge.net/lists/listinfo/simpletest-support
>>>
>>>
>>>
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
>>For a limited time only, get FREE Ground shipping on all orders of $35
>>or more. Hurry up and shop folks, this offer expires April 30th!
>>http://www.thinkgeek.com/freeshipping/?cpg=12297
>>_______________________________________________
>>Simpletest-support mailing list
>>Sim...@li...
>>https://lists.sourceforge.net/lists/listinfo/simpletest-support
>>
>>
>>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
> For a limited time only, get FREE Ground shipping on all orders of $35
> or more. Hurry up and shop folks, this offer expires April 30th!
> http://www.thinkgeek.com/freeshipping/?cpg=12297
> _______________________________________________
> Simpletest-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simpletest-support
>
|
|
From: Brenden V. <bre...@ya...> - 2004-04-27 07:29:32
|
Thanks Lemalin,
Quick fix for my problem was to change SimpleOptionTag::getDefault() in
tag.php from:
function getDefault() {
if ($this->getAttribute('value')) {
return $this->getAttribute('value');
}
return $this->getContent();
}
to this:
function getDefault() {
if ($this->getAttribute('value') ||
$this->getAttribute('value') === '0') {
return $this->getAttribute('value');
}
return $this->getContent();
}
Im sure it's the same for radio button etc.
Lemalin wrote:
>I have come accross the same problem and have tracked the problem down :
>the reason is the simple string containing 0 does not return TRUE when
>tested with php. Try the following code :
>$test = "0";
>echo ($test) ? "ok" : "not ok";
>... returns "not ok".
>
>Or this is precisely the test used in the getValue methods of the widgets :
>if ($this->_widgets[$i]->getValue()) {
> $values[] = $this->_widgets[$i]->getValue();
>}
>The problems occurs as well whith radio buttons.
>
>Hope this downtrack helps
>T.L.
>
>
>
>
>>Jason Sweat wrote:
>>
>>
>>
>>>--- Brenden Vickery <bre...@w3...> wrote:
>>>
>>>
>>>
>>>
>>>>Hi...
>>>>
>>>>
>>>>
>>>>
>>>Hello, I am not an expert with WebTester, as I have just started using it
>>>myself.
>>>
>>>
>>>
>>>
>>>
>>>> <select name="userGender" id="userGender">
>>>> <option value="0" selected="selected">Male and Female</option>
>>>> <option value="M">Male</option>
>>>> <option value="F">Female</option>
>>>> </select>
>>>>
>>>>
>>>>
>>>>
>>>I wonder if it is a bug, if it has to do with the fact that php would
>>>consider
>>>a string '0' to be false.
>>>i.e.
>>>$test = '0';
>>>echo ($test) ? 'TRUE' : 'FALSE';
>>>
>>>
>>>
>>I was initially using simpletest wrong, by trying to set the option to 0
>>but Jason caught the error that was getting me confused. I believe there
>>is a bug when an option has value="0".
>>
>>I created this test in the class testOfSelection in SimpleTests unit
>>tests to show the error:
>>
>>function testSettingZeroMappedOption() {
>> $tag = &new SimpleSelectionTag(array('name' => 'a'));
>> $a = &new SimpleOptionTag(array('value' => '0'));
>> $a->addContent('AAA');
>> $tag->addTag($a);
>> $b = &new SimpleOptionTag(array('value' => 'bbb', 'selected'
>>=> ''));
>> $b->addContent('BBB');
>> $tag->addTag($b);
>> $c = &new SimpleOptionTag(array('value' => 'ccc'));
>> $c->addContent('CCC');
>> $tag->setValue('AAA');
>> $this->assertEqual($tag->getValue(), '0');
>> }
>>
>>It returns this result:
>>Fail: Unit
>>tests->tag_test.php->testofselection->testsettingzeromappedoption->Equal
>>expectation fails at character 0 with [AAA] and [0]
>>
>>I cant track the problem down but hopefully Ive done this test right and
>>it can help out somewhat.
>>
>>Brenden Vickery
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
>>For a limited time only, get FREE Ground shipping on all orders of $35
>>or more. Hurry up and shop folks, this offer expires April 30th!
>>http://www.thinkgeek.com/freeshipping/?cpg=12297
>>_______________________________________________
>>Simpletest-support mailing list
>>Sim...@li...
>>https://lists.sourceforge.net/lists/listinfo/simpletest-support
>>
>>
>>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
>For a limited time only, get FREE Ground shipping on all orders of $35
>or more. Hurry up and shop folks, this offer expires April 30th!
>http://www.thinkgeek.com/freeshipping/?cpg=12297
>_______________________________________________
>Simpletest-support mailing list
>Sim...@li...
>https://lists.sourceforge.net/lists/listinfo/simpletest-support
>
>
>
|
|
From: Lemalin <le...@gi...> - 2004-04-27 07:07:02
|
I have come accross the same problem and have tracked the problem down :
the reason is the simple string containing 0 does not return TRUE when
tested with php. Try the following code :
$test = "0";
echo ($test) ? "ok" : "not ok";
... returns "not ok".
Or this is precisely the test used in the getValue methods of the widgets :
if ($this->_widgets[$i]->getValue()) {
$values[] = $this->_widgets[$i]->getValue();
}
The problems occurs as well whith radio buttons.
Hope this downtrack helps
T.L.
> Jason Sweat wrote:
>
>>--- Brenden Vickery <bre...@w3...> wrote:
>>
>>
>>>Hi...
>>>
>>>
>>Hello, I am not an expert with WebTester, as I have just started using it
>>myself.
>>
>>
>>
>>> <select name="userGender" id="userGender">
>>> <option value="0" selected="selected">Male and Female</option>
>>> <option value="M">Male</option>
>>> <option value="F">Female</option>
>>> </select>
>>>
>>>
>>
>>I wonder if it is a bug, if it has to do with the fact that php would
>> consider
>>a string '0' to be false.
>>i.e.
>>$test = '0';
>>echo ($test) ? 'TRUE' : 'FALSE';
>>
> I was initially using simpletest wrong, by trying to set the option to 0
> but Jason caught the error that was getting me confused. I believe there
> is a bug when an option has value="0".
>
> I created this test in the class testOfSelection in SimpleTests unit
> tests to show the error:
>
> function testSettingZeroMappedOption() {
> $tag = &new SimpleSelectionTag(array('name' => 'a'));
> $a = &new SimpleOptionTag(array('value' => '0'));
> $a->addContent('AAA');
> $tag->addTag($a);
> $b = &new SimpleOptionTag(array('value' => 'bbb', 'selected'
> => ''));
> $b->addContent('BBB');
> $tag->addTag($b);
> $c = &new SimpleOptionTag(array('value' => 'ccc'));
> $c->addContent('CCC');
> $tag->setValue('AAA');
> $this->assertEqual($tag->getValue(), '0');
> }
>
> It returns this result:
> Fail: Unit
> tests->tag_test.php->testofselection->testsettingzeromappedoption->Equal
> expectation fails at character 0 with [AAA] and [0]
>
> I cant track the problem down but hopefully Ive done this test right and
> it can help out somewhat.
>
> Brenden Vickery
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
> For a limited time only, get FREE Ground shipping on all orders of $35
> or more. Hurry up and shop folks, this offer expires April 30th!
> http://www.thinkgeek.com/freeshipping/?cpg=12297
> _______________________________________________
> Simpletest-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simpletest-support
>
|
|
From: Brenden V. <bre...@ya...> - 2004-04-27 06:52:47
|
Jason Sweat wrote:
>--- Brenden Vickery <bre...@w3...> wrote:
>
>
>>Hi...
>>
>>
>Hello, I am not an expert with WebTester, as I have just started using it
>myself.
>
>
>
>> <select name="userGender" id="userGender">
>> <option value="0" selected="selected">Male and Female</option>
>> <option value="M">Male</option>
>> <option value="F">Female</option>
>> </select>
>>
>>
>
>I wonder if it is a bug, if it has to do with the fact that php would consider
>a string '0' to be false.
>i.e.
>$test = '0';
>echo ($test) ? 'TRUE' : 'FALSE';
>
I was initially using simpletest wrong, by trying to set the option to 0
but Jason caught the error that was getting me confused. I believe there
is a bug when an option has value="0".
I created this test in the class testOfSelection in SimpleTests unit
tests to show the error:
function testSettingZeroMappedOption() {
$tag = &new SimpleSelectionTag(array('name' => 'a'));
$a = &new SimpleOptionTag(array('value' => '0'));
$a->addContent('AAA');
$tag->addTag($a);
$b = &new SimpleOptionTag(array('value' => 'bbb', 'selected'
=> ''));
$b->addContent('BBB');
$tag->addTag($b);
$c = &new SimpleOptionTag(array('value' => 'ccc'));
$c->addContent('CCC');
$tag->setValue('AAA');
$this->assertEqual($tag->getValue(), '0');
}
It returns this result:
Fail: Unit
tests->tag_test.php->testofselection->testsettingzeromappedoption->Equal
expectation fails at character 0 with [AAA] and [0]
I cant track the problem down but hopefully Ive done this test right and
it can help out somewhat.
Brenden Vickery
|
|
From: Jason S. <jsw...@ya...> - 2004-04-27 03:48:19
|
--- Brenden Vickery <bre...@w3...> wrote: > Hi... Hello, I am not an expert with WebTester, as I have just started using it myself. > <select name="userGender" id="userGender"> > <option value="0" selected="selected">Male and Female</option> > <option value="M">Male</option> > <option value="F">Female</option> > </select> I wonder if it is a bug, if it has to do with the fact that php would consider a string '0' to be false. i.e. $test = '0'; echo ($test) ? 'TRUE' : 'FALSE'; > <b>Notice</b>: > SELECT COUNT(*) AS numRows > FROM RACE_CLASS, RACE_DISTANCE, ... Blah > WHERE ... Blah AND USERS.userGender = 'Male and Female' > ... Blah blah > > Basically the problem is the sax parser is not taking into account the > value="???" attribute on options. I dont know if you would call this a > bug report or a feature request, or maybe Im using webtests wrong? > Either way thanks for a great product. It seems interesting that your error message has "Male and Female" which was the value you were trying to submit (0 for the select userGener), however, perhaps this is just a coincidence. Regards, Jason __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover |
|
From: Brenden V. <bre...@w3...> - 2004-04-27 02:46:26
|
Hi...
Im just starting out with unit testing in general and have come across a
problem with webtests.
Im testing a fairly complex form that looks similar to this (Ive cut
alot out to be brief):
<form action="index.php" method="get">
<label for="userFirstname">First Name</label>
<input type="text" id="userFirstname" name="userFirstname" />
<label for="userGender">Sex</label>
<select name="userGender" id="userGender">
<option value="0" selected="selected">Male and Female</option>
<option value="M">Male</option>
<option value="F">Female</option>
</select>
<input type="submit" name="runReport" value="Run Report" />
</form>
Im using this as a test:
define('SKATERAID_RESULTS_URL', SKATERAID_URL . 'index.php?page=Results');
class TestOfResults extends WebTestCase {
function TestOfResults() {
$this->WebTestCase();
}
function testReportForm() {
$this->get(SKATERAID_RESULTS_URL);
$this->assertTrue($this->setField('userFirstname', 'Brenden'));
$this->assertTrue($this->setField('userGender', '0'));
$this->clickSubmit('Run Report');
$this->assertTitle('Skater Aid - Results');
$this->showSource();
}
}
and Im getting these as errors:
Fail: results_test.php->testofresults->testreportform->True assertion
got False
Fail: results_test.php->testofresults->testreportform->Expecting title
[Skater Aid - Results] got []
<b>Notice</b>:
SELECT COUNT(*) AS numRows
FROM RACE_CLASS, RACE_DISTANCE, ... Blah
WHERE ... Blah AND USERS.userGender = 'Male and Female'
... Blah blah
Basically the problem is the sax parser is not taking into account the
value="???" attribute on options. I dont know if you would call this a
bug report or a feature request, or maybe Im using webtests wrong?
Either way thanks for a great product.
Brenden Vickery
|
|
From: Lemalin <le...@gi...> - 2004-04-26 14:26:47
|
Hi, I have some create / change / delete process to test - so as to avoid building specific data for each case, I'd like to have some create test build some new data used for testing both change and delete cases. Which tells me I don't want to run change and delete tests if my create test fails. How could I create such conditionnal testing with SimpleTest ? I've had a look inside SimpleTest's code to see if this was possible, it does not seems so. It would be convenient to me if A Runner could hold record of the tests that have been run, and if they passed or failed, and have a method called something like testWasRun($method), maybe testWasRun($class, $method) for group tests and both testFailed([$class], $method) and testPassed(...). If this is something I can contribute to, just tell me how. T.L. |
|
From: Dorthe L. <lue...@gl...> - 2004-04-23 19:59:34
|
Hi,
probably I just can't think straight... ;-)
I'm using WebTestCase to set a checkbox with a value ("1"), than I
submit the form, go back (there's a back-button on my page), change the
value to something else or "" or "0" and submit again and go back
again). Now the checkbox should be unchecked, but it isn't... it works
well for text-input-fields.. so, what's the trick to do it?!
The HTML-Code for the checkbox looks like this:
<input type="checkbox" name="foo" value="1" class="checkbox"/>
Thanx
Dorthe
|
|
From: Lemalin <le...@gi...> - 2004-04-23 14:44:53
|
Sorry I've been out of my mind as for the last e-mail / the problem comes
up with the method getValues from SimpleForm object.
With my most sincere apologies
T.L.
Here is the function :
function getValues() {
$values = array();
foreach (array_keys($this->_widgets) as $name) {
$new = $this->_widgets[$name]->getValue();
if (is_string($new)) {
$values[$name] = $new;
} elseif (is_array($new)) {
$values[$name] = $new;
}
// what if $new is something else but string or array ??
}
return $values;
> Hi,
>
> Too my mind, the setValue method of the SimpleWidget object is too
> restrictive as for accepted value types : it only accepts strings or
> arrays.
>
> I had it used with an int, and found that this made the parameter I set
> disappear silently somewhere before the web page was fetched and had to
> spend an hour roaming through SimpleTest code to find out that setValue
> simply discarded values of any type different from String and array !
> Isn't it a bit too restrictive ? why not allow numbers ?
>
> Thanks in advance
> T.L.
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
> For a limited time only, get FREE Ground shipping on all orders of $35
> or more. Hurry up and shop folks, this offer expires April 30th!
> http://www.thinkgeek.com/freeshipping/?cpg=12297
> _______________________________________________
> Simpletest-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simpletest-support
>
|
|
From: Lemalin <le...@gi...> - 2004-04-23 14:23:32
|
Hi, Too my mind, the setValue method of the SimpleWidget object is too restrictive as for accepted value types : it only accepts strings or arrays. I had it used with an int, and found that this made the parameter I set disappear silently somewhere before the web page was fetched and had to spend an hour roaming through SimpleTest code to find out that setValue simply discarded values of any type different from String and array ! Isn't it a bit too restrictive ? why not allow numbers ? Thanks in advance T.L. |
|
From: Lemalin <le...@gi...> - 2004-04-23 09:54:07
|
Hi, It seems to me that not being able to change hidden fields values makes it impossible to realise several tests. Here is the thourough story : I have to test a web form using an awkward multiple input button named "action" whose value tells the action to perform. That is in the same html form for example : <input name="action" value="View"> <input name="action" value="Cancel"> It took me an hour to understand why SimpleTest wouldn't work when testing clickSumbit result page because it does not even differentiate those inputs. Within the SimplePage, there is only one _button named "action" whose value happens to be the value of the last input named "action". As I realized I could not test my form using this mecanism, I tried inserting a hidden field named "action" as well, whose value I would then change using the setField method. It took me another two hours realizing SimpleTest would not permit to set << hidden >> field. Please remove this feature/bug from the next releases ... or add a clickSubmitByValue method. Thanks in advance, I just discovered this promising php test framework Real good job indeed, keep on ! T.L. |
|
From: Marcus B. <ma...@la...> - 2004-04-22 00:48:24
|
Hi. I was hoping to get an release out this month, but it doesn't look like this is going to happen. I am on holiday now until May 2nd. This means that the release will happen a week or two after that. Sorry about the delay :(. Essentially the new release will hopefully have everything in the current TODO list in CVS. It will be released when that the list done, rather than to an exact schedule. As Jason seems to be doing a pretty good job on the support, I doubt if I'll be missed anyway ;). yours, Marcus -- Marcus Baker, ma...@la..., no...@ap... |
|
From: Marcus B. <ma...@la...> - 2004-04-21 16:56:44
|
Hi... Yaroslav Dmitriev wrote: > I just wanted to share a finding that saved me considerable amount of > typing today. But it requires XDebug (www.xdebug.org). I have basically stolen your code, but used the PHP 4.3+ function debug_backtrace() to look for the highest assert*() method. It is in CVS and should roll-out on RC1. There is also the public method SimpleTest::getAssertionLine() for use in your own messages, or for overriding with an XDebug version. > Best wishes, > Yar yours, Marcus -- Marcus Baker, ma...@la..., no...@ap... |
|
From: Marcus B. <ma...@la...> - 2004-04-21 12:52:53
|
Hi... Jason Sweat wrote: > > I could have made a "login()" method and just called it at the beginning of > each of the subsequent tests, however, in site I am testing, there is a 10-20 > second overhead (don't blame me, I am just testing it, not writing it ;) ) > involved with the login process that I wanted to avoid by just reusing the same > session credentials for future tests. Aha! :) > Jason -- Marcus Baker, ma...@la..., no...@ap... |
|
From: Jason S. <jsw...@ya...> - 2004-04-21 12:48:23
|
--- Marcus Baker <ma...@la...> wrote:
> Hi...
>
> Jason Sweat wrote:
> > However I did not want to actually login each time, so instead I wanted to
> > "save" a copy of the browser as it exited the moment I finished logging in,
> and
> > then use that browser for the rest of the test cases. To do this, I needed
> a
> > "setBrowser()" method that does not exist on the WebTestCase. In the same
> file
> > as my test case, I defined:
> >
> > class ReuseWebTestCase extends WebTestCase {
> > function ReuseWebTestCase($name=false) {
> > $this->WebTestCase($name);
> > }
> > function setBrowser(&$browser) {
> > $this->_browser =& $browser;
> > }
> > }
>
> I should warn you that this will almost certainly change in the future,
> and at least become a protected variable in PHP5.
Well...protected is still allowed to be used by a child class, so I am alright
as long as you do not go private ;)
>
> There is another way to do this...
>
> class MyMultiStepTest extends WebTestCase {
> ...
> function testSequence() {
> $this->login();
> $this->checkLogin();
> $this->goToHelpPage();
> }
> function login() { ... }
> function checkLogin() { ... }
> function goToHelpPage() { ... }
> }
>
> Only methods that start "test" are automatically run. Doing it this way
> means you cold reuse the steps in different orders.
I could have made a "login()" method and just called it at the beginning of
each of the subsequent tests, however, in site I am testing, there is a 10-20
second overhead (don't blame me, I am just testing it, not writing it ;) )
involved with the login process that I wanted to avoid by just reusing the same
session credentials for future tests. This seemed to me to be the best
compromise.
Regards,
Jason
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
|
|
From: Marcus B. <ma...@la...> - 2004-04-21 12:34:01
|
Hi...
Jason Sweat wrote:
> However I did not want to actually login each time, so instead I wanted to
> "save" a copy of the browser as it exited the moment I finished logging in, and
> then use that browser for the rest of the test cases. To do this, I needed a
> "setBrowser()" method that does not exist on the WebTestCase. In the same file
> as my test case, I defined:
>
> class ReuseWebTestCase extends WebTestCase {
> function ReuseWebTestCase($name=false) {
> $this->WebTestCase($name);
> }
> function setBrowser(&$browser) {
> $this->_browser =& $browser;
> }
> }
I should warn you that this will almost certainly change in the future,
and at least become a protected variable in PHP5.
There is another way to do this...
class MyMultiStepTest extends WebTestCase {
...
function testSequence() {
$this->login();
$this->checkLogin();
$this->goToHelpPage();
}
function login() { ... }
function checkLogin() { ... }
function goToHelpPage() { ... }
}
Only methods that start "test" are automatically run. Doing it this way
means you cold reuse the steps in different orders.
Or automating this slightly instead...
class SequenceTestCase extends WebTestCase {
function SequenceStepTestCase($label = false) {
$this->WebTestCase($label);
}
function testAllSteps() {
$methods = get_class_methods(get_class($this));
foreach ($methods as $method) {
if (strncmp($method, 'step', 4)) {
$this->$method();
}
}
}
}
Now...
class MySequence extends SequenceTestCase() {
function MySequence() {
$this->SequenceTetCase();
}
function stepLogin() { ... }
function stepCheckLogin() { ... }
function stepGoToHelpPage() { ... }
}
You can only have one sequence per test case, but I am sure this can be
refined.
I am going to need long sequences in order to do serious acceptance
tests and I am thinking of adding an "orange" state for unfinished
items. If you write a big acceptance test first it will be a while
before that test passes. Between these times you want to signal that
there are still "todo" items, but the other tests are OK.
yours, Marcus
--
Marcus Baker, ma...@la..., no...@ap...
|
|
From: Jason S. <jsw...@ya...> - 2004-04-21 04:59:31
|
--- Marcus Baker <ma...@la...> wrote: > Hi... > > Thomas Carrié wrote: > > PS : why does getBrowser returns TestBrowser according to the phpdoc > whereas > > there is only a SimpleBrowser class in the phpdoc and no TestBrowser ? > > Because the code docs are often done by me and I keep getting things > wrong :). I'll fix the code now... > I noticed Marcus changed this, and reparsed and uploaded the docs based on the CVS version. This looks good now. Thanks. Jason __________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash |