[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-dev
Subject:    =?utf-8?q?=5BJakarta-jmeter_Wiki=5D_Trivial_Update_of_=22DeveloperManual/?=
From:       Apache Wiki <wikidiffs () apache ! org>
Date:       2011-02-24 15:28:49
Message-ID: 20110224152849.93950.55955 () eosnew ! apache ! org
[Download RAW message or body]

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" for \
change notification.

The "DeveloperManual/TestBeanTutorial" page has been changed by PatrickDaulton.
The comment on this change is: Formatting change to fix code blocks and list of \
resource Strings in step 7.. \
http://wiki.apache.org/jakarta-jmeter/DeveloperManual/TestBeanTutorial?action=diff&rev1=6&rev2=7


--------------------------------------------------

    a. I then implemented the IterationStart method of the LoopIterationListener \
interface.  The point of this "event" is that your component is notified of when the \
test has entered it's parent controller.  For our purposes, every time the \
CSVDataSet's parent controller is entered, we will read a new line of the data file \
and set the variables.  Thus, for a regular controller, each loop through the test \
will result in a new set of values being read. For a loop controller, each iteration \
will do likewise.  Every test thread will get different values as well.  1. Setting \
                up your gui elements in CSVDataSetBeanInfo:
    * You can create groupings for your component's properties.  Each grouping you \
create needs a label and a list of property names to include in that grouping.  Ie: + \
                {{{
-  {{{createPropertyGroup("csv_data",new String[]{"filename","variableNames"}); 
+ createPropertyGroup("csv_data",new String[]{"filename","variableNames"}); 
  }}}
    * Creates a grouping called "csv_data" that will include gui input elements for \
the "filename" and "variableNames" properties of CSVDataSet.  Then, we need to define \
what kind of properties we want these to be: +  {{{
-  {{{p = property("filename");
+ p = property("filename");
  p.setValue(NOT_UNDEFINED, Boolean.TRUE);
  p.setValue(DEFAULT, "");
  p.setValue(NOT_EXPRESSION,Boolean.TRUE);
@@ -48, +50 @@

  || MULTILINE || If true, then the component for the property will be allowed to \
grow with the screen space in the window - ideal for TestArea editors, scroll panels, \
and other more complicated gui elements ||  
  Additionally, a custom property editor can be specified for a property:
+  {{{
-  {{{p.setPropertyEditorClass(FileEditor.class);
+ p.setPropertyEditorClass(FileEditor.class);
  }}}       
         
  This will create a text input plus browse button that opens a dialog for finding a \
file.  Usually, complex property settings are not needed, as now.  For a more complex \
example, look at org.apache.jmeter.protocol.http.sampler.AccessLogSamplerBeanInfo  
   1.#7 Defining your resource strings.  In '''CSVDataSetResources.properties''' we \
have to define all our string resources.  To provide translations, one would create \
additional files such as CSVDataSetResources_ja.properties, and \
CSVDataSetResources_de.properties.  For our component, we must define the following \
                resources:
-  {{{'''displayName''' - This will provide a name for the element that will appear \
in menus. +   * '''displayName''' - This will provide a name for the element that \
                will appear in menus.
- '''csv_data.displayName''' - we create a property grouping called "csv_data", so we \
have to provide a label for the grouping +   * '''csv_data.displayName''' - we create \
                a property grouping called "csv_data", so we have to provide a label \
                for the grouping
- '''filename.displayName''' - a label for the filename input element.
+   * '''filename.displayName''' - a label for the filename input element.
- '''filename.shortDescription''' - a tool-tip-like help text blurb.
+   * '''filename.shortDescription''' - a tool-tip-like help text blurb.
- '''variableNames.displayName''' - a label for the variable name input element.
+   * '''variableNames.displayName''' - a label for the variable name input element.
- '''variableNames.shortDescription''' - tool tip for the variableNames input \
element. +   * '''variableNames.shortDescription''' - tool tip for the variableNames \
                input element.
- }}}
  	    
   1.#8 Debug your component.
  

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic