Project

General

Profile

Actions

action #37327

closed

coordination #36712: [saga] Use YaST specific framework for GUI testing

coordination #38876: [functional][y][epic] Automate yast2 hostname test suite using YaST framework which is not relying on shortcuts

[sle][functional][y] Improve YaST GUI testing framework to operate on tables

Added by riafarov over 6 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
SUSE QA - Milestone 20
Start date:
2018-06-13
Due date:
2018-11-20
% Done:

0%

Estimated time:
13.00 h

Description

Motivation

For writing test we would need widget ids and other properties of widgets. For some we cannot elaborate internal structure to trigger events. For example: tables.
Good start would be to display internal structure, so then it will be easily possible to implement search. With

Acceptance criteria

  1. It's possible to select row in the table using cell value or row number

Further details

See #42188 and explore parts done by Lada, which we can use as a base for further development.

Here are useful links:

  1. https://github.com/lslezak/cucumber-yast#installing-cucumber-ruby-gem
  2. https://hackweek.suse.com/17/projects/yast-integration-tests-using-cucumber
  3. https://github.com/libyui/libyui-qt/tree/http_server

Related issues 1 (0 open1 closed)

Precedes (14 days) qe-yam - action #38879: [functional][y] Implement yast2 hostname test using ncurses with YCPRejected2018-12-112019-01-11

Actions
Actions #1

Updated by okurz over 6 years ago

  • Category set to New test

when would you like this to be scheduled?

Actions #2

Updated by okurz over 6 years ago

  • Target version set to future
Actions #3

Updated by okurz over 6 years ago

  • Target version changed from future to future
Actions #4

Updated by okurz over 6 years ago

  • Due date set to 2018-12-31
Actions #5

Updated by riafarov over 6 years ago

  • Parent task changed from #36712 to #38876
Actions #6

Updated by riafarov over 6 years ago

  • Due date changed from 2018-12-31 to 2018-08-28

Suggest for S24

Actions #7

Updated by okurz over 6 years ago

  • Target version changed from future to Milestone 18
Actions #8

Updated by okurz over 6 years ago

  • Precedes action #38879: [functional][y] Implement yast2 hostname test using ncurses with YCP added
Actions #9

Updated by riafarov over 6 years ago

  • Due date changed from 2018-08-28 to 2018-09-11
  • Target version changed from Milestone 18 to Milestone 19
Actions #10

Updated by riafarov about 6 years ago

  • Status changed from New to Workable
Actions #11

Updated by riafarov about 6 years ago

  • Due date changed from 2018-09-11 to 2018-09-25
  • Estimated time set to 13.00 h

I guess I need to split it to smaller parts, as we don't have enough capacity.

Actions #12

Updated by riafarov about 6 years ago

  • Priority changed from Normal to Low
Actions #13

Updated by cwh about 6 years ago

  • Status changed from Workable to Blocked

I asked Stefan Hundhammer as an experienced YaST GUI developer about the widget spy and libyui tables.

The result is, that it is not trivial to implement a widget-spy-like tool for searching libyui tables by values.
That means
a) we as QA cannot implement this on our own. It needs to be delegated to the YaST team.
b) it is questionable at all that we can ever get this feature.

So I doubt this task is is either workable in this sprint or even in any near future.

Actions #14

Updated by riafarov about 6 years ago

@cwh Thanks for the feedback. As a feature itself it's not that important, but having functionality to do actions on any kind of controls is a must. As this testing framework was kind of abandoned, I believe YaST team doesn't have capacity to do the development and my proposal, which got positive feedback from stakeholders, is to do that development inside of QA team as of now. Complexity was understood from very beginning, whereas I don't have an idea better and smaller than this. Continuing using openQA for all GUI tests is not scalable option.

Actions #15

Updated by okurz about 6 years ago

  • Status changed from Blocked to Workable

My own opinion is somewhere in the middle between cwh's and riafarov's but I am supporting you to have the capacity to explore further feasibility.

