[Bug 19189] New: Reserving and renewing item in OPAC selenium test
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Bug ID: 19189 Summary: Reserving and renewing item in OPAC selenium test Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: alexbuckley@catalyst.net.nz Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org This Selenium test will start with a biblio being cataloged using a z39.50 target, then items are added. Then the OPAC reserve functionality is tested by loading the OPAC and placing a hold on the item. Then the item is checked out to the user in the intranet, and the OPAC renew functionality is tested by loading the OPAC and renewing the item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 66513 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66513&action=edit Bug 19189 - OPAC reserve and renew selenium test This Selenium test will catalog an item using the Z39.50 target and add items to the biblio. Then it will test the OPAC reserve functionality and if the item is successfully reserved then the test outout 'Hold successfully placed will be displayed. Then the item is checked out to the patron in the intranet. Then the OPAC renew functionality is tested and if the reserve functionality is successful then the test output 'Item has been renewed' will be displayed Test plan (this test plan includes how to install Selenium as well as how to run this test, for the benefit of people who have not got Selenium installed on their machines): 1. wget https://selenium-release.storage.googleapis.com/2.53/selenium-server-standal... 2. vim /etc/apt/sources.list.d/firefox.list 3. Paste into the file: deb http://packages.linuxmint.com debian import 4. sudo apt-get update 5. sudo apt-get install firefox 6. sudo apt-get install xvfb 7. Set the SELENIUM_PATH vartiable: SELENIUM_PATH=/home/vagrant/kohaclone/selenium-server-standalone-2.53.0.jar 8. Xvfb :1 -screen 0 1024x768x24 2>&1 >/dev/null & 9. DISPLAY=:1 java -jar $SELENIUM_PATH Note: This will start up the selenium server. Everytime you want to shutdown this terminal window and want to restart Selenium just run the step 9 command to restart the Selenium server 10. Open a new terminal window and write in: git clone https://github.com/gempesaw/Selenium-Remote-Driver --branch build/master --single-branch --depth 1 11. cd Selenium-Remote-Driver 12. perl Makefile.PL 13. make 14. make test 15. sudo make install 16. Now everything is installed and you can set up for running the selenium tests 17. Drop and recreate the Koha database and restart memcached 18. Go through the web installer installing all sample data and onboarding tool 19. Create a superlibrarian user with the username koha and password koha 20. If your usual port configuration for the intranet and OPAC is 8081 and 8080 respectively then set the staffClientBaseURL and OPACBaseURL system preferences to localhost:8080 and localhost:80 respectively 21. Make sure the OPACRenewalAllowed system preference is set to 'Allow' 22. Create a circulation and fine rule which allows multiple holds and holds per record 23. sudo koha-shell <instancename> 24. perl t/db_dependent/selenium/opac_reserveitem.t 25. The test should pass. Note: The time_diff comments in the test output showing what the test is doing Note: If you have issues with installing Selenium and Selenium::Remote::Driver please write a comment on the bug report and I will be more than happy to create a screencapture video showing all the steps Note: Warns in front of the $driver->get_title() function have been implemented because during troubleshooting they were found to be an effective solution for stopping the test from failing due to not being able to find an element on the page. If anyone can suggest an alternative to using these warns please do Sponsored-By: Catalyst IT -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18974 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Blocks| |19384 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19384 [Bug 19384] [OMNIBUS] Add Selenium tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- 04:32:37.504 INFO - Executing: [find element: By.xpath: //input[@value="Confirm hold"]]) 04:32:37.652 WARN - Exception thrown org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector ":"//input[@value=\"Confirm hold\"]"} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 68831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68831&action=edit Bug 19189: Change to use ENV, fix login and passwords The kohadevbox has admin/admin set, so for testing when creating the initial superuser, if you wish to minimize effort, use admin/admin. Otherwise, make sure to: export KOHA_USER={whatever your user is} export KOHA_PASS={whatever your password is} before attempting to run the test. Also, this test was failing because of a validation check on the passwords requiring uppercase letters, lowercase letters, and numbers. Changed the sample data passwords to fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |BLOCKED --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Blocked by bug 19243. We need to find a clean way to continue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |19243 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19243 [Bug 19243] Selenium test for testing the administration module functionality -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |koha-bugs@lists.koha-commun |y.org |ity.org -- You are receiving this mail because: You are watching all bug changes. You are the QA Contact for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|koha-bugs@lists.koha-commun |testopia@bugs.koha-communit |ity.org |y.org Assignee|alexbuckley@catalyst.net.nz |koha-bugs@lists.koha-commun | |ity.org -- You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19189 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |NEW --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The tests need to be rewritten completely. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org