jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gomes Rodrigues <ra0...@gmail.com>
Subject Icon in View Results Tree for sample responses
Date Sat, 11 Nov 2017 22:10:27 GMT
Hi,

Like you can see in the screenshot of the View Results Tree
http://jmeter.apache.org/usermanual/component_reference.html#View_Results_Tree
For the moment we have a different icon for failure and success

    private static class ResultsNodeRenderer extends
DefaultTreeCellRenderer {
        private static final long serialVersionUID = 4159626601097711565L;

        @Override
        public Component getTreeCellRendererComponent(JTree tree, Object
value,
                boolean sel, boolean expanded, boolean leaf, int row,
boolean focus) {
            super.getTreeCellRendererComponent(tree, value, sel, expanded,
leaf, row, focus);
            boolean failure = true;
            Object userObject = ((DefaultMutableTreeNode)
value).getUserObject();
            if (userObject instanceof SampleResult) {
                failure = !(((SampleResult) userObject).isSuccessful());
            } else if (userObject instanceof AssertionResult) {
                AssertionResult assertion = (AssertionResult) userObject;
                failure = assertion.isError() || assertion.isFailure();
            }

            // Set the status for the node
            if (failure) {
                this.setForeground(Color.red);
                this.setIcon(imageFailure);
            } else {
                this.setIcon(imageSuccess);
            }

            // Handle search related rendering
            SearchableTreeNode node = (SearchableTreeNode) value;
            if(node.isNodeHasMatched()) {
                setBorder(RED_BORDER);
            } else if (node.isChildrenNodesHaveMatched()) {
                setBorder(BLUE_BORDER);
            } else {
                setBorder(null);
            }
            return this;
        }
    }


I propose to replace this icon (or add a new) with different icons which
represent the type of request (html, png, ico, jpeg...)

Proposition 1:
Replace the existing icon by a icon which represent the type of request

Proposition 2:
Replace the existing icon by a colored icon (red or green like we already
have) which represent the type of request

Proposition 3:
Keep the current icon + add a icon which represent the type of request

Proposition 4:
Keep the current icon + colored icon (red or green like we already have)
which represent the type of request

This modification will allow to easily see if an error is important
depending on the icon + color of the text

For example if I active Retrieve All Embedded Resources from HTML Files, I
don't care if the favicon have an error

Antonio

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message