action #37327
closedcoordination #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
0%
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¶
- 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:
Updated by okurz over 6 years ago
- Category set to New test
when would you like this to be scheduled?
Updated by okurz over 6 years ago
- Target version changed from future to Milestone 18
Updated by okurz over 6 years ago
- Precedes action #38879: [functional][y] Implement yast2 hostname test using ncurses with YCP added
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
Updated by riafarov over 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.
Updated by cwh over 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.
Updated by riafarov over 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.
Updated by okurz over 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.
Updated by riafarov over 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.
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.
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.
Updated by riafarov about 6 years ago
- Due date changed from 2018-10-23 to 2018-11-06
Wrong sprint defined.
Updated by okurz about 6 years ago
- Target version changed from Milestone 19 to Milestone 20
Updated by cwh about 6 years ago
- Status changed from Workable to In Progress
- Assignee set to cwh
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.
Updated by cwh about 6 years ago
Asked Huha about how to proceed. Her pointed me to the UI-interpreter.
Continue investigation.
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
},
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
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'
Updated by cwh about 6 years ago
My next step is to provide always up-to-date rpm to make it available to others.
Updated by riafarov about 6 years ago
- Due date changed from 2018-11-06 to 2018-11-20
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.