You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/03/01 22:41:19 UTC

svn commit: r1733160 - in /jmeter/trunk: src/components/org/apache/jmeter/visualizers/ src/core/org/apache/jmeter/assertions/ src/core/org/apache/jmeter/resources/ src/core/org/apache/jmeter/samplers/ src/protocol/http/org/apache/jmeter/protocol/http/s...

Author: pmouawad
Date: Tue Mar  1 21:41:19 2016
New Revision: 1733160

URL: http://svn.apache.org/viewvc?rev=1733160&view=rev
Log:
Bug 55597 View Results Tree: Add a search feature to search in recorded samplers

Quia JMeter risum promovere commercial productum elegantia non
Bugzilla Id: 55597

Added:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTreePanel.java   (with props)
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchableTreeNode.java   (with props)
Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
    jmeter/trunk/src/core/org/apache/jmeter/assertions/AssertionResult.java
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
    jmeter/trunk/xdocs/changes.xml

Added: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTreePanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTreePanel.java?rev=1733160&view=auto
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTreePanel.java (added)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTreePanel.java Tue Mar  1 21:41:19 2016
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.visualizers;
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JPanel;
+import javax.swing.UIManager;
+import javax.swing.tree.DefaultMutableTreeNode;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.jmeter.gui.Searchable;
+import org.apache.jmeter.gui.action.RawTextSearcher;
+import org.apache.jmeter.gui.action.RegexpSearcher;
+import org.apache.jmeter.gui.action.Searcher;
+import org.apache.jmeter.util.JMeterUtils;
+import org.apache.jorphan.gui.JLabeledTextField;
+import org.apache.jorphan.logging.LoggingManager;
+import org.apache.log.Logger;
+
+/**
+ * Panel used by {@link ViewResultsFullVisualizer} to search for data within the Tree
+ * @since 3.0
+ */
+public class SearchTreePanel extends JPanel implements ActionListener {
+
+    private static final long serialVersionUID = -4436834972710248247L;
+
+    private static final Logger LOG = LoggingManager.getLoggerForClass();
+
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize() * 0.8));
+
+    private JButton searchButton;
+
+    private JLabeledTextField searchTF;
+
+    private JCheckBox isRegexpCB;
+
+    private JCheckBox isCaseSensitiveCB;
+
+    private JButton resetButton;
+
+    private DefaultMutableTreeNode defaultMutableTreeNode;
+
+    public SearchTreePanel(DefaultMutableTreeNode defaultMutableTreeNode) {
+        super(); 
+        init();
+        this.defaultMutableTreeNode = defaultMutableTreeNode;
+    }
+
+    private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
+        setLayout(new BorderLayout(10,10));
+
+        searchTF = new JLabeledTextField(JMeterUtils.getResString("search_text_field"), 20); //$NON-NLS-1$
+        isRegexpCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_regexp"), false); //$NON-NLS-1$
+        isCaseSensitiveCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_case"), false); //$NON-NLS-1$
+        
+        isRegexpCB.setFont(FONT_SMALL);
+        isCaseSensitiveCB.setFont(FONT_SMALL);
+
+        searchButton = new JButton(JMeterUtils.getResString("search")); //$NON-NLS-1$
+        searchButton.addActionListener(this);
+        resetButton = new JButton(JMeterUtils.getResString("reset")); //$NON-NLS-1$
+        resetButton.addActionListener(this);
+
+        JPanel searchPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+        
+        searchPanel.add(searchTF);
+        searchPanel.add(isCaseSensitiveCB);
+        searchPanel.add(isRegexpCB);        
+        searchPanel.add(searchButton);
+        searchPanel.add(resetButton);
+        add(searchPanel);
+    }
+
+    /**
+     * Do search
+     * @param e {@link ActionEvent}
+     */
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        if(e.getSource() == searchButton) {
+            doSearch(e);
+        } else if (e.getSource() == resetButton) {
+            doResetSearch((SearchableTreeNode)defaultMutableTreeNode);
+        }
+    }
+
+    /**
+     * @param searchableTreeNode
+     */
+    private void doResetSearch(SearchableTreeNode searchableTreeNode) {
+        searchableTreeNode.reset();
+        searchableTreeNode.updateState();
+        for (int i = 0; i < searchableTreeNode.getChildCount(); i++) {
+            doResetSearch((SearchableTreeNode)searchableTreeNode.getChildAt(i));
+        }
+    }
+
+
+    /**
+     * @param e {@link ActionEvent}
+     */
+    private void doSearch(ActionEvent e) {
+        String wordToSearch = searchTF.getText();
+        if (StringUtils.isEmpty(wordToSearch)) {
+            return;
+        }
+        Searcher searcher = null;
+        if (isRegexpCB.isSelected()) {
+            searcher = new RegexpSearcher(isCaseSensitiveCB.isSelected(), searchTF.getText());
+        } else {
+            searcher = new RawTextSearcher(isCaseSensitiveCB.isSelected(), searchTF.getText());
+        }
+        
+        searchInNode(searcher, (SearchableTreeNode)defaultMutableTreeNode);
+    }
+
+    /**
+     * @param searcher
+     * @param node
+     */
+    private boolean searchInNode(Searcher searcher, SearchableTreeNode node) {
+        node.reset();
+        Object userObject = node.getUserObject();
+        
+        try {
+            Searchable searchable = null;
+            if(userObject instanceof Searchable) {
+                searchable = (Searchable) userObject;
+            } else {
+                return false;
+            }
+            if(searcher.search(searchable.getSearchableTokens())) {
+                node.setNodeHasMatched(true);
+            }
+            boolean foundInChildren = false;
+            for (int i = 0; i < node.getChildCount(); i++) {
+                searchInNode(searcher, (SearchableTreeNode)node.getChildAt(i));
+                foundInChildren =  
+                        searchInNode(searcher, (SearchableTreeNode)node.getChildAt(i))
+                        || foundInChildren; // Must be the last in condition
+            }
+            if(!node.isNodeHasMatched()) {
+                node.setChildrenNodesHaveMatched(foundInChildren);
+            }
+            node.updateState();
+            return node.isNodeHasMatched() || node.isChildrenNodesHaveMatched();
+        } catch (Exception e) {
+            LOG.error("Error extracting data from tree node");
+            return false;
+        }
+    }
+}

