owncloud / search_elastic

Elasticsearch based full text search
https://github.com/owncloud/search_elastic
GNU General Public License v2.0
8 stars 1 forks source link

[QA] 2.2.0 Testplan #274

Open jnweiger opened 2 years ago

jnweiger commented 2 years ago

'Elastic Search' Test Plan

Template: https://github.com/owncloud/QA/blob/master/Server/Test_Plan_search_elastic.md

Setup XXX

Click here for setup details * `hetzner_deploy/oc10.sh search_elastic` -> https://oc1091-search-elastic-211-rc1-20220413.jw-qa.owncloud.works - `source env.sh; mkdir proxy; cd proxy; apt install docker-compose` - `/usr/local/bin/mkcert; cp jw-qa-ca.crt /usr/local/share/ca-certificates; update-ca-certificates` - `/usr/local/bin/nginx_ssl_proxy 19443 http://$elastic_host:9200 local_cert.crt local_cert.key` - In admin -> settings -> search also try: `https://localhost:19443` (instead of http://172.17.0.3:9200` ) * `hetzner_deploy/oc10.sh search_elastic` -> https://oc10100-search-elastic-220-rc1-20220628.jw-qa.owncloud.works

Testing functionality

TODO:

Test Case Expected Result Result Related Comment
CLI commands
Enable search_elastic app via CLI using occ app:enable search_elastic The apps is enabled :heavy_check_mark:
Disable search_elastic app via CLI using occ app:disable search_elastic The apps is disabled :heavy_check_mark:
Create initial Search Index for one user via CLI using occ search:index:create The initial Search Index is created :heavy_check_mark:
Rebuild Search Index for one user via CLI using occ search:index:rebuild The initial Search Index is created :heavy_check_mark:
Reset Index via CLI using occ search:index:reset Reset the index :heavy_check_mark: Destroys the sql table in the elastic server
Update search Index via CLI using occ search:index:update Update the search index :heavy_check_mark: Only works after changing a text file via web UI.
WebUI Full Search menu
Set a valid ElasticSearch server address in the textbox and click Reset index button The green gauge is shown :heavy_check_mark: Destroys the sql table in the elastic server
Run a couple of searchs and check that statistics related to nodes marked as indexed appears :heavy_check_mark:
Search for content
Skeleton Files. A user searches for content included in the Skeleton files (e.g. "Welcome") using the searchbox The skeleton file that contains the word is shown in the files view :heavy_check_mark:
File located in root. A user searches for content included in a file located in root using the searchbox The file that contains the word is shown in the files view 🤖
File located 5 folders depth. A user searches for content included in a file located in 5 folders depth using the searchbox. User edits the file and change the content. Then user searches for the new content The file that contains the word is shown in the files view :heavy_check_mark:
File located 5 folders depth. A user searches for content included in a file located in 5 folders depth using the searchbox. User edits the file and change the content. Then user searches for the old content The file is not shown in the files view when we search for the old content :heavy_check_mark:
File located 5 folders depth. A user searches for content included in a file located in 5 folders depth using the searchbox The file that contains the word is shown in the files view :heavy_check_mark:
Special Characters फन्नि. File located 5 folders depth. A user searches for content included in a file located in 5 folders depth using the searchbox The file that contains the फन्नि is shown in the files view :heavy_check_mark:
File shared with me. A user searches for content included in a file shared with the user using the searchbox The file that contains the word is shown in the files view 🤖
File fed. shared with me. A user searches for content included in a file fed. shared with the user using the searchbox The file that contains the word is shown in the files view :heavy_check_mark:
File hosted in a personal mount. A user searches for content pattern that matches filename and content included in a file hosted in a personal mount using the searchbox The file that contains the word is shown in the files view and also the the one that matches the filename :heavy_check_mark:
File hosted in a global mount. A user searches for content included in a file hosted in a global mount using the searchbox The file that contains the word is shown in the files view :heavy_check_mark:
Search for filename
Skeleton Files. A user searches for a filename in the Skeleton files using the searchbox The skeleton file that matches with the filename is shown in the files view :heavy_check_mark:
File located in root. A user searches for a filename in a file located in root using the searchbox The file that matches with the filename is shown in the files view 🤖
File located in root renamed. A user searches for a filename in a file renamed located in root using the searchbox The file should not be shown in the files view 🤖
File located in root renamed (part of the name that was in the original file, but not in the new file). A user searches for a filename in a file renamed (part of the name that was in the original file, but not in the new file) located in root using the searchbox The file should not be shown in the files view 🤖
File located 5 folders depth. A user for a filename (not full word - only middle part of filename given) in a file located in 5 folders depth using the searchbox The file that matches with the filename is shown in the files view :heavy_check_mark:
Special Characters फन्नि. File located 5 folders depth. A user searches for a filename in a file located in 5 folders depth using the searchbox The file that matches with the filename फन्नि is shown in the files view :heavy_check_mark:
File shared with me. A user searches for a filename (not full word - end of filename missing) in a file shared with the user using the searchbox The file that matches with the filename is shown in the files view 🤖
File shared with me. A user searches for a filename in a file shared with the user using the searchbox The file that matches with the filename is shown in the files view 🤖
File shared with me via group. A user searches for a filename in a file shared with the uservia group using the searchbox The file that matches with the filename is shown in the files view 🤖
File fed. shared with me. A user searches for a filename (not full word - start of filename missing) in a file fed. shared with the user using the searchbox The file that matches with the filename is shown in the files view :heavy_check_mark: infix search with * is unreliable work when the file was renamed. Prefix search for a renamed file immediately works.But infix search seems to take a while??? When other things were edited and a second or thrid index update was done, then it suddenly works.
File hosted in a personal mount. A user searches for a filename (just file extension) in a file hosted in a personal mount using the searchbox The file that matches with the filename is shown in the files view :heavy_check_mark: must use *.TXT
File hosted in a global mount. A user searches for a filename (not exact case) in a file hosted in a global mount using the searchbox The file that matches with the filename is shown in the files view :heavy_check_mark:
Search for deleted files
Search for filename of a deleted file The search does not return results 🤖
Search for content of a deleted file The search does not return results 🤖
Unshared files
Search for filename of an unshared file The search does not return results 🤖:
Search for content of an unshared file The search does not return results 🤖
Limit search_elastic access to a group
Limit the users that will have access to full text search by setting a group config:app:set search_elastic group --value groupname This will cause only members of the admin group to do a full text search :heavy_check_mark:
Limit the users that will have access to full textsearch by setting a guest_app group config:app:set search_elastic group --value guest_app This will cause only members of the guest_app group to do a full text search :heavy_check_mark:
Only index metadata
If you only want to use search_elastic as a more scalable search on filenames you can disable content indexing by setting nocontent to true (default is false): config:app:set search_elastic nocontent --value true :heavy_check_mark:
Operations with clients
File located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and change the content using a Desktop client. Then user searches for the new content The file that contains the word is shown in the files view :heavy_check_mark:
File located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and change the content using a Desktop client. Then user searches for the old content The file is not shown in the files view :heavy_check_mark:
File located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and change the content using a Desktop client. Then user searches for the new content The file that contains the word is shown in the files view :heavy_check_mark:
File located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and change the content using a Mobile client. Then user searches for the old content The file is not shown in the files view :heavy_check_mark: Text files cannot be overwritten inplace from the android app
Operations with different file formats
Text file located inside a folder. A user searches for content included in the file using the searchbox. User edits the file using files_texteditor app and change the content. Then user searches for the new content The file that contains the word is shown in the files view :heavy_check_mark:
Text file located inside a folder. A user searches for content included in the file using the searchbox. User edits the file using files_texteditor app and change the content. Then user searches for the old content The file is not shown in the files view :heavy_check_mark:
Docx file located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and changes the content. Then user searches for the new content The file that contains the word is shown in the files view :heavy_check_mark:
Docx file located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and changes the content. Then user searches for the old content The file is not shown in the files view :heavy_check_mark:
XLS file located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and changes the content. Then user searches for the new content The file that contains the word is shown in the files view :heavy_check_mark:
XLS file located inside a folder. A user searches for content included in the file using the searchbox. User edits the file and changes the content. Then user searches for the old content The file is not shown in the files view :heavy_check_mark:
WebUI and browsers
Check that Full Search menu in admin section works fine using FireFox as browser :heavy_check_mark:
Check that Full Search menu in admin section works fine using Chrome as browser :heavy_check_mark:
Check that Full Search menu in admin section works fine using Edge as browser :heavy_check_mark:
Check that Full Search menu in admin section works fine using Safari as browser :heavy_check_mark:

