No, this is not (yet) possible.
Problem is that the answers the sampler receives are not transformed into a
proper response.
Internally the system works more or less, but there is nowhre some sort of
answer transported back to the Jmeter System.

I did some changes on my extended sampler, which now reports some errors but
i'm more interested to define some sort of answer in xml/html format so the
response assertions will work on this.
I haven't head the time yet to find out how the response should be defined
to work with assertions etc

At the moment the sampleResult is used as below.
----
<sampleResult timeStamp="1061232136496" dataType="text" threadName="Thread
Group1-1" label="ldap://localhost:389/o=algemene\
rekenkamer,o=rijksoverheid,c=nl:bind:Thread Group1-1;1061232136496" time="0"
responseMessage="" responseCode="" success="false"><property
xml:space="preserve"
name="samplerData"/><binary>javax.naming.NamingException: Cannot parse url:
rekenkamer,o=rijksoverheid,c=nl [Root exception is
java.net.MalformedURLException: Invalid URI:
rekenkamer,o=rijksoverheid,c=nl]</binary></sampleResult>
---

I used the binary field to store the message that is returned, but don't
know how to properly place the information in the sampleresult.
Some help and tips are appreciated!

Thanks, Dolf

----- Original Message -----
From: "BAZLEY, Sebastian" <[EMAIL PROTECTED]>
To: "'JMeter Developers List'" <[EMAIL PROTECTED]>
Sent: Monday, November 10, 2003 19:53
Subject: RE: PATCH LdapClient.java


> I've not tried using the LDAP Sampler, so this may not apply, but could
you
> not use a response assertion to check for the required condition?
>
> S.
> -----Original Message-----
> From: Mcgladrey, Kayne [mailto:[EMAIL PROTECTED]
> Sent: 10 November 2003 16:38
> To: JMeter Developers List
> Subject: RE: PATCH LdapClient.java
>
>
> As an alternate implementation, it could be a user-configurable test. Add
a
> checkbox to the search form and the end user could decide if they want to
> test for the correct result (or at least any result) or just the correct
> response code. We have a clear need to verify that a Directory server is
> returing results consistently under heavy load. There's a problem if no
> results are being returned for a valid search that refers to a valid
record.
>
>
> Kayne McGladrey
> Member - Technical Group
> AT&T Wireless
>
>
> -----Original Message-----
> From: Dolf Smits [mailto:[EMAIL PROTECTED]
> Sent: Sun 11/9/2003 5:13 AM
> To: JMeter Developers List
> Cc:
> Subject: Re: PATCH LdapClient.java
> Hi,
>
> I don't think this is a good idea.
> If you want to make a diffrence between "search succesfull, some results
> found" and "search successfull, no results found" you schould not declare
> the last result as being unsuccessfull.
>
> If you want to stress test an ldap server, the difference between success
> and failure are not whteher there are any results, but whether the LDAP
> server is responding properly.
>
> If you want to make a difference, I think we can better start to define
some
> sort of XML template for an ldap answer, and implement a way to translate
an
> ldap answer into this template and show this template as being the ldap
> result.
> You can then use all kind of asertions to see or the answer is conform
your
> own wishes.
>
> Just a short idea about fields ( I don't know whether all these files can
be
> read by the JAVA LDAP tools, but I think that these fields should be
present
> in such a template.
>
> ---
> Start Time     :Tue Oct 28 14:28:24 2003
>   Duration       :0.020 sec
>   User           :cn=admin,o=Fasr
>   IP             :127.0.0.1
>   Op-Name        :LDAP_Con1953_Op21
>   ConnID         :1953
>   Operation      :SEARCH
>   Version        :3
>   MessageID      :4302
>   Base Obj       :ou=ctscApplicationDataRepository, o=Fasr
>   Scope          :onelevel
>   Filter
> :(&(objectclass=ctscPropertyDefinition)(ctscObjectClass=User))
>   Size Limit     :0
>   Time Limit     :0
>   Deref Alias    :never
>   Types Only     :no
>   Req Attr #     :all
>   Found Entries  :0
>   Found Attrs    :0
>   Controls #     :0
>   Bytes Received :136
>   Bytes Returned :41
>   Abandoned      :no
>   Result Code    :0 (success)
> ----------------
>
> Greets, Dolf
>
>
> ----- Original Message -----
> From: "Mcgladrey, Kayne" <[EMAIL PROTECTED]>
> To: "jMeter Developers List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 06, 2003 23:57
> Subject: PATCH LdapClient.java
>
>
> Hello,
>
> This patch addresses the current behavior of the LDAP Search operation.
> Under the current version, LDAP Searches that are successful but do not
> return results are marked as successful. The LDAP RFC states that result
> code 0 will be returned if no results were returned.
>
> However, this makes the results from jMeter misleading. Consider this
> example:
>  - Thread Group
>   - LDAP Sampler: add
>    - Server: Master Directory Server, incorrect user name, valid DN
>   - LDAP Sampler: search
>    - Server: Replicate Directory Server, same DN as in "Add"
>
> (Assume a working one-way replication agreement between the Master and the
> Replicate)
>
> Under these circumstances, the "Add" operation against the Master
Directory
> Server will fail with error 32, 34, or 50 (depending on the server
> implementation). However, the search for the new record against the
> Replicate Directory Server will appear (to the end user) to be successful.
> In fact, it will have returned no results.
>
> The patched version addresses this behavior. If no results are returned,
> jMeter will mark the search as failed.
>
> Thank you,
>
>
> Kayne McGladrey
> Member - Technical Group
> AT&T Wireless
>
>
>
> --- LdapClient.java.backup      2003-11-05 16:31:38.000000000 -0800
> +++ LdapClient.java     2003-11-06 14:24:00.000000000 -0800
> @@ -65,6 +65,8 @@
>  import javax.naming.directory.ModificationItem;
>  import javax.naming.directory.SearchControls;
>
> +import javax.naming.NamingEnumeration;
> +
>  import org.apache.jorphan.logging.LoggingManager;
>  import org.apache.log.Logger;
>
> @@ -136,7 +138,11 @@
>      {
>          SearchControls searchcontrols =
>              new SearchControls(2, 1L, 0, null, false, false);
> -        dirContext.search(searchBase, searchFilter, searchcontrols);
> +        //dirContext.search(searchBase, searchFilter, searchcontrols);
> +               NamingEnumeration result = dirContext.search(searchBase,
> searchFilter, searchcontrols);
> +        if (! result.hasMore()) {
> +                       throw new NamingException(" [LDAP: error code 0 -
No
> Results Returned];");
> +        }
>      }
>
>      /**
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to