Propchange: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTreePanel.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchableTreeNode.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchableTreeNode.java?rev=1733160&view=auto
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchableTreeNode.java (added)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchableTreeNode.java Tue Mar  1 21:41:19 2016
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.visualizers;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+
+import org.apache.jmeter.assertions.AssertionResult;
+import org.apache.jmeter.samplers.SampleResult;
+
+/**
+ * TreeNode that holds flags for:
+ * <ul>
+ *      <li>nodeHasMatched : It matches a search</li>
+ *      <li>childrenNodesHaveMatched : One of its children matches a search</li>
+ * </ul>
+ * @since 3.0
+ */
+public class SearchableTreeNode extends DefaultMutableTreeNode {
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 5222625456347899544L;
+
+    private boolean nodeHasMatched;
+    
+    private boolean childrenNodesHaveMatched;
+
+    private transient DefaultTreeModel treeModel;
+    
+    public SearchableTreeNode() {
+        this((SampleResult) null, null);
+    }
+
+    public SearchableTreeNode(SampleResult userObj, DefaultTreeModel treeModel) {
+        super(userObj);
+        this.treeModel = treeModel;
+    }
+    
+    public SearchableTreeNode(AssertionResult userObj, DefaultTreeModel treeModel) {
+        super(userObj);
+        this.treeModel = treeModel;
+    }
+    
+    public void reset() {
+        nodeHasMatched = false;
+        childrenNodesHaveMatched = false;
+    }
+
+    public void updateState() {
+        if(treeModel != null) {
+            treeModel.nodeChanged(this);
+        }
+    }
+
+    /**
+     * @return the nodeHasMatched
+     */
+    public boolean isNodeHasMatched() {
+        return nodeHasMatched;
+    }
+
+    /**
+     * @param nodeHasMatched the nodeHasMatched to set
+     */
+    public void setNodeHasMatched(boolean nodeHasMatched) {
+        this.nodeHasMatched = nodeHasMatched;
+    }
+
+    /**
+     * @return the childrenNodesHaveMatched
+     */
+    public boolean isChildrenNodesHaveMatched() {
+        return childrenNodesHaveMatched;
+    }
+
+    /**
+     * @param childrenNodesHaveMatched the childrenNodesHaveMatched to set
+     */
+    public void setChildrenNodesHaveMatched(boolean childrenNodesHaveMatched) {
+        this.childrenNodesHaveMatched = childrenNodesHaveMatched;
+    }
+}

Propchange: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchableTreeNode.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java?rev=1733160&r1=1733159&r2=1733160&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java Tue Mar  1 21:41:19 2016
@@ -36,6 +36,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.swing.BorderFactory;
 import javax.swing.ComboBoxModel;
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.ImageIcon;
@@ -45,6 +46,7 @@ import javax.swing.JScrollPane;
 import javax.swing.JSplitPane;
 import javax.swing.JTabbedPane;
 import javax.swing.JTree;
