Bug 19379 - Selenium test for the list workflow
Summary: Selenium test for the list workflow
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Chris Cormack
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-28 03:49 UTC by Alex Buckley
Modified: 2022-09-19 01:19 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 19379 - Selenium test for the list workflow (11.72 KB, patch)
2017-09-28 03:58 UTC, Alex Buckley
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2017-09-28 03:49:40 UTC
The Selenium test patch for this bug report will add a biblio and items to that biblio.

A list will be created and then the item will be added to the list.
Comment 1 Alex Buckley 2017-09-28 03:58:42 UTC
Created attachment 67423 [details] [review]
Bug 19379 - Selenium test for the list workflow

This selenium test logs into the Koha intranet and adds a biblio and
items to that biblio.

It then creates a list, and adds the item to the list confirming that
the item was successfully added to the list.

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-standalone-2.53.0.jar

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. Create a superlibrarian user with the username koha and password
koha

18. 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

19. sudo koha-shell <instancename>

20. perl t/db_dependent/selenium/list_workflow.t

21. 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

Sponsored-By: Catalyst IT
Comment 2 Alex Buckley 2022-01-10 23:30:17 UTC
Opps accidentally removed myself as assignee. I aim to revisit this in the near future and rebase and potentially rework this patch.
Comment 3 Alex Buckley 2022-09-19 01:19:36 UTC
Unassigning myself from this bug report for now, in case (In reply to Alex Buckley from comment #2)
> Opps accidentally removed myself as assignee. I aim to revisit this in the
> near future and rebase and potentially rework this patch.

As noted in comment #2 I hope to return to this one and re-work the solution, however, I will unallocate myself from this for now in case anyone else wants to take it on in the near future.