action #19872
closed[sle][functional][y] Create function/method for type_string and wait_still_screen or sleep
0%
Description
Motivation¶
Often is wait_still_screen or sleep after type_string to avoid race condition failures.
/var/lib/openqa/tests/sle/tests/casp/stack_controller.pm: type_string "kubectl get pods --watch\n";
/var/lib/openqa/tests/sle/tests/casp/stack_controller.pm- wait_still_screen 15, 60;
--
/var/lib/openqa/tests/sle/tests/console/consoletest_finish.pm: type_string "loginctl --no-pager\n";
/var/lib/openqa/tests/sle/tests/console/consoletest_finish.pm- wait_still_screen(2);
--
/var/lib/openqa/tests/sle/tests/console/consoletest_finish_sym.pm: type_string "loginctl --no-pager\n";
/var/lib/openqa/tests/sle/tests/console/consoletest_finish_sym.pm- wait_still_screen(2);
--
/var/lib/openqa/tests/sle/tests/console/yast2_apparmor.pm: type_string 'I_added_this_profile';
/var/lib/openqa/tests/sle/tests/console/yast2_apparmor.pm- wait_still_screen(1);
--
/var/lib/openqa/tests/sle/tests/console/yast2_apparmor.pm: type_string '/tmp';
/var/lib/openqa/tests/sle/tests/console/yast2_apparmor.pm- wait_still_screen(1);
--
/var/lib/openqa/tests/sle/tests/console/yast2_apparmor.pm: type_string '/new_profile';
/var/lib/openqa/tests/sle/tests/console/yast2_apparmor.pm- wait_still_screen(1);
--
/var/lib/openqa/tests/sle/tests/console/yast2_i.pm: type_string("$pkgname\n");
/var/lib/openqa/tests/sle/tests/console/yast2_i.pm- sleep 3;
--
/var/lib/openqa/tests/sle/tests/console/yast2_xinetd.pm: type_string 'super_ping';
/var/lib/openqa/tests/sle/tests/console/yast2_xinetd.pm- wait_still_screen 1;
--
/var/lib/openqa/tests/sle/tests/console/yast2_xinetd.pm: type_string 'localhost';
/var/lib/openqa/tests/sle/tests/console/yast2_xinetd.pm- wait_still_screen 1;
--
/var/lib/openqa/tests/sle/tests/console/yast2_xinetd.pm: type_string 'fake, useless, nobody should use it, use ping instead of it ;)';
/var/lib/openqa/tests/sle/tests/console/yast2_xinetd.pm- wait_still_screen 1;
--
/var/lib/openqa/tests/sle/tests/installation/addon_products_yast2.pm: type_string $regcode;
/var/lib/openqa/tests/sle/tests/installation/addon_products_yast2.pm- sleep 1;
--
/var/lib/openqa/tests/sle/tests/installation/bootloader_uefi.pm: type_string "gfxmode=1024x768; terminal_output console; terminal_output gfxterm\n";
/var/lib/openqa/tests/sle/tests/installation/bootloader_uefi.pm- sleep 2;
--
/var/lib/openqa/tests/sle/tests/installation/grub_test.pm: type_string "gfxmode=1024x768x32; gfxpayload=1024x768x32; terminal_output console; terminal_output gfxterm\n";
/var/lib/openqa/tests/sle/tests/installation/grub_test.pm- wait_still_screen;
--
/var/lib/openqa/tests/sle/tests/installation/partitioning_splitusr.pm: type_string "1.5G";
/var/lib/openqa/tests/sle/tests/installation/partitioning_splitusr.pm- sleep 2;
--
/var/lib/openqa/tests/sle/tests/installation/welcome.pm: type_string get_var('SCC_URL_VALID');
/var/lib/openqa/tests/sle/tests/installation/welcome.pm- wait_still_screen 2;
--
/var/lib/openqa/tests/sle/tests/installation/win10_firstboot.pm: type_string 'security';
/var/lib/openqa/tests/sle/tests/installation/win10_firstboot.pm- wait_still_screen;
--
/var/lib/openqa/tests/sle/tests/iscsi/iscsi_client.pm: type_string "iqn.2016-02.de.openqa";
/var/lib/openqa/tests/sle/tests/iscsi/iscsi_client.pm- wait_still_screen(2, 10);
--
/var/lib/openqa/tests/sle/tests/iscsi/iscsi_server.pm: type_string 'iqn.openqa.de';
/var/lib/openqa/tests/sle/tests/iscsi/iscsi_server.pm- wait_still_screen(2, 10);
--
/var/lib/openqa/tests/sle/tests/iscsi/iscsi_server.pm: type_string '132';
/var/lib/openqa/tests/sle/tests/iscsi/iscsi_server.pm- wait_still_screen(2, 10);
--
/var/lib/openqa/tests/sle/tests/virt_autotest/proxymode_init_pxe_install.pm: type_string "autoyast=" . $autoyast, $type_speed;
/var/lib/openqa/tests/sle/tests/virt_autotest/proxymode_init_pxe_install.pm- wait_still_screen 5;
--
/var/lib/openqa/tests/sle/tests/virtualization/prepare_sle12.pm: type_string "exit\n";
/var/lib/openqa/tests/sle/tests/virtualization/prepare_sle12.pm- sleep 1;
--
/var/lib/openqa/tests/sle/tests/x11/nis_client.pm: type_string 'nfs.openqa.suse.de';
/var/lib/openqa/tests/sle/tests/x11/nis_client.pm- wait_still_screen 4, 4; # blinking cursor
--
/var/lib/openqa/tests/sle/tests/x11/nis_server.pm: type_string 'nfs.openqa.suse.de';
/var/lib/openqa/tests/sle/tests/x11/nis_server.pm- wait_still_screen 4, 4; # blinking cursor
--
/var/lib/openqa/tests/sle/tests/x11/nis_server.pm: type_string 'rw,no_'; # rw,no_root_squash
/var/lib/openqa/tests/sle/tests/x11/nis_server.pm- wait_still_screen 4, 4; # blinking cursor
--
/var/lib/openqa/tests/sle/tests/x11/oocalc.pm: type_string "Hello World!\n";
/var/lib/openqa/tests/sle/tests/x11/oocalc.pm- sleep 2;
--
/var/lib/openqa/tests/sle/tests/x11/oomath.pm: type_string "E %PHI = H %PHI\nnewline\n1 = 1";
/var/lib/openqa/tests/sle/tests/x11/oomath.pm- wait_still_screen(1);
--
/var/lib/openqa/tests/sle/tests/x11/reboot_gnome.pm: type_string $testapi::password, max_interval => 5;
/var/lib/openqa/tests/sle/tests/x11/reboot_gnome.pm- wait_still_screen;
--
/var/lib/openqa/tests/sle/tests/x11/shutdown.pm: type_string "\t\t"; # select shutdown
/var/lib/openqa/tests/sle/tests/x11/shutdown.pm- sleep 1;
--
/var/lib/openqa/tests/sle/tests/x11/wireshark.pm: type_string "exit\n"; # logout
/var/lib/openqa/tests/sle/tests/x11/wireshark.pm- wait_still_screen 2;
--
/var/lib/openqa/tests/sle/tests/x11/wireshark.pm: type_string "wireshark-openQA-test\n";
/var/lib/openqa/tests/sle/tests/x11/wireshark.pm- wait_still_screen 1;
/var/lib/openqa/tests/sle/tests/x11/wireshark.pm: type_string "\n"; # 2 times return for SP2
/var/lib/openqa/tests/sle/tests/x11/wireshark.pm- wait_still_screen 1;
--
/var/lib/openqa/tests/sle/tests/x11/x11_login.pm: type_string $username. "\n";
/var/lib/openqa/tests/sle/tests/x11/x11_login.pm- sleep 1;
--
/var/lib/openqa/tests/sle/tests/x11/yast2_lan_restart.pm: type_string '10.160.2.88';
/var/lib/openqa/tests/sle/tests/x11/yast2_lan_restart.pm- wait_still_screen 4, 4; # blinking cursor
--
/var/lib/openqa/tests/sle/tests/x11/yast2_lan_restart.pm: type_string '10.0.2.2';
/var/lib/openqa/tests/sle/tests/x11/yast2_lan_restart.pm- wait_still_screen 4, 4; # blinking cursor
Acceptance criteria¶
- AC1: Test code has been refactored in a way that the common tuples of type_string/send_key + wait_screen_change/wait_still_screen/sleep are covered implicitly, e.g. with one-line commands/helper function/new testapi options
Updated by Anonymous over 7 years ago
- Status changed from In Progress to Rejected
See https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3166
"because we have an option to wait for screen change in type_string already, see https://github.com/os-autoinst/os-autoinst/blob/master/testapi.pm#L1085 ."
Updated by okurz over 7 years ago
- Category set to Enhancement to existing tests
- Status changed from Rejected to In Progress
It also can't work like that. As long as we have many tests calling type_string plus some synchronization - see all examples in description - we are not done here.
Updated by Anonymous over 7 years ago
Should all those type_string plus wait rewritten with type_string plus its waiting function then?
Updated by okurz over 7 years ago
Yes, but type_string + wait_still_screen
does not exactly do the same as type_string …, wait_screen_changes => …
so either this option can be used or type_string
within os-autoinst should be extended accordingly.
Updated by Anonymous over 7 years ago
- Priority changed from High to Normal
okurz and me agreed it is not high prio as we can not easily find one method which would solve all use cases.
Updated by okurz over 7 years ago
please update tickets "In Progress" at latest EOB (end of business day) with either having it resolved - of course preferred ;-) - or with a clear comment why it was not finishable within the day.
Updated by Anonymous about 7 years ago
Updated by okurz about 7 years ago
- Description updated (diff)
- Status changed from Resolved to In Progress
It's not solved when the new API additions are not yet used. I updated the ticket description with acceptance criteria
Updated by Anonymous almost 7 years ago
- Assignee changed from Anonymous to okurz
Re-assign it to okurz, so that the ticket is not forgotten.
Updated by okurz almost 7 years ago
- Due date set to 2018-01-30
- Assignee deleted (
okurz) - Target version changed from Milestone 12 to Milestone 13
Thanks. We can revisit this later.
Updated by okurz almost 7 years ago
- Due date deleted (
2018-01-30) - Target version changed from Milestone 13 to Milestone 15
Updated by riafarov almost 7 years ago
- Status changed from In Progress to Workable
Updated by okurz over 6 years ago
- Subject changed from [sle][functional] Create function/method for type_string and wait_still_screen or sleep to [sle][functional][y] Create function/method for type_string and wait_still_screen or sleep
- Due date changed from 2018-04-10 to 2018-04-24
not enough capacity in S14, moving. much more on [y] as [y] relies much more on stable way to test UIs
Updated by okurz over 6 years ago
- Due date deleted (
2018-04-24) - Target version changed from Milestone 15 to Milestone 17
we just don't have capacity right now.
Updated by okurz over 6 years ago
- Target version changed from Milestone 17 to future
Updated by riafarov over 5 years ago
- Status changed from Workable to Resolved
- Assignee set to mloviska
Introduced as part of another ticket:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/6981