KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jmeter > junit > JMeterTest


1 // $Header: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/junit/JMeterTest.java,v 1.55 2004/03/18 23:18:23 sebb Exp $
2
/*
3  * Copyright 2002-2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17 */

18
19 package org.apache.jmeter.junit;
20 import java.io.ByteArrayInputStream JavaDoc;
21 import java.io.ByteArrayOutputStream JavaDoc;
22 import java.io.ObjectInputStream JavaDoc;
23 import java.io.ObjectOutputStream JavaDoc;
24 import java.io.Serializable JavaDoc;
25 import java.rmi.RemoteException JavaDoc;
26 import java.util.Collection JavaDoc;
27 import java.util.HashMap JavaDoc;
28 import java.util.Iterator JavaDoc;
29 import java.util.LinkedList JavaDoc;
30 import java.util.List JavaDoc;
31 import java.util.Map JavaDoc;
32 import java.util.Set JavaDoc;
33
34 import junit.framework.Test;
35 import junit.framework.TestSuite;
36
37 import org.apache.jmeter.engine.util.CompoundVariable;
38 import org.apache.jmeter.functions.Function;
39 import org.apache.jmeter.gui.GuiPackage;
40 import org.apache.jmeter.gui.JMeterGUIComponent;
41 import org.apache.jmeter.gui.UnsharedComponent;
42 import org.apache.jmeter.gui.action.ActionRouter;
43 import org.apache.jmeter.gui.tree.JMeterTreeListener;
44 import org.apache.jmeter.gui.tree.JMeterTreeModel;
45 import org.apache.jmeter.gui.tree.JMeterTreeNode;
46 import org.apache.jmeter.save.SaveService;
47 import org.apache.jmeter.testbeans.TestBean;
48 import org.apache.jmeter.testbeans.gui.TestBeanGUI;
49 import org.apache.jmeter.testelement.TestElement;
50 import org.apache.jmeter.testelement.property.JMeterProperty;
51 import org.apache.jmeter.testelement.property.PropertyIterator;
52 import org.apache.jmeter.util.JMeterUtils;
53 import org.apache.jorphan.logging.LoggingManager;
54 import org.apache.jorphan.reflect.ClassFinder;
55 import org.apache.jorphan.util.JOrphanUtils;
56 import org.apache.log.Logger;
57
58 import org.jdom.Document;
59 import org.jdom.Element;
60 import org.jdom.input.SAXBuilder;
61
62 /**
63  * @version $Revision: 1.55 $ Last update $Date: 2004/03/18 23:18:23 $
64  */

