client
client copied to clipboard
[GUI-tests] Open only one socket connection per test scenario
In the GUI tests, the function hasSyncStatus opens a new socket connection every time it is called. The main issue is with waitForFileOrFolderToHaveSyncStatus function which calls hasSyncStatus function rapidly until the condition is met. So, there will be many socket connection requests in a single test scenario (which may or may not be an issue for the Unix socket server).
IMO, I think we must open only a single socket connection per test scenario. So, in this PR, I have refactored the test code to only create a new socket connection if there is none and reuse the existing connection until a test scenario finishes and close the connection afterward. This way, we will open only one socket connection per scenario.
I tried to reuse a single connection for a whole test suite but that was not possible. I think the connection will be different every time we add a user to the client (I have no idea).
The socket api I designed for long running connections. The windows explroer for examples connect to the socket stays connected until either the client(the explorer) or server (the desktop client) are closed. So I agree that you probably should keep the socket open.
Results for GUI-tests https://drone.owncloud.com/owncloud/client/12724/6/1
:boom: The GUI tests failed.
GUI Logs: https://cache.owncloud.com/public/owncloud/client/12724/guiReportUpload/index.html
Server Logs: https://cache.owncloud.com/public/owncloud/client/12724/guiReportUpload/serverlog.log
Screenshots:
- Adding_account_with_self_signed_certificate_for_the_first_time.png
- Adding_account_with_stay_safe_advance_configuration.png
- Adding_account_with_virtual_files_enabled_through_advance_configuration.png
- Adding_account_with_wrong_credentials.png
- Adding_multiple_accounts.png
- Adding_normal_Account.png
- Both_original_and_copied_folders_can_be_synced.png
- Collaborator_should_not_see_to_whom_a_file_folder_is_shared.png
- Delete_a_file.png
- Delete_a_folder.png
- Disable_VFS.png
- Enable_VFS.png
- File_with_long_name_(233_characters)_is_blacklisted.png
- File_with_long_name_can_be_synced.png
- File_with_spaces_in_the_name_can_sync.png
- Filenames_that_are_rejected_by_the_server_are_reported.png
- Invalid_system_names_are_synced_in_linux.png
- Many_subfolders_can_be_synced.png
- Modify_orignal_content_of_a_file_with_special_character.png
- Progress_indicator_should_not_be_visible_after_unselecting_the_password_protection_checkbox_while_sharing_through_public_link.png
- Share_files_folders_with_special_characters_in_their_name.png
- Syncing_a_file_to_the_server.png
- Syncing_a_folder_to_the_server.png
- Syncing_all_files_and_folders_from_the_server.png
- Syncing_file_of_1_GB_size.png
- Syncing_folders_each_having_500_files.png
- Tabs_in_toolbar_looks_correct.png
- User_(non-author)_can_not_share_to_a_group_to_which_the_file_folder_is_already_shared.png
- VFS_is_disabled_by_default.png
- Verify_one_empty_folder_with_a_length_longer_than_the_allowed_limit_will_not_be_synced.png
- Verify_pre_existing_folders_in_local_(Desktop_client)_are_copied_over_to_the_server.png
- Verify_that_you_can_create_a_subfolder_with_long_name.png
- change_collaborator_permissions_of_a_file_&_folder.png
- collaborators_are_listed_in_chronological_order.png
- logging_out.png
- login_after_loggin_out.png
- remove_an_account_connection.png
- remove_the_only_account_connection.png
- reshare_a_file_folder.png
- search_for_users_with_minimum_autocomplete_characters.png
- share_a_file_with_many_users.png
- share_file_and_folder_to_a_group.png
- sharee_creates_a_file_and_a_folder_inside_a_shared_folder.png
- sharee_deletes_a_file_and_folder_shared_by_sharer.png
- sharee_edits_content_of_files_shared_by_sharer.png
- sharee_edits_shared_files_and_again_try_to_edit_after_write_permission_is_revoked.png
- sharee_renames_the_shared_file_and_folder.png
- sharee_tries_to_create_a_file_and_a_folder_inside_a_shared_folder_without_write_permission.png
- sharee_tries_to_delete_shared_file_and_folder_without_permissions.png
- sharee_tries_to_edit_content_of_files_shared_without_write_permission.png
- sharing_a_folder_by_public_link_with_"Uploader"_role_and_check_if_file_can_be_downloaded.png
- sharing_file_and_folder_with_user_who_has_some_other_shares.png
- sharing_file_folder_with_a_user_that_has_special_characters_as_username.png
- sharing_of_a_file_by_public_link_and_deleting_the_link.png
- sharing_of_a_file_by_public_link_with_password_and_changing_the_password.png
- simple_sharing_of_a_file_by_public_link_with_default_expiration_date.png
- simple_sharing_of_a_file_by_public_link_with_password_and_expiration_date.png
- simple_sharing_of_file_and_folder_by_public_link_with_expiration_date.png
- simple_sharing_of_file_and_folder_by_public_link_with_password.png
- simple_sharing_of_file_and_folder_by_public_link_without_password.png
- simple_sharing_of_folder_by_public_link_with_different_roles.png
- simple_sharing_with_user.png
- try_to_reshare_a_file_folder_shared_without_share_permission.png
- try_to_self_share_a_file_folder.png
- try_to_share_a_file_folder_with_a_user_to_whom_the_file_has_already_been_shared.png
- unshare_a_reshared_file.png
- unshare_a_shared_file_and_folder.png
- various_types_of_files_can_be_synced_from_client_to_server.png
- various_types_of_files_can_be_synced_from_server_to_client.png
The socket api I designed for long running connections. The windows explroer for examples connect to the socket stays connected until either the client(the explorer) or server (the desktop client) are closed. So I agree that you probably should keep the socket open.
If the connection will get closed after closing the desktop client then I guess we won't be able to reuse a single connection for a whole test-suite. That's why I was getting trouble using single connection for a test-suite.
I don't think the test failures with the following screen are because of the test code. We need to find out why this xfce4 login screen comes out during test.
SS

~Blocked until https://github.com/owncloud-ci/squish/issues/34~