Regarding our ticket management process. Please use "Blocked" only with a reference to another ticket or place where we can see what this ticket is "blocked" by. Also use an assignee to track the other ticket then. You can use "Feedback" however when you consider a ticket as not "Workable" and want to get feedback.

Actions #16

Updated by riafarov about 6 years ago

  • Assignee set to riafarov

Taking over, had fruitful discussion with Christopher and Stefan Hundhammer, next step is to organize a meeting to decide how to start, then I will create tickets accordingly.

Actions #17

Updated by riafarov about 6 years ago

  • Due date deleted (2018-09-25)
  • Assignee deleted (riafarov)

We have to postpone again, having discussions on future architecture as YCP is planned to be dropped, communicating steps with YaST team. Returning to the team backlog.

Actions #18

Updated by riafarov about 6 years ago

  • Subject changed from [sle][functional][y] Improve YaST widget spy to work with more complex structures and implement row selection to [sle][functional][y] Improve YaST GUI testing framework to operate on tables
  • Description updated (diff)
  • Due date set to 2018-10-23

As per evaluation done in #42188, we can proceed with it using that approach. Changed ticket description.

Actions #19

Updated by riafarov about 6 years ago

  • Due date changed from 2018-10-23 to 2018-11-06

Wrong sprint defined.

Actions #20

Updated by okurz about 6 years ago

  • Target version changed from Milestone 19 to Milestone 20
Actions #21

Updated by cwh about 6 years ago

  • Status changed from Workable to In Progress
  • Assignee set to cwh
Actions #22

Updated by cwh about 6 years ago

For YTable in libyui currently neither get nor set is implemented for a bunch of properties:

bool
YTable::setProperty( const std::string & propertyName, const YPropertyValue & val )
{
    propertySet().check( propertyName, val.type() ); // throws exceptions if not found or type mismatch

    if      ( propertyName == YUIProperty_Value         )       return false; // Needs special handling
    else if ( propertyName == YUIProperty_CurrentItem   )       return false; // Needs special handling
    else if ( propertyName == YUIProperty_SelectedItems )       return false; // Needs special handling
    else if ( propertyName == YUIProperty_Items         )       return false; // Needs special handling
    else if ( propertyName == YUIProperty_Cell          )       return false; // Needs special handling
    else if ( propertyName == YUIProperty_Item          )       return false; // Needs special handling
    …

So we need not only to enhance the API.
Changes to libyui itself (including ~-qt and ~-ncurses) are necessary.

Actions #23

Updated by cwh about 6 years ago

Asked Huha about how to proceed. Her pointed me to the UI-interpreter.
Continue investigation.

Actions #24

Updated by cwh about 6 years ago

Code blindness hit me: For tables the currently selected item is already shown in the json output - but a bit different than I expected:

  {
    "labels" : 
    [
      "fe00::0",
      "ipv6-localnet",
      ""
    ],
    "selected" : true
  },
Actions #25

Updated by cwh about 6 years ago

I implemented a select_table API call.

Unfortunately it brought up an libyui bug in a method returning the label of a table cell.
It got fixed but now I need to rebuild also some other packages.

-> WIP

Actions #26

Updated by cwh about 6 years ago

select_table API call to select table rows works now.
https://github.com/libyui/libyui/pull/139

It searches the labels in the first column of the table by value and selects the first match.
curl -X POST 'http://d133.suse.de:14155/widgets?id=table&action=select_table&value=ff02::1'

Actions #27

Updated by cwh about 6 years ago

My next step is to provide always up-to-date rpm to make it available to others.

Actions #28

Updated by riafarov about 6 years ago

  • Due date changed from 2018-11-06 to 2018-11-20
Actions #29

Updated by riafarov about 6 years ago

  • Status changed from In Progress to Resolved

I believe we can resolve this one. After discussion on yast-devel, we now need to start a new project and enable this functionality as a plugin, keeping change to SUT minimal.

Actions

Also available in: Atom PDF