65 public class JMeterTest extends JMeterTestCase
66 {
67     private static Logger log = LoggingManager.getLoggerForClass();
68     
69     private static Map JavaDoc guiTitles;
70     private static Map JavaDoc guiTags;
71     private static Map JavaDoc funcTitles;
72
73     public JMeterTest(String JavaDoc name)
74     {
75         super(name);
76     }
77
78 /*
79  * The suite() method creates separate test suites for each of the types of test.
80  * The suitexxx() methods create a list of items to be tested, and create a new test
81  * instance for each.
82  *
83  * Each test type has its own constructor, which saves the item to be tested
84  *
85  * Note that the suite() method must be static, and the methods
86  * to run the tests must be instance methods so that they can pick up the item value
87  * which was saved by the constructor.
88  *
89  */

90     // Constructor for TestElement tests
91
private TestElement testItem;
92     public JMeterTest(String JavaDoc testName, TestElement te)
93     {
94         super(testName);// Save the method name
95
testItem=te;
96     }
97
98     // Constructor for Serializable tests
99
private Serializable JavaDoc serObj;
100     public JMeterTest(String JavaDoc testName, Serializable JavaDoc ser)
101     {
102         super(testName);// Save the method name
103
serObj=ser;
104     }
105
106     // Constructor for GUI tests
107
private JMeterGUIComponent guiItem;
108     public JMeterTest(String JavaDoc testName, JMeterGUIComponent gc)
109     {
110         super(testName);// Save the method name
111
guiItem=gc;
112     }
113     
114     // Constructor for Function tests
115
private Function funcItem;
116
117     private static boolean classPathShown=false;// Only show classpath once
118

119     public JMeterTest(String JavaDoc testName, Function fi)
120     {
121         super(testName);// Save the method name
122
funcItem=fi;
123     }
124     
125     /*
126      * Use a suite to allow the tests to be generated at run-time
127      */

128     public static Test suite() throws Exception JavaDoc{
129         // ensure the GuiPackage is initialized.
130
JMeterTreeModel treeModel = new JMeterTreeModel();
131         JMeterTreeListener treeLis = new JMeterTreeListener(treeModel);
132         treeLis.setActionHandler(ActionRouter.getInstance());
133         GuiPackage.getInstance(treeLis, treeModel);
134         try {
135             // The GuiPackage needs a MainFrame to work:
136
org.apache.jmeter.gui.MainFrame main =
137                 new org.apache.jmeter.gui.MainFrame(
138                     ActionRouter.getInstance(),
139                     treeModel,
140                     treeLis);
141         }
142         catch (RuntimeException JavaDoc e)
143         {
144             System.out.println("Cannot create MainFrame: "+e);
145         }
146
147         TestSuite suite = new TestSuite();
148         suite.addTest(new JMeterTest("createTitleSet"));
149         suite.addTest(new JMeterTest("createTagSet"));
150         suite.addTest(suiteGUIComponents());
151         suite.addTest(suiteSerializableElements());
152         suite.addTest(suiteTestElements());
153         suite.addTest(suiteBeanComponents());
154         suite.addTest(new JMeterTest("createFunctionSet"));
155         suite.addTest(suiteFunctions());
156         suite.addTest(new JMeterTest("checkGuiSet"));
157         suite.addTest(new JMeterTest("checkFunctionSet"));
158         return suite;
159     }
160     
161     /*
162      * Extract titles from component_reference.xml
163      */

164     public void createTitleSet() throws Exception JavaDoc
165     {
166         guiTitles = new HashMap JavaDoc(90);
167         
168         String JavaDoc compref = "../xdocs/usermanual/component_reference.xml";
169         SAXBuilder bldr = new SAXBuilder();
170         Document doc;
171         doc = bldr.build(compref);
172         Element root = doc.getRootElement();
173         Element body = root.getChild("body");
174         List JavaDoc sections = body.getChildren("section");
175         for (int i = 0; i< sections.size();i++){
176             List JavaDoc components = ((Element) sections.get(i)).getChildren("component");
177             for (int j = 0; j <components.size();j++){
178                 Element comp = (Element) components.get(j);
179                 guiTitles.put(comp.getAttributeValue("name"),Boolean.FALSE);
180             }
181         }
182         // Add titles that don't need to be documented
183
guiTitles.put("Root",Boolean.FALSE);
184         guiTitles.put("Example Sampler",Boolean.FALSE);
185     }
186
187     /*
188      * Extract titles from component_reference.xml
189      */

190     public void createTagSet() throws Exception JavaDoc
191     {
192         guiTags = new HashMap JavaDoc(90);
193         
194         String JavaDoc compref = "../xdocs/usermanual/component_reference.xml";
195         SAXBuilder bldr = new SAXBuilder();
196         Document doc;
197         doc = bldr.build(compref);
198         Element root = doc.getRootElement();
199         Element body = root.getChild("body");
200         List JavaDoc sections = body.getChildren("section");
201         for (int i = 0; i< sections.size();i++){
202             List JavaDoc components = ((Element) sections.get(i)).getChildren("component");
203             for (int j = 0; j <components.size();j++){
204                 Element comp = (Element) components.get(j);
205                 guiTags.put(comp.getAttributeValue("tag"),Boolean.FALSE);
206             }
207         }
208     }
209
210     /*
211      * Extract titles from functions.xml
212      */

213     public void createFunctionSet() throws Exception JavaDoc
214     {
215         funcTitles = new HashMap JavaDoc(20);
216         
217         String JavaDoc compref = "../xdocs/usermanual/functions.xml";
218         SAXBuilder bldr = new SAXBuilder();
219         Document doc;
220         doc = bldr.build(compref);
221         Element root = doc.getRootElement();
222         Element body = root.getChild("body");
223         Element section = body.getChild("section");
224         List JavaDoc sections = section.getChildren("subsection");
225         for (int i = 0; i< sections.size();i++){
226             List JavaDoc components = ((Element) sections.get(i)).getChildren("component");
227             for (int j = 0; j <components.size();j++){
228                 Element comp = (Element) components.get(j);
229                 funcTitles.put(comp.getAttributeValue("name"),Boolean.FALSE);
230             }
231         }
232     }
233
234     private int scanprintMap(Map JavaDoc m, String JavaDoc t)
235     {
236         Set JavaDoc s = m.keySet();
237         int unseen = 0;
238         if (s.size() == 0) return 0;
239         Iterator JavaDoc i = s.iterator();
240         while (i.hasNext())
241         {
242             Object JavaDoc key = i.next();
243             if (!m.get(key).equals(Boolean.TRUE))
244             {
245                 if(key.equals("SSL Manager"))// Not a true GUI component
246
{
247                     continue;
248                 }
249                 if (unseen == 0)// first time
250
{
251                     System.out.println("\nNames remaining in "+t+" Map:");
252                 }
253                 unseen++;
254                 System.out.println(key);
255             }
256         }
257         return unseen;
258     }
259     public void checkGuiSet() throws Exception JavaDoc
260     {
261         guiTitles.remove("Example Sampler");// We don't mind if this is left over
262
assertEquals("Should not have any names left over",0,scanprintMap(guiTitles,"GUI"));
263     }
264
265     public void checkFunctionSet() throws Exception JavaDoc
266     {
267         assertEquals("Should not have any names left over",0,scanprintMap(funcTitles,"Function"));
268     }
269     /*
270      * Test GUI elements - create the suite of tests
271      */

272     private static Test suiteGUIComponents() throws Exception JavaDoc
273     {
274         TestSuite suite = new TestSuite("GuiComponents");
275         Iterator JavaDoc iter = getObjects(JMeterGUIComponent.class).iterator();
276         while (iter.hasNext())
277         {
278             JMeterGUIComponent item = (JMeterGUIComponent) iter.next();
279             if (item instanceof JMeterTreeNode)
280             {
281                 System.out.println("INFO: JMeterGUIComponent: skipping all tests "+item.getClass().getName());
282                 continue;
283             }
284             TestSuite ts = new TestSuite(item.getClass().getName());
285             ts.addTest(new JMeterTest("GUIComponents1",item));
286             if (item instanceof TestBeanGUI)
287             {
288                 System.out.println("INFO: JMeterGUIComponent: skipping some tests "+item.getClass().getName());
289             }
290             else
291             {
292                 ts.addTest(new JMeterTest("GUIComponents2",item));
293                 ts.addTest(new JMeterTest("runGUITitle",item));
294             }
295             suite.addTest(ts);
296         }
297         return suite;
298     }
299
300     /*
301      * Test Functions - create the suite of tests
302      */

303     private static Test suiteFunctions() throws Exception JavaDoc
304     {
305         TestSuite suite = new TestSuite("Functions");
306         Iterator JavaDoc iter = getObjects(Function.class).iterator();
307         while (iter.hasNext())
308         {
309             Object JavaDoc item = iter.next();
310             if (item.getClass().equals(CompoundVariable.class))
311             {
312                 continue;
313             }
314             TestSuite ts = new TestSuite(item.getClass().getName());
315             ts.addTest(new JMeterTest("runFunction",(Function) item));
316             ts.addTest(new JMeterTest("runFunction2",(Function) item));
317             suite.addTest(ts);
318         }
319         return suite;
320     }
321
322
323         /*
324          * Test GUI elements - create the suite of tests
325          */

326         private static Test suiteBeanComponents() throws Exception JavaDoc
327         {
328             TestSuite suite = new TestSuite("BeanComponents");
329             Iterator JavaDoc iter = getObjects(TestBean.class).iterator();
330             while (iter.hasNext())
331             {
332                 Class JavaDoc c = iter.next().getClass();
333                 try {
334                     JMeterGUIComponent item = new TestBeanGUI(c);
335                     //JMeterGUIComponent item = (JMeterGUIComponent) iter.next();
336
TestSuite ts = new TestSuite(item.getClass().getName());
337                     ts.addTest(new JMeterTest("GUIComponents2",item));
338                     ts.addTest(new JMeterTest("runGUITitle",item));
339                     suite.addTest(ts);
340                 }
341                 catch(IllegalArgumentException JavaDoc e)
342                 {
343                     System.out.println("Cannot create test for "+c.getName()+" "+e);
344                     e.printStackTrace(System.out);
345                 }
346             }
347         return suite;
348     }
349     
350     /*
351      * Test GUI elements - run the test
352      */

353     public void runGUITitle() throws Exception JavaDoc
354     {
355         if (guiTitles.size() > 0) {
356             String JavaDoc title = guiItem.getStaticLabel();
357             boolean ct =guiTitles.containsKey(title);
358             if (ct) guiTitles.put(title,Boolean.TRUE);// So we can detect extra entries
359
if (// Is this a work in progress ?
360
(title.indexOf("(ALPHA") == -1)
361                 &&
362                 (title.indexOf("(BETA") == -1)
363                 &&
364                 (!title.equals("Example1")) // Skip the example samplers ...
365
&&
366                 (!title.equals("Example2"))
367             )
368             {// No, not a work in progress ...
369
assertTrue("component_reference.xml needs '"+title+"' anchor for "+guiItem.getClass().getName(),ct);
370             }
371         }
372     }
373     
374     /*
375      * run the function test
376      */

377     public void runFunction() throws Exception JavaDoc
378     {
379         if (funcTitles.size() > 0) {
380             String JavaDoc title = funcItem.getReferenceKey();
381             boolean ct =funcTitles.containsKey(title);
382             if (ct) funcTitles.put(title,Boolean.TRUE);// For detecting extra entries
383
if (// Is this a work in progress ?
384
title.indexOf("(ALPHA") == -1
385                 && title.indexOf("(EXPERIMENTAL") == -1
386             )
387             {// No, not a work in progress ...
388
assertTrue("function.xml needs '"+title+"' entry for "+funcItem.getClass().getName(),ct);
389             }
390         }
391     }
392     
393     /*
394      * Check that function descriptions are OK
395      */

396     public void runFunction2() throws Exception JavaDoc
397     {
398         Iterator JavaDoc i = funcItem.getArgumentDesc().iterator();
399         while (i.hasNext())
400         {
401             Object JavaDoc o = i.next();
402             assertTrue("Description must be a String",o instanceof String JavaDoc);
403             assertFalse("Description must not start with [refkey"
404               ,((String JavaDoc)o).startsWith("[refkey"));
405         }
406     }
407     
408     /*
409      * Test GUI elements - run the test
410      */

411     public void GUIComponents1() throws Exception JavaDoc
412     {
413         String JavaDoc name = guiItem.getClass().getName();
414
415         assertEquals(
416             "Name should be same as static label for " + name,
417             guiItem.getStaticLabel(),
418             guiItem.getName());
419         if (!name.endsWith("TestBeanGUI"))
420         {
421             try{
422                 String JavaDoc label = guiItem.getLabelResource();
423                 assertTrue(label.length() > 0);
424                 assertFalse("'"+label+"' should be in resource file for "+name
425                         ,JMeterUtils.getResString(label).startsWith(JMeterUtils.RES_KEY_PFX));
426             }
427             catch(UnsupportedOperationException JavaDoc uoe)
428             {
429                 log.warn("Class has not yet implemented getLabelResource "+name);
430             }
431         }
432     }
433
434
435     /*
436      * Test GUI elements - run the test
437      */

438     public void GUIComponents2() throws Exception JavaDoc
439     {
440         String JavaDoc name = guiItem.getClass().getName();
441         
442         //TODO these assertions should be separate tests
443

444         TestElement el = guiItem.createTestElement();
445         assertNotNull(
446         name+".createTestElement should be non-null ", el);
447         assertEquals(
448             "GUI-CLASS: Failed on " + name,
449             name,
450             el.getPropertyAsString(TestElement.GUI_CLASS));
451
452         assertEquals(
453             "NAME: Failed on " + name,
454             guiItem.getName(),
455             el.getPropertyAsString(TestElement.NAME));
456         assertEquals(
457             "TEST-CLASS: Failed on " + name,
458             el.getClass().getName(),
459             el.getPropertyAsString(TestElement.TEST_CLASS));
460         TestElement el2 = guiItem.createTestElement();
461         el.setProperty(TestElement.NAME, "hey, new name!:");
462         el.setProperty("NOT", "Shouldn't be here");
463         if (!(guiItem instanceof UnsharedComponent))
464         {
465             assertEquals(
466                 "SHARED: Failed on " + name,
467                 "",
468                 el2.getPropertyAsString("NOT"));
469         }
470         log.debug("Saving element: " + el.getClass());
471         el =
472             SaveService.createTestElement(
473                 SaveService.getConfigForTestElement(null, el));
474         log.debug("Successfully saved");
475         guiItem.configure(el);
476         assertEquals(
477             "CONFIGURE-TEST: Failed on " + name,
478             el.getPropertyAsString(TestElement.NAME),
479             guiItem.getName());
480         guiItem.modifyTestElement(el2);
481         assertEquals(
482             "Modify Test: Failed on " + name,
483             "hey, new name!:",
484             el2.getPropertyAsString(TestElement.NAME));
485     }
486
487
488     /*
489      * Test serializable elements - create the suite of tests
490      */

491     private static Test suiteSerializableElements() throws Exception JavaDoc
492     {
493         TestSuite suite = new TestSuite("SerializableElements");
494         Iterator JavaDoc iter = getObjects(Serializable JavaDoc.class).iterator();
495         while (iter.hasNext())
496         {
497             Serializable JavaDoc serObj = (Serializable JavaDoc) iter.next();
498             if (serObj.getClass().getName().endsWith("_Stub"))
499             {
500                 continue;
501             }
502             TestSuite ts = new TestSuite(serObj.getClass().getName());
503             ts.addTest(new JMeterTest("runSerialTest",serObj));
504             suite.addTest(ts);
505         }
506         return suite;
507     }
508
509     /*
510      * Test serializable elements - test the object
511      */

512     public void runSerialTest() throws Exception JavaDoc
513     {
514         try
515         {
516             ByteArrayOutputStream JavaDoc bytes = new ByteArrayOutputStream JavaDoc();
517             ObjectOutputStream JavaDoc out = new ObjectOutputStream JavaDoc(bytes);
518             out.writeObject(serObj);
519             out.close();
520             ObjectInputStream JavaDoc in =
521                 new ObjectInputStream JavaDoc(
522                     new ByteArrayInputStream JavaDoc(bytes.toByteArray()));
523             Object JavaDoc readObject = in.readObject();
524             in.close();
525             assertEquals(
526                 "deserializing class: " + serObj.getClass().getName(),
527                 serObj.getClass(),
528                 readObject.getClass());
529         }
530         catch (Throwable JavaDoc e)
531         {
532             fail("serialization of "+serObj.getClass().getName()+" failed: "+e);
533         }
534     }
535
536     /*
537      * Test TestElements - create the suite
538      */

539     private static Test suiteTestElements() throws Exception JavaDoc
540     {
541         TestSuite suite = new TestSuite("TestElements");
542         Iterator JavaDoc iter = getObjects(TestElement.class).iterator();
543         while (iter.hasNext())
544         {
545             TestElement item = (TestElement) iter.next();
546             TestSuite ts = new TestSuite(item.getClass().getName());
547             ts.addTest(new JMeterTest("runTestElement",item));
548             suite.addTest(ts);
549         }
550         return suite;
551     }
552     
553     /*
554      * Test TestElements - implement the test case
555      */

556     public void runTestElement() throws Exception JavaDoc
557     {
558         checkElementCloning(testItem);
559         assertTrue(
560             testItem.getClass().getName() + " must implement Serializable",
561             testItem instanceof Serializable JavaDoc);
562     }
563
564     private static Collection JavaDoc getObjects(Class JavaDoc extendsClass) throws Exception JavaDoc
565     {
566         String JavaDoc exName = extendsClass.getName();
567         Object JavaDoc myThis = "";
568         Iterator JavaDoc classes =
569             ClassFinder
570                 .findClassesThatExtend(
571                     JMeterUtils.getSearchPaths(),
572                     new Class JavaDoc[] { extendsClass })
573                 .iterator();
574         List JavaDoc objects = new LinkedList JavaDoc();
575         String JavaDoc n="";
576         boolean caughtError=true;
577         Throwable JavaDoc caught=null;
578     try {
579         while (classes.hasNext())
580         {
581             n = (String JavaDoc) classes.next();
582             //TODO - improve this check
583
if (n.endsWith("RemoteJMeterEngineImpl"))
584             {
585                 continue; // Don't try to instantiate remote server
586
}
587             Class JavaDoc c = null;
588             try
589             {
590                 c = Class.forName(n);
591                 try
592                 {
593                     // Try with a parameter-less constructor first
594
objects.add(c.newInstance());
595                 }
596                 catch (InstantiationException JavaDoc e)
597                 {
598                     caught=e;
599                     //System.out.println(e.toString());
600
try
601                     {
602                         // Events often have this constructor
603
objects.add(
604                             c.getConstructor(
605                                 new Class JavaDoc[] { Object JavaDoc.class }).newInstance(
606                                 new Object JavaDoc[] { myThis }));
607                     }
608                     catch (NoSuchMethodException JavaDoc f)
609                     {
610                         // no luck. Ignore this class
611
System.out.println("WARN: "+exName+": NoSuchMethodException "+n);
612                     }
613                 }
614             }
615             catch (NoClassDefFoundError JavaDoc e)
616             {
617                 // no luck. Ignore this class
618
System.out.println("WARN: "+exName+": NoClassDefFoundError "+n);
619             }
620             catch (IllegalAccessException JavaDoc e)
621             {
622                 caught=e;
623                 System.out.println("WARN: "+exName+": IllegalAccessException "+n);
624                 // We won't test restricted-access classes.
625
}
626             //JDK1.4: catch (java.awt.HeadlessException e)
627
//JDK1.4: {
628
//JDK1.4: System.out.println("Error creating "+n+" "+e.toString());
629
//JDK1.4: }
630
catch (Exception JavaDoc e)
631             {
632                 caught=e;
633                 if ((e instanceof RemoteException JavaDoc)
634                    ||e.getClass().getName().equals("java.awt.HeadlessException")//for JDK1.3
635
)
636                 {
637                     System.out.println("WARN: "+"Error creating "+n+" "+e.toString());
638                 }
639                 else
640                 {
641                     throw new Exception JavaDoc("Error creating "+n+" "+e.toString());
642                 }
643             }
644         }
645         caughtError=false;
646     }
647     finally
648     {
649         if (caughtError)
650         {
651             System.out.println("Last class="+n);
652             System.out.println("objects.size="+objects.size());
653             System.out.println("Last error="+caught);
654         }
655     }
656     
657         if (objects.size() == 0){
658             System.out.println("No classes found that extend "+exName+". Check the following:");
659             System.out.println("Search paths are:");
660             String JavaDoc ss[] = JMeterUtils.getSearchPaths();
661             for (int i=0;i<ss.length;i++){
662                 System.out.println(ss[i]);
663             }
664             if (!classPathShown){// Only dump it once
665
System.out.println("Class path is:");
666                 String JavaDoc cp=System.getProperty("java.class.path");
667                 String JavaDoc cpe[]= JOrphanUtils.split(cp,java.io.File.pathSeparator);
668                 for (int i=0;i<cpe.length;i++)
669                 {
670                     System.out.println(cpe[i]);
671                 }
672                 classPathShown=true;
673             }
674         }
675         return objects;
676     }
677
678     private static void cloneTesting(TestElement item, TestElement clonedItem)
679     {
680         assertTrue(item != clonedItem);
681         assertEquals(
682             "CLONE-SAME-CLASS: testing " + item.getClass().getName(),
683             item.getClass().getName(),
684             clonedItem.getClass().getName());
685     }
686
687     private static void checkElementCloning(TestElement item)
688     {
689         TestElement clonedItem = (TestElement) item.clone();
690         cloneTesting(item, clonedItem);
691         PropertyIterator iter2 = item.propertyIterator();
692         while (iter2.hasNext())
693         {
694             JMeterProperty item2 = iter2.next();
695             //[sebb] assertEquals(item2, clonedItem.getProperty(item2.getName()));
696
assertEquals(item2.getStringValue(), clonedItem.getProperty(item2.getName()).getStringValue());
697             assertTrue(item2 != clonedItem.getProperty(item2.getName()));
698         }
699     }
700 }
701
Popular Tags