+import javax.swing.border.Border;
 import javax.swing.event.TreeSelectionEvent;
 import javax.swing.event.TreeSelectionListener;
 import javax.swing.tree.DefaultMutableTreeNode;
@@ -79,6 +81,10 @@ implements ActionListener, TreeSelection
     public static final Color CLIENT_ERROR_COLOR = Color.blue;
 
     public static final Color REDIRECT_COLOR = Color.green;
+    
+    private static final Border RED_BORDER = BorderFactory.createLineBorder(Color.red);
+    
+    private static final Border BLUE_BORDER = BorderFactory.createLineBorder(Color.blue);
 
     private  JSplitPane mainSplit;
 
@@ -144,7 +150,7 @@ implements ActionListener, TreeSelection
      */
     private synchronized void updateGui(SampleResult res) {
         // Add sample
-        DefaultMutableTreeNode currNode = new DefaultMutableTreeNode(res);
+        DefaultMutableTreeNode currNode = new SearchableTreeNode(res, treeModel);
         treeModel.insertNodeInto(currNode, root, root.getChildCount());
         addSubResults(currNode, res);
         // Add any assertion that failed as children of the sample node
@@ -152,7 +158,7 @@ implements ActionListener, TreeSelection
         int assertionIndex = currNode.getChildCount();
         for (AssertionResult assertionResult : assertionResults) {
             if (assertionResult.isFailure() || assertionResult.isError()) {
-                DefaultMutableTreeNode assertionNode = new DefaultMutableTreeNode(assertionResult);
+                DefaultMutableTreeNode assertionNode = new SearchableTreeNode(assertionResult, treeModel);
                 treeModel.insertNodeInto(assertionNode, currNode, assertionIndex++);
             }
         }
@@ -175,7 +181,7 @@ implements ActionListener, TreeSelection
             if (log.isDebugEnabled()) {
                 log.debug("updateGui1 : child sample result - " + child);
             }
-            DefaultMutableTreeNode leafNode = new DefaultMutableTreeNode(child);
+            DefaultMutableTreeNode leafNode = new SearchableTreeNode(child, treeModel);
 
             treeModel.insertNodeInto(leafNode, currNode, leafIndex++);
             addSubResults(leafNode, child);
@@ -184,7 +190,7 @@ implements ActionListener, TreeSelection
             int assertionIndex = leafNode.getChildCount();
             for (AssertionResult item : assertionResults) {
                 if (item.isFailure() || item.isError()) {
-                    DefaultMutableTreeNode assertionNode = new DefaultMutableTreeNode(item);
+                    DefaultMutableTreeNode assertionNode = new SearchableTreeNode(item, treeModel);
                     treeModel.insertNodeInto(assertionNode, leafNode, assertionIndex++);
                 }
             }
@@ -223,7 +229,12 @@ implements ActionListener, TreeSelection
 
         // Create the split pane
         mainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftSide, rightSide);
-        add(mainSplit, BorderLayout.CENTER);
+        mainSplit.setOneTouchExpandable(true);
+
+        JSplitPane searchAndMainSP = new JSplitPane(JSplitPane.VERTICAL_SPLIT, 
+                new SearchTreePanel(root), mainSplit);
+        searchAndMainSP.setOneTouchExpandable(true);
+        add(searchAndMainSP, BorderLayout.CENTER);
         // init right side with first render
         resultsRender.setRightSide(rightSide);
         resultsRender.init();
@@ -274,7 +285,7 @@ implements ActionListener, TreeSelection
         SampleResult rootSampleResult = new SampleResult();
         rootSampleResult.setSampleLabel("Root");
         rootSampleResult.setSuccessful(true);
-        root = new DefaultMutableTreeNode(rootSampleResult);
+        root = new SearchableTreeNode(rootSampleResult, null);
 
         treeModel = new DefaultTreeModel(root);
         jTree = new JTree(treeModel);
@@ -431,6 +442,16 @@ implements ActionListener, TreeSelection
             } 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;
         }
     }

Modified: jmeter/trunk/src/core/org/apache/jmeter/assertions/AssertionResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/assertions/AssertionResult.java?rev=1733160&r1=1733159&r2=1733160&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/assertions/AssertionResult.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/assertions/AssertionResult.java Tue Mar  1 21:41:19 2016
@@ -19,11 +19,15 @@
 package org.apache.jmeter.assertions;
 
 import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.jmeter.gui.Searchable;
 
 /**
  * Implements Response Assertion checking.
  */
