You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Norbet Reilly <nr...@gmail.com> on 2006/08/28 08:40:09 UTC
Improvements related to LDAP Sampler
Hi,
I have made the following improvements to the JMeter LDAP support
which I wanted to share with the list:
1. Changed LDAP sampler to:
a. sort search results (by DN), attributes for each result (by
id) and values (by toString()) for searches returning less the a
configured constant (1000) entries. Having a stable ordering allows a
new class of response assertion detailed below.
b. fix bugzilla 40103 (extra "</operation>").
c. use StringBuffer instead of '+' for search results where
there may be big numbers of results to be marshalled to XML.
d. Added extra <searchresults> tag and nested <dn> ...
<attribute> stuff inside the <searchresult> tag. This was because the
existing structure is not very XSD/JAXB etc friendly, and there seems
no good reason why it shouldn't be.
2. Changed ResponseAssertion.java to:
a. support a new "Pattern Matching Rule" called "Equals" which
does a direct string comparison between the response and the first
"Patterns To Test" string which has been entered. This is not directly
tied to the LDAP sampler but requires a sampler to output fields in a
stable order to be used effectively. It is better for simple
comparing against a full response then "Matches" because there is no
need to consider quoting of special regex chars.
b. log.info() information about failed assertions so that the
reason for failures is clear immediately from the log, including the
assertion's name. In the case of the new "Equals" assertions, a small
diff showing markers for initial matching sequence (if any) and final
matching sequence (if any) is also logged, so that the non-matching
text is aligned in the middle for easy identification.
These changes greatly improve the ease with which you can script an
LDAP interaction and then use the results seen in the View Results
Tree to turn the interaction into a unit test asserting correct
behaviour (after suitable manual review of course). This was
particularly attractive to me as two serious problems were observed
with the GUI as it stands:
1. The attribute table presented "LDAP Extended Request (ALPHA)"
"Add tests" requires that you hit return on every text field entered
(rather then tabbing/clicking off it) or the modified value is not
saved even though it appears to be. This was problematic as I was
cutting and pasting a number of existing LDIF files into these
windows, and the problem only became apparent when I went to run my
test and found bogus data in virtually all of the fields I'd entered.
2. The "Patterns to Test" table on the Response Assertion" screen
doesn't deal well with long single line patterns, in that the whole
line becomes obscured by a scrollbar rendering ineditable (except by
tricks like trying to scoll to the end of the line adding a number of
un-needed blank lines/clicking off/clicking back so that the added
blank lines coincide with the scrollbar when it is rendered).
I have a patch I can submit if the project is interested, and can
enter the issues above into bugzilla if given the go-ahead. As this is
my first posting to the JMeter dev list I just wanted to check exactly
what the appropriate protocol is.
My patch is against a downloaded 2.2 source, which I notice doesn't
include any .svn directories; is this by design or accident as it
means a somewhat painful (and quite possibly error-prone) manual
merging of changes over a freshly checked out SVN dir if someone works
on a patch before realising that no SVN dirs are present.
Thanks for your guidance/feedback...
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: Improvements related to LDAP Sampler
Posted by sebb <se...@gmail.com>.
On 31/08/06, Norbet Reilly <nr...@gmail.com> wrote:
> > > Any thoughts on any of the other points raised in this thread:
> > > 1. shouldn't .svn/ dirs be included in the download of JMeter src
> > > bundle, to ease enhancements and avoid the problem I had where I
> > > changed the source before realising no SVN was present (at which stage
> > > it is not easy to work out what you changed)?
> >
> > Adding .svn directories to the source archive would be a nuisance for
> > most people, and could double the size of the archive. If you want
> > these, it's best to download directly from SVN.
> >
>
> Fair enough, my bad due to not being familiar with the protocol. My
> expectation was that I would be able to enhance the downloaded source
> and then commit, and as I didn't notice there were no .svn dirs I
> ended up having to manually move my changes over to a working dir that
> I later checked out from SVN.
>
> I'll remember to start with a check-out from SVN when/if making
> enhancements in the future.
>
Not sure that is necessary - patches can just be created as diffs
against the original source. The SVN directories are not needed for
this.
> > I don't understand why having the .svn directories in the source
> > archive would make it any easier to submit enhancements.
> >
> > > 2. I presume I should open new bugzilla issues for the two LDAP
> > > GUI problems I noted earlier.
> >
> > Please.
> >
>
> Opened
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=40369
> http://issues.apache.org/bugzilla/show_bug.cgi?id=40370
> http://issues.apache.org/bugzilla/show_bug.cgi?id=40371
Thanks
> wasn't sure about exact severity/priority of last two (ie whether
> relative to LDAP component or whole system etc etc), please adjust as
> appropriate.
OK
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: Improvements related to LDAP Sampler
Posted by Norbet Reilly <nr...@gmail.com>.
> > Any thoughts on any of the other points raised in this thread:
> > 1. shouldn't .svn/ dirs be included in the download of JMeter src
> > bundle, to ease enhancements and avoid the problem I had where I
> > changed the source before realising no SVN was present (at which stage
> > it is not easy to work out what you changed)?
>
> Adding .svn directories to the source archive would be a nuisance for
> most people, and could double the size of the archive. If you want
> these, it's best to download directly from SVN.
>
Fair enough, my bad due to not being familiar with the protocol. My
expectation was that I would be able to enhance the downloaded source
and then commit, and as I didn't notice there were no .svn dirs I
ended up having to manually move my changes over to a working dir that
I later checked out from SVN.
I'll remember to start with a check-out from SVN when/if making
enhancements in the future.
> I don't understand why having the .svn directories in the source
> archive would make it any easier to submit enhancements.
>
> > 2. I presume I should open new bugzilla issues for the two LDAP
> > GUI problems I noted earlier.
>
> Please.
>
Opened
http://issues.apache.org/bugzilla/show_bug.cgi?id=40369
http://issues.apache.org/bugzilla/show_bug.cgi?id=40370
http://issues.apache.org/bugzilla/show_bug.cgi?id=40371
wasn't sure about exact severity/priority of last two (ie whether
relative to LDAP component or whole system etc etc), please adjust as
appropriate.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: Improvements related to LDAP Sampler
Posted by sebb <se...@gmail.com>.
On 30/08/06, Norbet Reilly <nr...@gmail.com> wrote:
> Apologies, first time I've contributed to JMeter so wasn't completely
> clear on the protocol for such an enhancement. Dolf kindly offered
OK.
> some guidance too, but I wasn't too keen on associating this
> enhancement patch with 40103 which was a minor text output fix
> (contained in the patch too, but a minor part of it).
>
> Do you want me to open a new Bugzilla for the patch now?
Please.
> Any thoughts on any of the other points raised in this thread:
> 1. shouldn't .svn/ dirs be included in the download of JMeter src
> bundle, to ease enhancements and avoid the problem I had where I
> changed the source before realising no SVN was present (at which stage
> it is not easy to work out what you changed)?
Adding .svn directories to the source archive would be a nuisance for
most people, and could double the size of the archive. If you want
these, it's best to download directly from SVN.
I don't understand why having the .svn directories in the source
archive would make it any easier to submit enhancements.
> 2. I presume I should open new bugzilla issues for the two LDAP
> GUI problems I noted earlier.
Please.
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: Improvements related to LDAP Sampler
Posted by Norbet Reilly <nr...@gmail.com>.
Apologies, first time I've contributed to JMeter so wasn't completely
clear on the protocol for such an enhancement. Dolf kindly offered
some guidance too, but I wasn't too keen on associating this
enhancement patch with 40103 which was a minor text output fix
(contained in the patch too, but a minor part of it).
Do you want me to open a new Bugzilla for the patch now?
Any thoughts on any of the other points raised in this thread:
1. shouldn't .svn/ dirs be included in the download of JMeter src
bundle, to ease enhancements and avoid the problem I had where I
changed the source before realising no SVN was present (at which stage
it is not easy to work out what you changed)?
2. I presume I should open new bugzilla issues for the two LDAP
GUI problems I noted earlier.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: Improvements related to LDAP Sampler
Posted by sebb <se...@gmail.com>.
Thanks for the patches.
However, in future, please don't send patches to the mailing list.
Much better to attach them to a Bugzilla issue.
You can always send a message to the mailing list with a pointer to the issue.
It's a lot easier to keep track of patches via Bugzilla.
S.
On 30/08/06, Norbet Reilly <nr...@gmail.com> wrote:
> Missed one file (note my earlier complaint dangers of manual copying
> due to the the JMeter src .zip not including the .svn directories), so
> attached newer patch
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: Improvements related to LDAP Sampler
Posted by Norbet Reilly <nr...@gmail.com>.
Missed one file (note my earlier complaint dangers of manual copying
due to the the JMeter src .zip not including the .svn directories), so
attached newer patch
Re: Improvements related to LDAP Sampler
Posted by Norbet Reilly <nr...@gmail.com>.
On 8/29/06, Smits, Dolf <do...@siemens.com> wrote:
> Hi,
>
> I think these changes sound good.
> Probably the best way to make the sort configurable, is to make an extra
> item in the interface.
Problem is that I don't think it is a search-by-search setting as much
as global one. For the time being I looked for how other system-wide
defaults were handled and did the same (refer
LDAPExtSampler.MAX_SORTED_RESULTS).
>
> I don't know which branch is the real actual state of work, niether
> wheter it is possible to merge two patches, or that this is a major
> work.
>
> Hopefully one of the commiters might comment on the best way to sent the
> patches, and to which branch they should be created.
>
Have attached a patch against top-level of
http://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-2 ...
RE: Improvements related to LDAP Sampler
Posted by "Smits, Dolf" <do...@siemens.com>.
Hi,
I think these changes sound good.
Probably the best way to make the sort configurable, is to make an extra
item in the interface.
I don't know which branch is the real actual state of work, niether
wheter it is possible to merge two patches, or that this is a major
work.
Hopefully one of the commiters might comment on the best way to sent the
patches, and to which branch they should be created.
Dolf
Dolf Smits
Senior Consultant Identity Management Solutions
070 333 3654
070 333 2511
06 55844837
Dolf.Smits@siemens.com
Let op: Vrijdags heb ik ouderschapsverlof en wordt uw mail niet gelezen.
Deze e-mail is uitsluitend bedoeld voor kennisneming door de
geadresseerde(n), en mag niet aan anderen worden doorgestuurd of op
andere wijze ter kennis worden gebracht. Indien u niet de geadresseerde
bent, verzoek ik u om de afzender te waarschuwen en de e-mail direct te
verwijderen/vernietigen. De afzender wijst elke aansprakelijkheid voor
(de inhoud van) deze e-mail af.
-----Original Message-----
From: Norbet Reilly [mailto:nrhope@gmail.com]
Sent: dinsdag 29 augustus 2006 2:08
To: JMeter Developers List
Subject: Re: Improvements related to LDAP Sampler
On 8/28/06, Smits, Dolf <do...@siemens.com> wrote:
> Hi,
>
> Thansk for helping improving the LDAP sampler!
No problem, always like to contribute where I can...
>
> I also made some improvements, just a few days ago, so these
> improvements might be merged.
> (I also fixed b.)
> I think that improvement c is alright anyway.
> About D,
>
> Do I understand right that you have now several searchresults, each
> consisting of a dn and the attributes?
> I don't think this change is a problem, maybe some older testplans
need
> to be changed a bit, but that can be overcome.
>
Correct, here is an example XML snippet:
<ldapanswer><operation><opertype>search</opertype><searchfilter>(objectC
lass=*)
</searchfilter><searchbase>...</searchbase><scope>0</scope><countlimit>0
</countlimit><timelimit>0</timelimit></operation><searchresults><searchr
esult><dn>...</dn><returnedattr>6</returnedattr><attribute><attributenam
e>...</attributename><attributevalue>acc1</attributevalue></attribute><a
ttribute></searchresult></searchresults><responsecode>0</responsecode><r
esponsemessage>Success</responsemessage></ldapanswer>
This allows a tightly defined sequence to be defined for a
<searchresult> rather then treating the result as an arbitrary group
of <dn>, <returnedattr>, <attribute> eleements.
> About a. Are you sorting the result within the sampler, Or are you
> requesting the server to give a sorted result?
> In the last case, I think it should be configurable because it might
not
> be what you want.
> If you're sorting this within the sampler, I think it should also be
> configurable ( I intoduced a parser flag to stop parsing the search
> results, this to save CPU cycles on the test machine. I think
something
> like that should be made for the sorting as well.)
>
Sorting in the sampler. It currently works up to a specified
threshold, and after that gives up and passes the remainder of the
search results through directly. I can easily make the threshold limit
configurable via jmeter.properties (I presume that's the right place?)
and use a threshold of 0 to mean no sorting at all. My reasoning was
that no-one will want to do a direct Equals assertion against a huge
set of search results anyway.
> I think the best solution would be to upload the patch as attachement
to
> the bug-40103, so that one of the official commiters can use the
patches
> and merge them into the main branch.
>
The patch is against version 2.2 so I should provide it against
branches/rel-2.2, right?
> Thanks a lot for your contribution,
>
> Dolf Smits
>
>
> Dolf Smits
> Senior Consultant Identity Management Solutions
>
> 070 333 3654
> 070 333 2511
> 06 55844837
> Dolf.Smits@siemens.com
> Let op: Vrijdags heb ik ouderschapsverlof en wordt uw mail niet
gelezen.
> Deze e-mail is uitsluitend bedoeld voor kennisneming door de
> geadresseerde(n), en mag niet aan anderen worden doorgestuurd of op
> andere wijze ter kennis worden gebracht. Indien u niet de
geadresseerde
> bent, verzoek ik u om de afzender te waarschuwen en de e-mail direct
te
> verwijderen/vernietigen. De afzender wijst elke aansprakelijkheid voor
> (de inhoud van) deze e-mail af.
>
>
>
>
> -----Original Message-----
> From: Norbet Reilly [mailto:nrhope@gmail.com]
> Sent: maandag 28 augustus 2006 8:40
> To: jmeter-dev@jakarta.apache.org
> Subject: Improvements related to LDAP Sampler
>
> Hi,
>
> I have made the following improvements to the JMeter LDAP support
> which I wanted to share with the list:
> 1. Changed LDAP sampler to:
> a. sort search results (by DN), attributes for each result (by
> id) and values (by toString()) for searches returning less the a
> configured constant (1000) entries. Having a stable ordering allows a
> new class of response assertion detailed below.
> b. fix bugzilla 40103 (extra "</operation>").
> c. use StringBuffer instead of '+' for search results where
> there may be big numbers of results to be marshalled to XML.
> d. Added extra <searchresults> tag and nested <dn> ...
> <attribute> stuff inside the <searchresult> tag. This was because the
> existing structure is not very XSD/JAXB etc friendly, and there seems
> no good reason why it shouldn't be.
> 2. Changed ResponseAssertion.java to:
> a. support a new "Pattern Matching Rule" called "Equals" which
> does a direct string comparison between the response and the first
> "Patterns To Test" string which has been entered. This is not directly
> tied to the LDAP sampler but requires a sampler to output fields in a
> stable order to be used effectively. It is better for simple
> comparing against a full response then "Matches" because there is no
> need to consider quoting of special regex chars.
> b. log.info() information about failed assertions so that the
> reason for failures is clear immediately from the log, including the
> assertion's name. In the case of the new "Equals" assertions, a small
> diff showing markers for initial matching sequence (if any) and final
> matching sequence (if any) is also logged, so that the non-matching
> text is aligned in the middle for easy identification.
>
> These changes greatly improve the ease with which you can script an
> LDAP interaction and then use the results seen in the View Results
> Tree to turn the interaction into a unit test asserting correct
> behaviour (after suitable manual review of course). This was
> particularly attractive to me as two serious problems were observed
> with the GUI as it stands:
> 1. The attribute table presented "LDAP Extended Request (ALPHA)"
> "Add tests" requires that you hit return on every text field entered
> (rather then tabbing/clicking off it) or the modified value is not
> saved even though it appears to be. This was problematic as I was
> cutting and pasting a number of existing LDIF files into these
> windows, and the problem only became apparent when I went to run my
> test and found bogus data in virtually all of the fields I'd entered.
> 2. The "Patterns to Test" table on the Response Assertion" screen
> doesn't deal well with long single line patterns, in that the whole
> line becomes obscured by a scrollbar rendering ineditable (except by
> tricks like trying to scoll to the end of the line adding a number of
> un-needed blank lines/clicking off/clicking back so that the added
> blank lines coincide with the scrollbar when it is rendered).
>
> I have a patch I can submit if the project is interested, and can
> enter the issues above into bugzilla if given the go-ahead. As this is
> my first posting to the JMeter dev list I just wanted to check exactly
> what the appropriate protocol is.
>
> My patch is against a downloaded 2.2 source, which I notice doesn't
> include any .svn directories; is this by design or accident as it
> means a somewhat painful (and quite possibly error-prone) manual
> merging of changes over a freshly checked out SVN dir if someone works
> on a patch before realising that no SVN dirs are present.
>
> Thanks for your guidance/feedback...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
Re: Improvements related to LDAP Sampler
Posted by Norbet Reilly <nr...@gmail.com>.
On 8/28/06, Smits, Dolf <do...@siemens.com> wrote:
> Hi,
>
> Thansk for helping improving the LDAP sampler!
No problem, always like to contribute where I can...
>
> I also made some improvements, just a few days ago, so these
> improvements might be merged.
> (I also fixed b.)
> I think that improvement c is alright anyway.
> About D,
>
> Do I understand right that you have now several searchresults, each
> consisting of a dn and the attributes?
> I don't think this change is a problem, maybe some older testplans need
> to be changed a bit, but that can be overcome.
>
Correct, here is an example XML snippet:
<ldapanswer><operation><opertype>search</opertype><searchfilter>(objectClass=*)
</searchfilter><searchbase>...</searchbase><scope>0</scope><countlimit>0</countlimit><timelimit>0</timelimit></operation><searchresults><searchresult><dn>...</dn><returnedattr>6</returnedattr><attribute><attributename>...</attributename><attributevalue>acc1</attributevalue></attribute><attribute></searchresult></searchresults><responsecode>0</responsecode><responsemessage>Success</responsemessage></ldapanswer>
This allows a tightly defined sequence to be defined for a
<searchresult> rather then treating the result as an arbitrary group
of <dn>, <returnedattr>, <attribute> eleements.
> About a. Are you sorting the result within the sampler, Or are you
> requesting the server to give a sorted result?
> In the last case, I think it should be configurable because it might not
> be what you want.
> If you're sorting this within the sampler, I think it should also be
> configurable ( I intoduced a parser flag to stop parsing the search
> results, this to save CPU cycles on the test machine. I think something
> like that should be made for the sorting as well.)
>
Sorting in the sampler. It currently works up to a specified
threshold, and after that gives up and passes the remainder of the
search results through directly. I can easily make the threshold limit
configurable via jmeter.properties (I presume that's the right place?)
and use a threshold of 0 to mean no sorting at all. My reasoning was
that no-one will want to do a direct Equals assertion against a huge
set of search results anyway.
> I think the best solution would be to upload the patch as attachement to
> the bug-40103, so that one of the official commiters can use the patches
> and merge them into the main branch.
>
The patch is against version 2.2 so I should provide it against
branches/rel-2.2, right?
> Thanks a lot for your contribution,
>
> Dolf Smits
>
>
> Dolf Smits
> Senior Consultant Identity Management Solutions
>
> 070 333 3654
> 070 333 2511
> 06 55844837
> Dolf.Smits@siemens.com
> Let op: Vrijdags heb ik ouderschapsverlof en wordt uw mail niet gelezen.
> Deze e-mail is uitsluitend bedoeld voor kennisneming door de
> geadresseerde(n), en mag niet aan anderen worden doorgestuurd of op
> andere wijze ter kennis worden gebracht. Indien u niet de geadresseerde
> bent, verzoek ik u om de afzender te waarschuwen en de e-mail direct te
> verwijderen/vernietigen. De afzender wijst elke aansprakelijkheid voor
> (de inhoud van) deze e-mail af.
>
>
>
>
> -----Original Message-----
> From: Norbet Reilly [mailto:nrhope@gmail.com]
> Sent: maandag 28 augustus 2006 8:40
> To: jmeter-dev@jakarta.apache.org
> Subject: Improvements related to LDAP Sampler
>
> Hi,
>
> I have made the following improvements to the JMeter LDAP support
> which I wanted to share with the list:
> 1. Changed LDAP sampler to:
> a. sort search results (by DN), attributes for each result (by
> id) and values (by toString()) for searches returning less the a
> configured constant (1000) entries. Having a stable ordering allows a
> new class of response assertion detailed below.
> b. fix bugzilla 40103 (extra "</operation>").
> c. use StringBuffer instead of '+' for search results where
> there may be big numbers of results to be marshalled to XML.
> d. Added extra <searchresults> tag and nested <dn> ...
> <attribute> stuff inside the <searchresult> tag. This was because the
> existing structure is not very XSD/JAXB etc friendly, and there seems
> no good reason why it shouldn't be.
> 2. Changed ResponseAssertion.java to:
> a. support a new "Pattern Matching Rule" called "Equals" which
> does a direct string comparison between the response and the first
> "Patterns To Test" string which has been entered. This is not directly
> tied to the LDAP sampler but requires a sampler to output fields in a
> stable order to be used effectively. It is better for simple
> comparing against a full response then "Matches" because there is no
> need to consider quoting of special regex chars.
> b. log.info() information about failed assertions so that the
> reason for failures is clear immediately from the log, including the
> assertion's name. In the case of the new "Equals" assertions, a small
> diff showing markers for initial matching sequence (if any) and final
> matching sequence (if any) is also logged, so that the non-matching
> text is aligned in the middle for easy identification.
>
> These changes greatly improve the ease with which you can script an
> LDAP interaction and then use the results seen in the View Results
> Tree to turn the interaction into a unit test asserting correct
> behaviour (after suitable manual review of course). This was
> particularly attractive to me as two serious problems were observed
> with the GUI as it stands:
> 1. The attribute table presented "LDAP Extended Request (ALPHA)"
> "Add tests" requires that you hit return on every text field entered
> (rather then tabbing/clicking off it) or the modified value is not
> saved even though it appears to be. This was problematic as I was
> cutting and pasting a number of existing LDIF files into these
> windows, and the problem only became apparent when I went to run my
> test and found bogus data in virtually all of the fields I'd entered.
> 2. The "Patterns to Test" table on the Response Assertion" screen
> doesn't deal well with long single line patterns, in that the whole
> line becomes obscured by a scrollbar rendering ineditable (except by
> tricks like trying to scoll to the end of the line adding a number of
> un-needed blank lines/clicking off/clicking back so that the added
> blank lines coincide with the scrollbar when it is rendered).
>
> I have a patch I can submit if the project is interested, and can
> enter the issues above into bugzilla if given the go-ahead. As this is
> my first posting to the JMeter dev list I just wanted to check exactly
> what the appropriate protocol is.
>
> My patch is against a downloaded 2.2 source, which I notice doesn't
> include any .svn directories; is this by design or accident as it
> means a somewhat painful (and quite possibly error-prone) manual
> merging of changes over a freshly checked out SVN dir if someone works
> on a patch before realising that no SVN dirs are present.
>
> Thanks for your guidance/feedback...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
RE: Improvements related to LDAP Sampler
Posted by "Smits, Dolf" <do...@siemens.com>.
Hi,
Thansk for helping improving the LDAP sampler!
I also made some improvements, just a few days ago, so these
improvements might be merged.
(I also fixed b.)
I think that improvement c is alright anyway.
About D,
Do I understand right that you have now several searchresults, each
consisting of a dn and the attributes?
I don't think this change is a problem, maybe some older testplans need
to be changed a bit, but that can be overcome.
About a. Are you sorting the result within the sampler, Or are you
requesting the server to give a sorted result?
In the last case, I think it should be configurable because it might not
be what you want.
If you're sorting this within the sampler, I think it should also be
configurable ( I intoduced a parser flag to stop parsing the search
results, this to save CPU cycles on the test machine. I think something
like that should be made for the sorting as well.)
I think the best solution would be to upload the patch as attachement to
the bug-40103, so that one of the official commiters can use the patches
and merge them into the main branch.
Thanks a lot for your contribution,
Dolf Smits
Dolf Smits
Senior Consultant Identity Management Solutions
070 333 3654
070 333 2511
06 55844837
Dolf.Smits@siemens.com
Let op: Vrijdags heb ik ouderschapsverlof en wordt uw mail niet gelezen.
Deze e-mail is uitsluitend bedoeld voor kennisneming door de
geadresseerde(n), en mag niet aan anderen worden doorgestuurd of op
andere wijze ter kennis worden gebracht. Indien u niet de geadresseerde
bent, verzoek ik u om de afzender te waarschuwen en de e-mail direct te
verwijderen/vernietigen. De afzender wijst elke aansprakelijkheid voor
(de inhoud van) deze e-mail af.
-----Original Message-----
From: Norbet Reilly [mailto:nrhope@gmail.com]
Sent: maandag 28 augustus 2006 8:40
To: jmeter-dev@jakarta.apache.org
Subject: Improvements related to LDAP Sampler
Hi,
I have made the following improvements to the JMeter LDAP support
which I wanted to share with the list:
1. Changed LDAP sampler to:
a. sort search results (by DN), attributes for each result (by
id) and values (by toString()) for searches returning less the a
configured constant (1000) entries. Having a stable ordering allows a
new class of response assertion detailed below.
b. fix bugzilla 40103 (extra "</operation>").
c. use StringBuffer instead of '+' for search results where
there may be big numbers of results to be marshalled to XML.
d. Added extra <searchresults> tag and nested <dn> ...
<attribute> stuff inside the <searchresult> tag. This was because the
existing structure is not very XSD/JAXB etc friendly, and there seems
no good reason why it shouldn't be.
2. Changed ResponseAssertion.java to:
a. support a new "Pattern Matching Rule" called "Equals" which
does a direct string comparison between the response and the first
"Patterns To Test" string which has been entered. This is not directly
tied to the LDAP sampler but requires a sampler to output fields in a
stable order to be used effectively. It is better for simple
comparing against a full response then "Matches" because there is no
need to consider quoting of special regex chars.
b. log.info() information about failed assertions so that the
reason for failures is clear immediately from the log, including the
assertion's name. In the case of the new "Equals" assertions, a small
diff showing markers for initial matching sequence (if any) and final
matching sequence (if any) is also logged, so that the non-matching
text is aligned in the middle for easy identification.
These changes greatly improve the ease with which you can script an
LDAP interaction and then use the results seen in the View Results
Tree to turn the interaction into a unit test asserting correct
behaviour (after suitable manual review of course). This was
particularly attractive to me as two serious problems were observed
with the GUI as it stands:
1. The attribute table presented "LDAP Extended Request (ALPHA)"
"Add tests" requires that you hit return on every text field entered
(rather then tabbing/clicking off it) or the modified value is not
saved even though it appears to be. This was problematic as I was
cutting and pasting a number of existing LDIF files into these
windows, and the problem only became apparent when I went to run my
test and found bogus data in virtually all of the fields I'd entered.
2. The "Patterns to Test" table on the Response Assertion" screen
doesn't deal well with long single line patterns, in that the whole
line becomes obscured by a scrollbar rendering ineditable (except by
tricks like trying to scoll to the end of the line adding a number of
un-needed blank lines/clicking off/clicking back so that the added
blank lines coincide with the scrollbar when it is rendered).
I have a patch I can submit if the project is interested, and can
enter the issues above into bugzilla if given the go-ahead. As this is
my first posting to the JMeter dev list I just wanted to check exactly
what the appropriate protocol is.
My patch is against a downloaded 2.2 source, which I notice doesn't
include any .svn directories; is this by design or accident as it
means a somewhat painful (and quite possibly error-prone) manual
merging of changes over a freshly checked out SVN dir if someone works
on a patch before realising that no SVN dirs are present.
Thanks for your guidance/feedback...
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org