Better UI log viewer
|Target version:||QA - future|
- the API call requests a needle to match
- the tester wants to save a screenshot
- randomly (every 30 seconds? I am not really sure about the time-frame here)
I would like to propose to disable the feature of openQA to take randomly screenshots. Simply put, if there is not need to take a screenshot, then do NOT take one. There are console tests that require only 2 or 3 screenshots in order to match these equivalent needles, however in the end, you see 10 or even more. This is confusing and pointless because these frames were taken out of the blue.
What I would like to propose here is to take a screenshot per command. By command, is mean the line of the source code of the test that was touch at that point of time. For example:
Look for the code that was touch in the test (in that case I will show the unzip.pm)
27: select_console "root-console"; 28: assert_script_run "mkdir -p /tmp/unzip-test/"; 31: assert_script_run "wget --quiet " . data_url('console/test_unzip.zip') . " -O /tmp/unzip-test/archive.zip"; 32: assert_script_run "cd /tmp/unzip-test; unzip archive.zip"; 33: my $entries = script_output("ls -l /tmp/unzip-test/ | wc -l"); 37: assert_script_run "wget --quiet " . data_url('console/checklist.md5') . " -O /tmp/unzip-test/checklist.md5"; 38: assert_script_run "md5sum -c /tmp/unzip-test/checklist.md5";
So, in this particular example, openQA should show only 7 screenshots (meaning 1 screenshot per command). In that scenario, when the user clicks on one of them, then given that #16180 is implemented, openQA can show these logs right away. In that way, the whole review of a test is freaking quick and more enjoyable, since this is exactly the behavior that the user expects to see. In other words, people will enjoy debugging in openQA!
Furthermore, by implementing this feature, there will be no need for this extra screenshot (usually either green or red, >_) which checks for wait_serial expected. Actually, you can adapt this coloring-scheme functionality to these new screenshots (per command) I proposed, so if it passes: green, otherwise make it red as a whole unit.
Now, related to the other screenshots that openQA captures (I am referring to those required screenshots for needle-matching), I would like to hide them unless they missmatch. For example, matching a needle is part of an api-call. So, if we have screenshot per command (which includes none, or one or more API calls) there is not need to have extra ones, unless if a needle-matching has been failed.
So, less confusion, less disk space, more clarity, more fun :-)