action #19872

[sle][functional][y] Create function/method for type_string and wait_still_screen or sleep

Added by dzedro over 2 years ago. Updated 12 months ago.

Status:ResolvedStart date:16/06/2017
Priority:NormalDue date:
Assignee:mloviska% Done:

0%

Category:Enhancement to existing tests
Target version:QA - future
Difficulty:
Duration:

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

History

#1 Updated by Anonymous over 2 years ago

  • Assignee set to Anonymous

#2 Updated by Anonymous over 2 years ago

  • Status changed from New to In Progress

#3 Updated by Anonymous over 2 years ago

  • Status changed from In Progress to Rejected

#4 Updated by okurz over 2 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.

#5 Updated by Anonymous over 2 years ago

  • Target version set to Milestone 13+

#6 Updated by Anonymous over 2 years ago

Should all those type_string plus wait rewritten with type_string plus its waiting function then?

#7 Updated by okurz over 2 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.

#8 Updated by Anonymous over 2 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.

#9 Updated by okurz over 2 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.

#11 Updated by Anonymous over 2 years ago

PR updated.

#12 Updated by Anonymous over 2 years ago

  • Target version deleted (Milestone 13+)

#13 Updated by Anonymous over 2 years ago

PR approved.

#14 Updated by Anonymous over 2 years ago

  • Status changed from In Progress to Resolved

PR merged.

#15 Updated by okurz over 2 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

#16 Updated by okurz over 2 years ago

  • Target version set to Milestone 12

#17 Updated by Anonymous about 2 years ago

  • Assignee changed from Anonymous to okurz

Re-assign it to okurz, so that the ticket is not forgotten.

#18 Updated by okurz about 2 years ago

  • Due date set to 30/01/2018
  • Assignee deleted (okurz)
  • Target version changed from Milestone 12 to Milestone 13

Thanks. We can revisit this later.

#19 Updated by okurz about 2 years ago

  • Due date deleted (30/01/2018)
  • Target version changed from Milestone 13 to Milestone 15

#20 Updated by riafarov about 2 years ago

  • Status changed from In Progress to Workable

#21 Updated by okurz almost 2 years ago

  • Due date set to 10/04/2018

#22 Updated by okurz almost 2 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 10/04/2018 to 24/04/2018

not enough capacity in S14, moving. much more on [y] as [y] relies much more on stable way to test UIs

#23 Updated by okurz almost 2 years ago

  • Due date deleted (24/04/2018)
  • Target version changed from Milestone 15 to Milestone 17

we just don't have capacity right now.

#24 Updated by okurz over 1 year ago

  • Target version changed from Milestone 17 to future

#25 Updated by okurz over 1 year ago

  • Target version changed from future to future

#26 Updated by riafarov 12 months ago

  • Status changed from Workable to Resolved
  • Assignee set to mloviska

Also available in: Atom PDF