New test items since 2.1.0

jnweiger commented 2 years ago

Changelog Testing

Example of an error message in the log:

{
  "Exception": "ElasticaExceptionResponseException",
  "Message": "unable to authenticate user [elasticxx] for REST request [/oc-ocfa7cgsd87h/_search]",
  "Code": 0,
  "Trace": "#0 /var/www/owncloud/apps-external/search_elastic/vendor/ruflin/elastica/src/Request.php(178): ElasticaTransportHttp->exec()n#1 /var/www/owncloud/apps-external/search_elastic/vendor/ruflin/elastica/src/Client.php(513): ElasticaRequest->send()n#2 /var/www/owncloud/apps-external/search_elastic/vendor/ruflin/elastica/src/Search.php(278): ElasticaClient->request()n#3 /var/www/owncloud/apps-external/search_elastic/lib/SearchElasticService.php(205): ElasticaSearch->search()n#4 /var/www/owncloud/apps-external/search_elastic/lib/Search/ElasticSearchProvider.php(198): OCASearch_ElasticSearchElasticService->search()n#5 /var/www/owncloud/apps-external/search_elastic/lib/Search/ElasticSearchProvider.php(103): OCASearch_ElasticSearchElasticSearchProvider->fetchResults()n#6 /var/www/owncloud/lib/private/Search.php(67): OCASearch_ElasticSearchElasticSearchProvider->searchPaged()n#7 /var/www/owncloud/core/search/ajax/search.php(56): OCSearch->searchPaged()n#8 /var/www/owncloud/lib/private/Route/Route.php(155): require_once('/var/www/ownclo...')n#9 /var/www/owncloud/lib/private/Route/Router.php(344): OCRouteRoute->OCRoute{closure}(*** sensitive parameters replaced ***)n#10 /var/www/owncloud/lib/base.php(927): OCRouteRouter->match()n#11 /var/www/owncloud/index.php(54): OC::handleRequest()n#12 {main}",
  "File": "/var/www/owncloud/apps-external/search_elastic/vendor/ruflin/elastica/src/Transport/Http.php",
  "Line": 178
}
NannaBarz commented 2 years ago

Guide from Cesar