-public class AssertionResult implements Serializable {
+public class AssertionResult implements Serializable, Searchable {
     public static final String RESPONSE_WAS_NULL = "Response was null"; // $NON-NLS-1$
 
     private static final long serialVersionUID = 240L;
@@ -162,4 +166,12 @@ public class AssertionResult implements
     public String toString() {
         return getName() != null ? getName() : super.toString();
     }
+    
+    @Override
+    public List<String> getSearchableTokens() throws Exception {
+        List<String> datasToSearch = new ArrayList<>(2);
+        datasToSearch.add(getName());
+        datasToSearch.add(getFailureMessage());
+        return datasToSearch;
+    }
 }

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1733160&r1=1733159&r2=1733160&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Tue Mar  1 21:41:19 2016
@@ -870,6 +870,7 @@ reportgenerator_summary_statistics_perce
 reportgenerator_summary_statistics_throughput=Throughput
 reportgenerator_summary_total=Total
 request_data=Request Data
+reset=Reset
 reset_gui=Reset Gui
 response_save_as_md5=Save response as MD5 hash?
 restart=Restart

Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=1733160&r1=1733159&r2=1733160&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Tue Mar  1 21:41:19 2016
@@ -855,6 +855,7 @@ reportgenerator_summary_statistics_perce
 reportgenerator_summary_statistics_throughput=D\u00E9bit
 reportgenerator_summary_total=Total
 request_data=Donn\u00E9e requ\u00EAte
+reset=R\u00E9initialiser
 reset_gui=R\u00E9initialiser l'\u00E9l\u00E9ment
 response_save_as_md5=R\u00E9ponse en empreinte MD5
 restart=Red\u00E9marrer

Modified: jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java?rev=1733160&r1=1733159&r2=1733160&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/samplers/SampleResult.java Tue Mar  1 21:41:19 2016
@@ -30,6 +30,7 @@ import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.jmeter.assertions.AssertionResult;
+import org.apache.jmeter.gui.Searchable;
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.jorphan.util.JOrphanUtils;
@@ -42,7 +43,7 @@ import org.apache.log.Logger;
  * sample of an entry.
  *
  */
-public class SampleResult implements Serializable, Cloneable {
+public class SampleResult implements Serializable, Cloneable, Searchable {
 
     private static final long serialVersionUID = 241L;
 
@@ -1433,4 +1434,14 @@ public class SampleResult implements Ser
             throw new IllegalStateException("This should not happen");
         }
     }
+
+    @Override
+    public List<String> getSearchableTokens() throws Exception {
+        List<String> datasToSearch = new ArrayList<>(4);
+        datasToSearch.add(getSampleLabel());
+        datasToSearch.add(getDataEncodingNoDefault());
+        datasToSearch.add(getRequestHeaders());
+        datasToSearch.add(getResponseHeaders());
+        return datasToSearch;
+    }
 }

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java?rev=1733160&r1=1733159&r2=1733160&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java Tue Mar  1 21:41:19 2016
@@ -21,6 +21,8 @@ package org.apache.jmeter.protocol.http.
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.jmeter.protocol.http.util.HTTPConstants;
 import org.apache.jmeter.samplers.SampleResult;
@@ -253,5 +255,16 @@ public class HTTPSampleResult extends Sa
         setResponseCode(HTTP_NO_CONTENT_CODE);
         setResponseMessage(HTTP_NO_CONTENT_MSG);
     }
-    
+
+    /* (non-Javadoc)
+     * @see org.apache.jmeter.samplers.SampleResult#getSearchableTokens()
+     */
+    @Override
+    public List<String> getSearchableTokens() throws Exception {
+        List<String> list = new ArrayList<>(super.getSearchableTokens());
+        list.add(getQueryString());
+        list.add(getCookies());
+        list.add(getQueryString());
+        return list;
+    }
 }

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1733160&r1=1733159&r2=1733160&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Tue Mar  1 21:41:19 2016
@@ -159,6 +159,7 @@ Summary
 <li><bug>58849</bug>View Results Tree : Add a search panel to the request http view to be able to search in the parameters table. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
 <li><bug>58857</bug>View Results Tree : the request view http does not allow to resize the parameters table first column. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
 <li><bug>58955</bug>Request view http does not correctly display http parameters in multipart/form-data. Contributed by Benoit Wiart (benoit dot wiart at gmail.com)</li>
+<li><bug>55597</bug>View Results Tree: Add a search feature to search in recorded samplers</li>
 </ul>
 
 <h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>