Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Possible UI Script to put the Results at the Top


#1

When we run automation (10k+ tests) we typically get some set of failures; that we want to go through and verify that it’s either a known defect or a script issue. But all these testcases have data in them (steps, fields, etc) which is often a scroll-bar-page in length.

This means to see the the actual result boxes (Results & Comments, History & Context, etc) we need to scroll down for each testcase. However, the results box contains custom content that makes it easy for us to identify if a testcase needs more analysis or if it’s a known defect.

The problem, or rather irritation, is that we need scroll down to this for each testcase. For a few testcases it’s not bad, for a 100 it’s a real pain.

My question, is there a way (with a UI script, I would guess) that we could use that would put those tabbed-boxes at the top of the testcase (such as after the title; or even after the blue box which contains non-text-type fields)? This would be extremely helpful.

Thanks,
–c


#2

Hello Jim,

On the test page, there’s already a link to jump to the result section and this is part of the title section:

(see the green arrow next to the title)

This would scroll directly to the result list and additional context details. It should also be possible to automate this with a UI script but this might be bit confusing if you automatically scroll down every time to the result section when opening the test page, what do you think?

Cheers,
Tobias


#3

For the life of me, I do not see a green arrow next to the title. But I think the above graphic is assuming non-3 column mode as well as that’s the only time I see that banner (View Case / Edit case, etc).

and here is what it looks like in 3 column view:

Hopefully this illustrates what I am seeing.

I would love the script that does exactly what you think is confusing; not so much because it’s the solution but it’ll give me a starting point in the scripting to play around.

Thanks,
–c


#4

Hi Jim,

Thanks for your reply! The arrow is only displayed currently if the title does not wrap (see my screenshot). We are happy to look into making this more flexible in the future. I will make sure to prepare a small example for the UI script (likely tomorrow).

Cheers,
Tobias


#5

Cough

:slight_smile:


#6

Sorry, here’s the UI script: :slight_smile:

name: Jump to result list on test page
description: Jumps to result list on test page when opening this page
author: Gurock Software
version: 1.0
includes: ^tests/view
excludes: 

js:
$(document).ready(
    function() {
        var results = $('#changes');
        if (results.length > 0)
        {
            results[0].scrollIntoView();
        }
    }
); 

This is only supported for the test page currently and not the three-pane view because the three-pane view and run page is too dynamic but I hope this helps anyway.

Just let me know in case you have any questions, happy to help.

Cheers,
Tobias


#7

Thanks much! It does provide a good example for me to make other modifications. It is unfortunate that it does not work in 3-pane view. Perhaps something to add to the list of requests where we can have the option of results at top?


#8

Great to hear that this helps, Jim :slight_smile:

Yep, happy to look into this and it would help to add some JavaScript events for the three-pane view to hook into (so you can execute custom JS when the three-pane view is updated, for example).

Cheers,
Tobias