Project

General

Profile

action #107824

Updated by JERiveraMoya about 2 years ago

We saw that the solution applied here [here](https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/14051/commits/8cb5d45c096b37991be23b37d0ec20fe28c1f672) in order to take more screenshots is working fine. We could probably apply it everywhere it makes sense with not too much work, even though the task may be a bit repetitive. 
 We determined some motivation for this and some possible problems in earlier discussions: 


 ~~~ 
 Problem: 

 But there is one thing that makes me sad: we no longer see what the module is doing, unless it fails (in which case we get logs and a screenshot). While not strictly necessary, I think it is nice to be able to visualize immediately what the module does without having to dig in the code. And that can be especially useful when we use very high-level methods in test module such as: 

 sub run { 
     $testapi::distri->get_local_user()->import_existing_users(); 
 } 

 In which case we'd have to dig in libraries to understand what it does, when in the past, with testapi, you would just have to look at pictures. 

 That can be specially useful for developers, to be able to visualize the steps to reproduce a bug. 

 One possible solution is already here: 

 To make sure we are on the right page, we implemented for each page a method called is_shown. Then in the controller, we have methods like "get_user_creation_page" which calls the "is_shown" method, and each method from the page is using "get_user_creation_page" hence each time calling is_shown. This would be in my opinion a good place to show "what is shown". 
 ~~~ 

 There are also some examples where review was made pretty difficult without this. For example [here](http://waaa-amazing.suse.cz/tests/16132#step/import_users/3) we would not even see that the pop-up is displayed. This was the reason why this modification of is_shown was made at the first place, as it was very tricky to figure out what was happening if something went wrong in the pop-up but then we would only see the main page at the end. 
 There are some places where this is not useful though, such as [here](https://openqa.suse.de/tests/8386306#step/open_ssh_port/1): if only one action is done in the module that is visible in the sole screenshot at the end, in this case only click to activate. 
 In general, if the method/module used is descriptive enough and the sole screenshot taken at the end are good enough to understand all the actions done by the module, then it's probably not useful, otherwise can really help for us to review quicker and for devs to visualize the steps to reproduce the bugs we submit to them. 

 AC1: modify is_shown methods where it makes sense in yast group to take screenshots of actions being done 

 It was decided to have a openQA setting to be able to change the behavior from enabled default to deactivated.

Back