Project

General

Profile

Actions

action #125561

closed

coordination #121879: [epic] Improvements in the test automation framework with libyui-rest-api

Encapsulate the timeout scale multiplier in libyui-rest-api test framework

Added by hjluo about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
2023-03-08
Due date:
% Done:

0%

Estimated time:

Description

Motivation

When we fix the ticket 124964, we could use code like this

    my $timeout = YuiRestClient::get_timeout() * get_var('TIMEOUT_SCALE', 1);
    my $product_selection = $testapi::distri->get_product_selection();
    $product_selection->wait_product_selection_page({timeout => $timeout, message => 'Product Selection page is not displayed'});

But we should pass the timeout scale as a parameter to not introduce dependency with YuiRestClient in the Test Layer, then we would repeat that operation (multiplication) in several places in the code and we need some object to encapsulate it to avoid that. which looks like this:

$product_selection->wait_product_selection_page({timeout_scale => get_var('TIMEOUT_SCALE', 1), message => 'Product Selection page is not displayed'});

Inside wait_product_selection_page and in other places like in perform_installation method applying this solution we will have to repeat this logic of multiplying the current timeout by the timeout_scale therefore, we should encapsulate somehow.

Acceptance criteria

AC1: Encapsulate logic of multiplying timeout by a factor so we don't repeat it in each Controller method for waiting some long process

Additional information

PR where this was discussed: https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/16462


Related issues 1 (0 open1 closed)

Related to qe-yam - action #121807: Pass timeout/interval when using regex to find UI element with libyui-rest-api clientResolvedhjluo2022-12-12

Actions
Actions #1

Updated by hjluo about 1 year ago

  • Related to action #121807: Pass timeout/interval when using regex to find UI element with libyui-rest-api client added
Actions #2

Updated by JERiveraMoya about 1 year ago

  • Description updated (diff)
  • Parent task set to #121879
Actions #3

Updated by JERiveraMoya about 1 year ago

  • Subject changed from Pass the timeout scale as parameter from the test layer to Encapsulate the timeout scale multiplier in libyui-rest-api test framework
Actions #4

Updated by JERiveraMoya about 1 year ago

  • Description updated (diff)
Actions #5

Updated by JERiveraMoya about 1 year ago

  • Description updated (diff)
  • Status changed from New to Workable
  • Target version set to Current
Actions #6

Updated by coolgw about 1 year ago

  • Status changed from Workable to In Progress
  • Assignee set to coolgw
Actions #8

Updated by coolgw about 1 year ago

  • Status changed from In Progress to Resolved
Actions #9

Updated by coolgw about 1 year ago

  • Status changed from Resolved to In Progress
Actions #10

Updated by JERiveraMoya about 1 year ago

  • Status changed from In Progress to Resolved

Let's watch for some potential side effect.

Actions

Also available in: Atom PDF