Closed
Bug 317695
Opened 20 years ago
Closed 19 years ago
Bugzilla Test Suite - QA tests for Selenium
Categories
(Bugzilla :: Testing Suite, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: LpSolit, Assigned: LpSolit)
References
()
Details
Attachments
(5 files, 15 obsolete files)
This is the place to submit your tests for Selenium. No need to request review, no need to request approval. I will apply them myself.
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•20 years ago
|
||
For those who want more information about Selenium, and especially how to write tests, go to:
http://selenium.thoughtworks.com/index.html
| Assignee | ||
Comment 2•20 years ago
|
||
If you need to click a submit button which has no name nor id, you can use this trick:
clickAndWait //input[@type='submit']
assuming there is only one button in the form. Else each button has a name already, so you can use it directly.
| Assignee | ||
Updated•20 years ago
|
| Assignee | ||
Comment 3•20 years ago
|
||
Implementing doLoadConfigFile() and doStoreParams() which permit you to write scripts independently of your local configuration. The parameters are stored in config.html which is in the same directory as the main file called by TestRunner.html.
| Assignee | ||
Comment 4•20 years ago
|
||
(In reply to comment #3)
> Implementing doLoadConfigFile() and doStoreParams()
Call these functions as in the example below:
loadConfigFileAndWait | | <--- "AndWait" is important, else the script goes to the next instruction before config.html is completely loaded, and misses the parameters contained in this file.
storeParams | foo, bar, baz | <--- load and store parameters in variables having the same name. This way, you can use them later by calling ${foo}, ${bar}, ${baz}. config.html should contain all parameters which are specific to installations (such as the 'urlbase' Bugzilla parameter, which is here called 'inst').
| Assignee | ||
Comment 5•20 years ago
|
||
Use this template to write your scripts. The first two commands are mandatory.
| Assignee | ||
Comment 6•20 years ago
|
||
err... missing "AndWait".
Attachment #204320 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•20 years ago
|
||
SeleniumTest.pm is required when running tests using runtests.pl. Note that user-extensions.js is still useful in this case.
| Assignee | ||
Comment 8•20 years ago
|
||
Here is an example of a script for runtests.pl using Selenium.
And here is the output of such script:
[buclin@antares bugzilla]$ ./runtests.pl -v
t/012qa....1..7
ok 1 - Load query.cgi
ok 2 - Check title
ok 3 - Enter and check input in the short_desc field
ok 4 - Recheck the input (using a different method)
ok 5 - Submit request (-> buglist.cgi)
ok 6 - Check title
ok 7 - Make sure that no bug is returned (0 bug found)
ok
All tests successful.
| Assignee | ||
Comment 9•20 years ago
|
||
Some more information available here:
http://wiki.mozilla.org/Bugzilla:QA
| Assignee | ||
Comment 10•20 years ago
|
||
As we are going to test different versions of Bugzilla, and running different DBs, I have updated 012qa.t to be independent of the installations being tested. This is better than duplicating the tests for each installation.
This script requires ConfigTest.pm which will posted in a few minutes.
Attachment #204616 -
Attachment is obsolete: true
| Assignee | ||
Comment 11•20 years ago
|
||
ConfigTest.pm is equivalent to config.html for TestRunner.html. This way, you can write all your .t scripts without having to think about where it will be run.
| Assignee | ||
Updated•20 years ago
|
Attachment #204773 -
Attachment is patch: false
| Assignee | ||
Comment 12•20 years ago
|
||
print_info() should be called everytime you shift to another test or installation. 012qa.t is modified as follows:
foreach my $bz_inst (@{$inst->{'220compat'}}, @{$inst->{'222compat'}}) {
print_info($bz_inst);
$test->open_ok(... unchanged ...);
print_info() prints the time in GMT when the test is executed, the name of the installation being tested, and repeat the name of the current script (useful when you have many tests in a single script and you don't want to scroll back).
Attachment #204774 -
Attachment is obsolete: true
| Assignee | ||
Comment 13•20 years ago
|
||
_RSZ_ pointed me to an interesting Firefox extension, a Selenium recorder:
http://seleniumrecorder.mozdev.org/
I did some basic tests and it seems pretty helpful for those who don't want to write scripts manually.
Note that if you install this extension, you don't need to download Selenium separately; it's included in the extension already (except that the XPI doesn't include samples and docs).
| Assignee | ||
Comment 14•19 years ago
|
||
Updated version including two new commands:
SelectNone('locator') : unselect all options of a listbox <select> ... </select>
SelectMulti('locator', 'optionList') : select several options in a list box.
Read comments in the file for more information. I'm going to update the actual version on landfill too.
Attachment #204315 -
Attachment is obsolete: true
| Assignee | ||
Comment 15•19 years ago
|
||
Include commands created by Andrey Yegorov, see the changelog in the file. These commands permit us to do conditional testing ("if then else", "goto" and "while").
Attachment #208280 -
Attachment is obsolete: true
| Assignee | ||
Comment 16•19 years ago
|
||
* Version: 2.1 - 2006-01-14 LpSolit@gmail.com
* Add the assertFlatText(Not)Present() functions. They work in a similar way as assertText(Not)Present()
* but don't take care about newlines and consecutive whitespaces.
Attachment #208401 -
Attachment is obsolete: true
Comment 17•19 years ago
|
||
Attachment #208446 -
Attachment is obsolete: true
| Assignee | ||
Comment 18•19 years ago
|
||
(In reply to comment #17)
> Created an attachment (id=208553) [edit]
> version 2.2 (2006-01-15)
>
The file I committed on landfill is slightly different. I moved your functions earlier in the code, with other doFoo functions. But I didn't change the functions themselves. So landfill is now using v2.2.
| Assignee | ||
Comment 19•19 years ago
|
||
v2.2 has serious bugs (one of the function overwrites existing variables)
Attachment #208553 -
Attachment is obsolete: true
Comment 20•19 years ago
|
||
Selenium script to test turning on/off target milestones.
This is my first try at a selenium script. Hope it works ^.^
Comment 21•19 years ago
|
||
Bugzilla test suite does not seem to work in Internet Explorer
Only 3 tests pass
| Assignee | ||
Comment 22•19 years ago
|
||
(In reply to comment #21)
> Bugzilla test suite does not seem to work in Internet Explorer
> Only 3 tests pass
>
I know. But I haven't time to worry about.
Comment 23•19 years ago
|
||
| Assignee | ||
Updated•19 years ago
|
Attachment #208760 -
Attachment is obsolete: true
Comment 24•19 years ago
|
||
Attachment #208606 -
Attachment is obsolete: true
Attachment #208922 -
Attachment is obsolete: true
| Assignee | ||
Comment 25•19 years ago
|
||
(In reply to comment #24)
> Created an attachment (id=209072) [edit]
> user-extensions.js, v2.3.1 (2006-01-20)
>
ok, landfill now points to v2.3.1.
| Assignee | ||
Comment 26•19 years ago
|
||
add 'flatlink=' which allows you to easily click on links containing newlines and several consecutive whitespaces.
Attachment #209072 -
Attachment is obsolete: true
| Assignee | ||
Comment 27•19 years ago
|
||
includes assertSelect(Not)PresentOptions(select, options_list).
Attachment #209272 -
Attachment is obsolete: true
Comment 28•19 years ago
|
||
please check if this work correctly when run script already on landfill
Attachment #209369 -
Attachment is obsolete: true
Attachment #210126 -
Flags: review?(LpSolit)
| Assignee | ||
Comment 29•19 years ago
|
||
Comment on attachment 210126 [details]
user-extensions.js, v2.5.1 (2006-01-30)
requires no official review
Attachment #210126 -
Flags: review?(LpSolit)
Comment 30•19 years ago
|
||
Attachment #210126 -
Attachment is obsolete: true
| Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
No longer depends on: 317694
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.20
Version: unspecified → 2.20
You need to log in
before you can comment on or make changes to this bug.
Description
•