Re: Migrating build system to Gradle

2019-02-21 Thread Artem Fedorov
++1 !
> I suggest Gradle since it simplifies day-to-day coding activities like:
> 1) loading JMeter project to IDE
> 2) building JMeter
> 3) testing JMeter
> 4) dependency management
> 5) other

Vladimir please let's do it!

--

Artem Fedorov

On Thu, Feb 21, 2019 at 5:06 PM Andrey Pokhilko  wrote:

> ++1 from me. Any change to modern is better, contributors will
> appreciate the good modern tooling. As for plugins, source layout does
> not affect them, as long as lib+lib/ext are kept for libs and plugins in
> distribution structure.
>
> --
>
> Andrey Pokhilko
>
> 21.02.2019 13:00, Antonio Gomes Rodrigues пишет:
> > Hi,
> >
> > No experience in Gradle, but ++1 (Binding) to replace ant
> >
> > Antonio
> >
> > Le jeu. 21 févr. 2019 à 10:48, Vladimir Sitnikov <
> > sitnikov.vladi...@gmail.com> a écrit :
> >
> >> sebb> Whoever wants to switch should show that it can replace the
> current
> >> sebb> Ant build system without causing disruption.
> >> sebb> It needs to support all of the existing Ant targets.
> >>
> >> Ok, I read that as you agree to replace Ant with Gradle.
> >> So far the only technical justification (see
> >> https://www.apache.org/foundation/voting.html#Veto ) I see is "Gradle
> >> might
> >> fail to implement some of current build logic".
> >> Of course the only way to prove that "Gradle fails to implement the
> >> required tasks" is to actually implement the tasks. I agree there might
> be
> >> issues, however I'm sure this fear alone does not qualify as "technical
> >> justification".
> >>
> >> So far
> >> ++1 (Binding): Vladimir Sitnikov
> >> ++1 (Binding): Philippe Mouawad
> >>
> >> Vetos: none
> >>
> >> sebb> (The Ant scripts don't change that often, so that should not be
> too
> >> difficult).
> >>
> >> Maintenance of multiple build systems at once is always a time consuming
> >> task.
> >> We don't seem to have funding for that, so I suggest we just implement
> >> Gradle build as a branch, and merge that in a single go.
> >>
> >> sebb> Why use a build system that all but forces a change on you?
> >>
> >> Sebb, I don't suggest Gradle just because it forces to move files
> around.
> >> I suggest Gradle since it simplifies day-to-day coding activities like:
> >> 1) loading JMeter project to IDE
> >> 2) building JMeter
> >> 3) testing JMeter
> >> 4) dependency management
> >> 5) other
> >>
> >> On top of that, there are good reasons for certain folder layout.
> >> For instance, Gradle encourages to keep dependency jar files in a
> >> completely separate folder (outside of the project).
> >> This prevents accidentally putting multi-megabyte blobs under source
> >> control like in
> >>
> >>
> https://github.com/apache/jmeter/commit/c9a4d557f9a8e213ccc93215264a254dfb2bc50a
> >>
> >> Then it makes sense to keep test classes close to the relevant code.
> >> Otherwise the codebase looks like a single module which really takes
> time
> >> to comprehend.
> >> Currently all the test code is located in a single folder/structure,
> and it
> >> is not clear which tests are related to which jars.
> >>
> >> So moving files around it not just to make Gradle happy, but it is more
> to
> >> make developers who read and maintain the code happy.
> >>
> >> sebb> Note that the current Ant build relies on some Beanshell scripting
> >> and
> >> sebb> Maven integration.
> >>
> >> Gradle approach there would be to use Java (or Kotlin) code and place
> it in
> >> buildSrc folder.
> >> Gradle builds buildSrc code at build script initialization, and buildSrc
> >> code can represent whatever build logic is required
> >> Doc:
> >>
> >>
> https://docs.gradle.org/current/userguide/organizing_gradle_projects.html#sec:build_sources
> >>
> >> Apparently, Java/Kotlin code is way better than Beanshell. Should I
> >> elaborate?
> >>
> >> Vladimir
> >>
>


[GitHub] jmeter pull request #439: Fix 63055

2019-02-04 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/439

Fix 63055

https://bz.apache.org/bugzilla/show_bug.cgi?id=63055

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter fix-63055

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/439.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #439


commit 2d6b530764017678bd06eea6296b3ca09141575a
Author: Artem Fedorov 
Date:   2019-02-04T13:49:04Z

fix rename sample labels

https://bz.apache.org/bugzilla/show_bug.cgi?id=63055

commit a453a63372d0563a7cf7582ce87193dd7b5d3571
Author: Artem Fedorov 
Date:   2019-02-04T14:19:43Z

fix isRenameSampleLabe()

commit 3b7e2eb8135570e112403aa705b5a48fa6990d93
Author: Artem Fedorov 
Date:   2019-02-04T14:19:48Z

add test

commit 064ac6fb0ae049f7536e487d0b40093858c361fe
Author: Artem Fedorov 
Date:   2019-02-04T14:24:43Z

add changelog




---


[GitHub] jmeter issue #429: Fix 62887. Customized SampleLabel is ignored and overwrit...

2019-02-04 Thread artem-fedorov
Github user artem-fedorov commented on the issue:

https://github.com/apache/jmeter/pull/429
  
Hello @pmouawad 
I'll create a new PR soon


---


[GitHub] jmeter issue #429: Fix 62887. Customized SampleLabel is ignored and overwrit...

2018-11-23 Thread artem-fedorov
Github user artem-fedorov commented on the issue:

https://github.com/apache/jmeter/pull/429
  
@pmouawad 
In case when I have 3 resources for request url.com
- url.com/res.css
- url.com/res.html
- url.com/res.xml
Does current behaviour guaranteed that `url.com/res.css` always will have 
label `url-0`, `url.com/res.html` -> `url.com-1` and `url.com/res.xml` -> 
`url.com-2` ? and Labels will not be confused?


---


[GitHub] jmeter issue #433: Bug 62935. Pass custom 'mail.*' properties to Mail Reader...

2018-11-23 Thread artem-fedorov
Github user artem-fedorov commented on the issue:

https://github.com/apache/jmeter/pull/433
  
Awesome! thanks!


---


[GitHub] jmeter issue #433: Bug 62935. Pass custom 'mail.*' properties to Mail Reader...

2018-11-22 Thread artem-fedorov
Github user artem-fedorov commented on the issue:

https://github.com/apache/jmeter/pull/433
  
@pmouawad  is it going to be on the next version of JMeter?


---


[GitHub] jmeter pull request #433: Pass custom 'mail.*' properties to Mail Reader Sam...

2018-11-21 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/433

Pass custom 'mail.*' properties to Mail Reader Sampler

https://bz.apache.org/bugzilla/show_bug.cgi?id=62935 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter 
add/mail-reader-jmeter-properties

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/433.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #433


commit d322260e1a18f673bc2a8e967afb8c82f8f98ea4
Author: Artem Fedorov 
Date:   2018-11-21T13:28:09Z

Pass custom 'mail.*' properties to Mail Reader Sampler




---


[GitHub] jmeter pull request #429: Fix 62887. Customized SampleLabel is ignored and o...

2018-11-13 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/429#discussion_r232936723
  
--- Diff: bin/testfiles/TEST_HTTP_HttpClient4.xml ---
@@ -144,7 +144,7 @@
   
   
   
-  
--- End diff --

If you expect `HR-FollowRedirect-21` here we can  fix it using this small 
hack:
```
if (redirect >= MAX_REDIRECTS) {
lastRes = errorResult(new IOException("Exceeded maximum number 
of redirects: " + MAX_REDIRECTS), new HTTPSampleResult(lastRes));
lastRes.setSampleLabel(totalRes.getSampleLabel()); // use 
parent label 
totalRes.addSubResult(lastRes);
}
```


---


[GitHub] jmeter pull request #429: Fix 62887. Customized SampleLabel is ignored and o...

2018-11-12 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/429#discussion_r232621358
  
--- Diff: bin/testfiles/TEST_HTTP_Java.xml ---
@@ -120,7 +120,7 @@
   
   
   
-  
--- End diff --

Same note here


---


[GitHub] jmeter pull request #429: Fix 62887. Customized SampleLabel is ignored and o...

2018-11-12 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/429#discussion_r232621287
  
--- Diff: bin/testfiles/TEST_HTTP_HttpClient4.xml ---
@@ -144,7 +144,7 @@
   
   
   
-  
--- End diff --

Because first 20 subSamples were added 
[here](https://github.com/apache/jmeter/blob/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java#L1593)
 and the last SampleResult was 
[generated](https://github.com/apache/jmeter/blob/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java#L983)
 from previous SubResult (that was renamed) and added 
[here](https://github.com/apache/jmeter/blob/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java#L1603).


---


[GitHub] jmeter pull request #429: Fix 62887. Customized SampleLabel is ignored and o...

2018-11-12 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/429#discussion_r232611414
  
--- Diff: bin/testfiles/Bug52310.xml ---
@@ -2,16 +2,16 @@
 
 
 
-  
--- End diff --

From the bug I understand, that JMeter will change subResults labels only 
if this labels are equals. 
The parent label is `HTTP-Request-HC31`, subResults labels start with 
`http://jmeter.apache.org/.` They are not equals and JMeter does not change 
them.


---


[GitHub] jmeter pull request #429: Fix 62887. Customized SampleLabel is ignored and o...

2018-11-12 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/429#discussion_r232611468
  
--- Diff: bin/testfiles/HTMLParserTestFile_2.xml ---
@@ -10,7 +10,7 @@
 
 file:testfiles/HTMLParserTestFile_2.html
   
-  
--- End diff --

Same note here


---


[GitHub] jmeter pull request #429: Fix 62887. Customized SampleLabel is ignored and o...

2018-11-09 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/429

Fix 62887.  Customized SampleLabel is ignored and overwritten by JMet…

…er 5.0



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter fix-62887

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/429.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #429


commit 561e26c1843b8dd85c77df090825c2860c1d5694
Author: Artem Fedorov 
Date:   2018-11-09T09:54:22Z

Fix 62887.  Customized SampleLabel is ignored and overwritten by JMeter 5.0




---


[GitHub] jmeter pull request #400: Bug 62785. - HTTP Request throws java.io.FileNotFo...

2018-10-01 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/400

Bug 62785. - HTTP Request throws java.io.FileNotFoundException when upload 
file without param name and MIME type

https://bz.apache.org/bugzilla/show_bug.cgi?id=62785


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter 
fix/File-not-found-exception

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/400.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #400


commit 8823cb1e9973fdd8492a9cf9f0b83e7bd8c149c5
Author: Artem Fedorov 
Date:   2018-10-01T12:06:48Z

fix missed FileServer.getResolvedFile()

commit bf350af4e33f7c6a5bd0ba2b5ed26d5116e02d58
Author: Artem Fedorov 
Date:   2018-10-01T12:07:02Z

add test

commit 6188540e47ce37efad8f9e2d522254def54cfcca
Author: Artem Fedorov 
Date:   2018-10-01T12:08:28Z

add changelog




---


Re: JMeter send double requests when configure proxy with authentication

2018-09-28 Thread Artem Fedorov
Hi Philippe

I added simple test to my PR

Artem

On Wed, Sep 19, 2018 at 9:42 PM Philippe Mouawad 
wrote:

> Hello Artem,
> At minimum, we should have a JMX Test plan that allows testing all
> combinations of an authentication using httpbin.org for example and some
> java library that could play the role of a proxy, I see the following cases
> but feel free to complete:
>
>- No proxy set
>- Global Proxy set at JMeter level
>- Proxy set in HTTP Request Defaults
>- Proxy set only on request
>
> We should have 2 threads (to check ), 2 iterations and 3 requests (the one
> we are concerned about in the middle)
>
> Regarding JUnit, unless  we externalize this particular piece of code into
> a custom class, it looks to me hard to do that but if you have an idea ...
>
> Regards
>
> On Wed, Sep 19, 2018 at 5:23 PM Artem Fedorov <
> artem.fedo...@blazemeter.com>
> wrote:
>
> > Hi Philippe
> >
> > I have very simple use case
> > I configure squid proxy with authentication and I have jmx Test Plan that
> > makes 3 HTTP Request.
> >
> > I attached jmx file and access log from squid.
> >
> > Is there any ways for create a JUnit test with the same scenario?
> > Also I want to remove !isDynamicProxy(getProxyHost(),
> getProxyPortInt())) from
> > this condition
> > <
> https://github.com/apache/jmeter/blob/387271deb6f5b310fa4f8672f65948ab6049ed90/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java#L694
> >,
> > because it always false, when proxy config was specified.
> >
> > Thanks,
> > Artem
> >
> >
> > On Sun, Sep 16, 2018 at 9:53 PM, Philippe Mouawad <
> > philippe.moua...@gmail.com> wrote:
> >
> >> Thanks for last PR update.
> >> We'll merge it once 5.0 is released;
> >>
> >> But before, could you describe the use case met that made you see this
> >> issue ?
> >> Is the a possibility to provide  a JMX Test plan that could be used as
> >> integration test ? and if possible a JUnit test ?
> >>
> >> Thanks
> >>
> >> On Sat, Sep 1, 2018 at 4:02 PM Philippe Mouawad <
> >> philippe.moua...@gmail.com>
> >> wrote:
> >>
> >> > Hello,
> >> > Thanks for latest updates of PR.
> >> > 1/ I would not use Object but AuthState instead.
> >> >
> >> > 2/ Shouldn't we use HTTPCLIENTS_CACHE_PER_THREAD_AND_HTTPCLIENTKEY and
> >> > store AuthState there (transforming Pair to Triple)?
> >> >
> >> > This would be the case for a Thread representing a Virtual User.
> >> > But it would not be correct if a thread is not a Virtual User
> >> >
> >> >
> >> > Regards
> >> >
> >> > On Wed, Aug 29, 2018 at 11:14 AM Artem Fedorov <
> >> > artem.fedo...@blazemeter.com> wrote:
> >> >
> >> >> Fixed.
> >> >>
> >> >> Regarding (HttpClientContext.PROXY_AUTH_STATE + this) I also have
> >> doubts:
> >> >>
> >> >> - minimal number of authstate, that we should store = Number of
> >> Requests
> >> >> in
> >> >> Test Plan. (each request can use own proxy). Does the AuthState is
> >> Thread
> >> >> Safe and we can share it between threads? I think no and it'll better
> >> to
> >> >> store Number of Requests in Plan * Number of Threads AuthStates.
> >> >>
> >> >> - Also in case if we use dynamic proxy we can not reuse saved
> >> AuthState:
> >> >>
> >> >> >  if (!isDynamicProxy(getProxyHost(), getProxyPortInt())) {
> >> >> >localContext.setAttribute(HttpClientContext.PROXY_AUTH_STATE,
> >> proxy);
> >> >> >  }
> >> >>
> >> >> Artem
> >> >>
> >> >> On Tue, Aug 28, 2018 at 11:46 PM, Philippe Mouawad <
> >> >> philippe.moua...@gmail.com> wrote:
> >> >>
> >> >> > Thank you Artem,
> >> >> >
> >> >> > I made a little comment on PR.
> >> >> >
> >> >> > Just to be sure I understand the PR:
> >> >> >
> >> >> >    - You set HttpClientContext.PROXY_AUTH_STATE so that it is used
> if
> >> >> >updated
> >> >> >
> >> >> > But is it correct to store it as:
> >> >> >
> >> >> >-

Re: JMeter send double requests when configure proxy with authentication

2018-09-19 Thread Artem Fedorov
Hi Philippe

I have very simple use case
I configure squid proxy with authentication and I have jmx Test Plan that
makes 3 HTTP Request.

I attached jmx file and access log from squid.

Is there any ways for create a JUnit test with the same scenario?
Also I want to remove !isDynamicProxy(getProxyHost(), getProxyPortInt())) from
this condition
<https://github.com/apache/jmeter/blob/387271deb6f5b310fa4f8672f65948ab6049ed90/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java#L694>,
because it always false, when proxy config was specified.

Thanks,
Artem


On Sun, Sep 16, 2018 at 9:53 PM, Philippe Mouawad <
philippe.moua...@gmail.com> wrote:

> Thanks for last PR update.
> We'll merge it once 5.0 is released;
>
> But before, could you describe the use case met that made you see this
> issue ?
> Is the a possibility to provide  a JMX Test plan that could be used as
> integration test ? and if possible a JUnit test ?
>
> Thanks
>
> On Sat, Sep 1, 2018 at 4:02 PM Philippe Mouawad <
> philippe.moua...@gmail.com>
> wrote:
>
> > Hello,
> > Thanks for latest updates of PR.
> > 1/ I would not use Object but AuthState instead.
> >
> > 2/ Shouldn't we use HTTPCLIENTS_CACHE_PER_THREAD_AND_HTTPCLIENTKEY and
> > store AuthState there (transforming Pair to Triple)?
> >
> > This would be the case for a Thread representing a Virtual User.
> > But it would not be correct if a thread is not a Virtual User
> >
> >
> > Regards
> >
> > On Wed, Aug 29, 2018 at 11:14 AM Artem Fedorov <
> > artem.fedo...@blazemeter.com> wrote:
> >
> >> Fixed.
> >>
> >> Regarding (HttpClientContext.PROXY_AUTH_STATE + this) I also have
> doubts:
> >>
> >> - minimal number of authstate, that we should store = Number of Requests
> >> in
> >> Test Plan. (each request can use own proxy). Does the AuthState is
> Thread
> >> Safe and we can share it between threads? I think no and it'll better to
> >> store Number of Requests in Plan * Number of Threads AuthStates.
> >>
> >> - Also in case if we use dynamic proxy we can not reuse saved AuthState:
> >>
> >> >  if (!isDynamicProxy(getProxyHost(), getProxyPortInt())) {
> >> >localContext.setAttribute(HttpClientContext.PROXY_AUTH_STATE,
> proxy);
> >> >  }
> >>
> >> Artem
> >>
> >> On Tue, Aug 28, 2018 at 11:46 PM, Philippe Mouawad <
> >> philippe.moua...@gmail.com> wrote:
> >>
> >> > Thank you Artem,
> >> >
> >> > I made a little comment on PR.
> >> >
> >> > Just to be sure I understand the PR:
> >> >
> >> >- You set HttpClientContext.PROXY_AUTH_STATE so that it is used if
> >> >updated
> >> >
> >> > But is it correct to store it as:
> >> >
> >> >- "http.auth.proxy-scope" + this
> >> >
> >> > Because we'll end per Thread with :
> >> >
> >> >- Number of Requests in Plan * Number of Threads AuthStates
> >> >
> >> > Regards
> >> >
> >> >
> >> > On Mon, Aug 27, 2018 at 3:43 PM Artem Fedorov <
> >> > artem.fedo...@blazemeter.com>
> >> > wrote:
> >> >
> >> > > Hi Philippe
> >> > >
> >> > > https://github.com/apache/jmeter/pull/397
> >> > >
> >> > > Let's discuss the details in the PR
> >> > >
> >> > > Thanks,
> >> > > Artem
> >> > >
> >> > > On Sun, Aug 26, 2018 at 12:04 AM, Philippe Mouawad <
> >> > > philippe.moua...@gmail.com> wrote:
> >> > >
> >> > > > Hello Artem,
> >> > > > Go ahead and propose a patch or PR.
> >> > > > It will be a clearer base to discuss.
> >> > > >
> >> > > > Thank you
> >> > > >
> >> > > > On Wed, Aug 22, 2018 at 10:56 AM Artem Fedorov <
> >> > > > artem.fedo...@blazemeter.com>
> >> > > > wrote:
> >> > > >
> >> > > > > I work with the latest JMeter version from github
> >> > > > > (revision f27c31590cf07bc8427663b62fc22d6d650b95af)
> >> > > > >
> >> > > > > I create a Thread Group with 1 loop and 1 user. This Thread
> Group
> >> > > > contains
> >> > > > > View R

[GitHub] jmeter pull request #398: Fix grammar in continue_current_loop Label in Resu...

2018-09-11 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/398

Fix grammar in continue_current_loop Label in Result Status Handler a…

…nd Flow Control Action


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter 
fix/flow-controll-action-label

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/398.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #398


commit 15d2be86ac7333767c4e56d95507588fa59f0955
Author: Artem Fedorov 
Date:   2018-09-11T16:22:01Z

Fix grammar in continue_current_loop Label in Result Status Handler and 
Flow Control Action




---


Re: JMeter send double requests when configure proxy with authentication

2018-08-29 Thread Artem Fedorov
Fixed.

Regarding (HttpClientContext.PROXY_AUTH_STATE + this) I also have doubts:

- minimal number of authstate, that we should store = Number of Requests in
Test Plan. (each request can use own proxy). Does the AuthState is Thread
Safe and we can share it between threads? I think no and it'll better to
store Number of Requests in Plan * Number of Threads AuthStates.

- Also in case if we use dynamic proxy we can not reuse saved AuthState:

>  if (!isDynamicProxy(getProxyHost(), getProxyPortInt())) {
>localContext.setAttribute(HttpClientContext.PROXY_AUTH_STATE, proxy);
>  }

Artem

On Tue, Aug 28, 2018 at 11:46 PM, Philippe Mouawad <
philippe.moua...@gmail.com> wrote:

> Thank you Artem,
>
> I made a little comment on PR.
>
> Just to be sure I understand the PR:
>
>- You set HttpClientContext.PROXY_AUTH_STATE so that it is used if
>updated
>
> But is it correct to store it as:
>
>- "http.auth.proxy-scope" + this
>
> Because we'll end per Thread with :
>
>- Number of Requests in Plan * Number of Threads AuthStates
>
> Regards
>
>
> On Mon, Aug 27, 2018 at 3:43 PM Artem Fedorov <
> artem.fedo...@blazemeter.com>
> wrote:
>
> > Hi Philippe
> >
> > https://github.com/apache/jmeter/pull/397
> >
> > Let's discuss the details in the PR
> >
> > Thanks,
> > Artem
> >
> > On Sun, Aug 26, 2018 at 12:04 AM, Philippe Mouawad <
> > philippe.moua...@gmail.com> wrote:
> >
> > > Hello Artem,
> > > Go ahead and propose a patch or PR.
> > > It will be a clearer base to discuss.
> > >
> > > Thank you
> > >
> > > On Wed, Aug 22, 2018 at 10:56 AM Artem Fedorov <
> > > artem.fedo...@blazemeter.com>
> > > wrote:
> > >
> > > > I work with the latest JMeter version from github
> > > > (revision f27c31590cf07bc8427663b62fc22d6d650b95af)
> > > >
> > > > I create a Thread Group with 1 loop and 1 user. This Thread Group
> > > contains
> > > > View Results Tree (Listener) and HTTP Resuest (Sampler)
> > > >
> > > > Configuration of HTTP Sampler:
> > > >
> > > >  > > > > testclass="HTTPSamplerProxy" testname="HTTP Request"
> enabled="true">
> > > > >> > > > elementType="Arguments" guiclass="HTTPArgumentsPanel"
> > > > testclass="Arguments"
> > > > > testname="User Defined Variables" enabled="true">
> > > > > 
> > > > >   
> > > > >   
> > > > >   
> > > > >   
> > > > >> name="HTTPSampler.contentEncoding">
> > > > >   http://blazedemo.com
> > > > > 
> > > > >   GET
> > > > >   true
> > > > >> name="HTTPSampler.auto_redirects">false
> > > > >   true
> > > > >   false > > boolProp>
> > > > >> name="HTTPSampler.embedded_url_re">
> > > > >   
> > > localhost
> > > > >   
> 3321
> > > > >   
> artem
> > > > >   
> artem
> > > > >> name="HTTPSampler.connect_timeout">
> > > > >   
> > > > > 
> > > >
> > > >
> > > > When I run this Test Plan I see 1 sample in the View Results Tree,
> but
> > in
> > > > the access.log of squid I see 2 request from JMeter.
> > > >
> > > > 1534844834.248  0 127.0.0.1 TCP_DENIED/407 4056 GET
> > > > > http://blazedemo.com/ - HIER_NONE/- text/html
> > > > > 1534844834.320 52 127.0.0.1 TCP_MISS/200 8077 GET
> > > > > http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html
> > > >
> > > >
> > > > So, in real test each Sampler will send 2 requests:
> > > > - 1st without authentication data (and will receive 407 http response
> > > code)
> > > >  - TCP_DENIED/407
> > > > - 2nd with authentication data(username/password/type) - will be a
> > > success
> > > > - TCP_MISS/200
> > > >
> > > > JMeter (httpclient) send 1st request for detect authentication type
> > > > (Basic/Diges

Re: JMeter send double requests when configure proxy with authentication

2018-08-27 Thread Artem Fedorov
Hi Philippe

https://github.com/apache/jmeter/pull/397

Let's discuss the details in the PR

Thanks,
Artem

On Sun, Aug 26, 2018 at 12:04 AM, Philippe Mouawad <
philippe.moua...@gmail.com> wrote:

> Hello Artem,
> Go ahead and propose a patch or PR.
> It will be a clearer base to discuss.
>
> Thank you
>
> On Wed, Aug 22, 2018 at 10:56 AM Artem Fedorov <
> artem.fedo...@blazemeter.com>
> wrote:
>
> > I work with the latest JMeter version from github
> > (revision f27c31590cf07bc8427663b62fc22d6d650b95af)
> >
> > I create a Thread Group with 1 loop and 1 user. This Thread Group
> contains
> > View Results Tree (Listener) and HTTP Resuest (Sampler)
> >
> > Configuration of HTTP Sampler:
> >
> >  > > testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
> > >> > elementType="Arguments" guiclass="HTTPArgumentsPanel"
> > testclass="Arguments"
> > > testname="User Defined Variables" enabled="true">
> > > 
> > >   
> > >   
> > >   
> > >   
> > >   
> > >   http://blazedemo.com
> > > 
> > >   GET
> > >   true
> > >   false
> > >   true
> > >   false boolProp>
> > >   
> > >   
> localhost
> > >   3321
> > >   artem
> > >   artem
> > >   
> > >   
> > > 
> >
> >
> > When I run this Test Plan I see 1 sample in the View Results Tree, but in
> > the access.log of squid I see 2 request from JMeter.
> >
> > 1534844834.248  0 127.0.0.1 TCP_DENIED/407 4056 GET
> > > http://blazedemo.com/ - HIER_NONE/- text/html
> > > 1534844834.320 52 127.0.0.1 TCP_MISS/200 8077 GET
> > > http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html
> >
> >
> > So, in real test each Sampler will send 2 requests:
> > - 1st without authentication data (and will receive 407 http response
> code)
> >  - TCP_DENIED/407
> > - 2nd with authentication data(username/password/type) - will be a
> success
> > - TCP_MISS/200
> >
> > JMeter (httpclient) send 1st request for detect authentication type
> > (Basic/Digest/NTLM/SPNEGO/Kerberos) which use proxy server.
> > If we will have 2 loops the JMeter will send 4 requests, 3 loops = 6
> > requests etc. I would like to reduce number of request to the proxy
> server
> > and make request for detect authentication type once at the start of the
> > loop
> >
> > Artem
> >
> > On Wed, Aug 22, 2018 at 12:26 AM, Philippe Mouawad <
> > p.moua...@ubik-ingenierie.com> wrote:
> >
> > > Hello Artem,
> > > I am not sure to understand.
> > >
> > > Can you clarify with an example or reformulating what you mean by HTTP
> > > Request that use proxy with authentication.
> > >
> > > and also clarify what’s after that, it’s really not clear for me.
> > >
> > > Thank you
> > >
> > > On Tuesday, August 21, 2018, Artem Fedorov <
> artem.fedo...@blazemeter.com
> > >
> > > wrote:
> > >
> > > > HI All
> > > >
> > > > I configure HTTP Request that use proxy with authentication
> > > >
> > > > In proxy log I can see, that JMeter *always send 2 requests*:  (I
> used
> > > > `squid` in tests)
> > > >
> > > > 1534844834.248  0 127.0.0.1 TCP_DENIED/407 4056 GET
> > > > > http://blazedemo.com/ - HIER_NONE/- text/html
> > > > > 1534844834.320 52 127.0.0.1 TCP_MISS/200 8077 GET
> > > > > http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html
> > > >
> > > >
> > > > The first request JMeter send without authentication options, because
> > > this
> > > > options are create after server got a response with 401/407 code.
> > > >
> > > > In performance test I'll see the following log: (50 % of all requests
> > are
> > > > send without authentication options) - IMO this is incorrect load of
> > > proxy
> > > > server or we lose a lot of time for create authentication scheme for
> > each
> > > > request
> > > >
> > > > - TCP_DENIED/407 (with

[GitHub] jmeter pull request #397: fix double requests when configure proxy with auth...

2018-08-27 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/397

fix double requests when configure proxy with authentication



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter fix/proxy-requests

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/397.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #397


commit 66a62e82c168259e2c655524712fc701f6f7f48c
Author: Artem Fedorov 
Date:   2018-08-27T09:14:12Z

fix double requests when configure proxy with authentication




---


Re: JMeter send double requests when configure proxy with authentication

2018-08-22 Thread Artem Fedorov
I work with the latest JMeter version from github
(revision f27c31590cf07bc8427663b62fc22d6d650b95af)

I create a Thread Group with 1 loop and 1 user. This Thread Group contains
View Results Tree (Listener) and HTTP Resuest (Sampler)

Configuration of HTTP Sampler:

 testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
>elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments"
> testname="User Defined Variables" enabled="true">
> 
>   
>   
>   
>   
>   
>   http://blazedemo.com
> 
>   GET
>   true
>   false
>   true
>   false
>   
>   localhost
>   3321
>   artem
>   artem
>   
>   
> 


When I run this Test Plan I see 1 sample in the View Results Tree, but in
the access.log of squid I see 2 request from JMeter.

1534844834.248  0 127.0.0.1 TCP_DENIED/407 4056 GET
> http://blazedemo.com/ - HIER_NONE/- text/html
> 1534844834.320 52 127.0.0.1 TCP_MISS/200 8077 GET
> http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html


So, in real test each Sampler will send 2 requests:
- 1st without authentication data (and will receive 407 http response code)
 - TCP_DENIED/407
- 2nd with authentication data(username/password/type) - will be a success
- TCP_MISS/200

JMeter (httpclient) send 1st request for detect authentication type
(Basic/Digest/NTLM/SPNEGO/Kerberos) which use proxy server.
If we will have 2 loops the JMeter will send 4 requests, 3 loops = 6
requests etc. I would like to reduce number of request to the proxy server
and make request for detect authentication type once at the start of the
loop

Artem

On Wed, Aug 22, 2018 at 12:26 AM, Philippe Mouawad <
p.moua...@ubik-ingenierie.com> wrote:

> Hello Artem,
> I am not sure to understand.
>
> Can you clarify with an example or reformulating what you mean by HTTP
> Request that use proxy with authentication.
>
> and also clarify what’s after that, it’s really not clear for me.
>
> Thank you
>
> On Tuesday, August 21, 2018, Artem Fedorov 
> wrote:
>
> > HI All
> >
> > I configure HTTP Request that use proxy with authentication
> >
> > In proxy log I can see, that JMeter *always send 2 requests*:  (I used
> > `squid` in tests)
> >
> > 1534844834.248  0 127.0.0.1 TCP_DENIED/407 4056 GET
> > > http://blazedemo.com/ - HIER_NONE/- text/html
> > > 1534844834.320 52 127.0.0.1 TCP_MISS/200 8077 GET
> > > http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html
> >
> >
> > The first request JMeter send without authentication options, because
> this
> > options are create after server got a response with 401/407 code.
> >
> > In performance test I'll see the following log: (50 % of all requests are
> > send without authentication options) - IMO this is incorrect load of
> proxy
> > server or we lose a lot of time for create authentication scheme for each
> > request
> >
> > - TCP_DENIED/407 (without proxy authentication)
> > - TCP_MISS/200 (with proxy authentication)
> > - TCP_DENIED/407 (without proxy authentication)
> > - TCP_MISS/200 (with proxy authentication)
> > - TCP_DENIED/407 (without proxy authentication)
> > - TCP_MISS/200 (with proxy authentication)
> > 
> >
> > The first request (the response for this request) use by httpclient for
> > detect Standard authentication type (Basic/Digest/NTLM/SPNEGO/Kerberos).
> I
> > think If we have not dynamic proxy we can *reuse* knowledges about
> > authentication type in the second and subsequent requests.
> > After such changes we will see the following log:
> >
> > - TCP_DENIED/407 (without proxy authentication)
> > - TCP_MISS/200 (with proxy authentication)
> > - TCP_MISS/200 (with proxy authentication)
> > - TCP_MISS/200 (with proxy authentication)
> > 
> >
> > What do you think about such changes? If all is OK I can contribute the
> fix
> >
> >
> > Thanks,
> > Artem
> >
>
>
> --
> Cordialement.
> Philippe Mouawad.
> Ubik-Ingénierie
>
> UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
>
> UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
>


JMeter send double requests when configure proxy with authentication

2018-08-21 Thread Artem Fedorov
HI All

I configure HTTP Request that use proxy with authentication

In proxy log I can see, that JMeter *always send 2 requests*:  (I used
`squid` in tests)

1534844834.248  0 127.0.0.1 TCP_DENIED/407 4056 GET
> http://blazedemo.com/ - HIER_NONE/- text/html
> 1534844834.320 52 127.0.0.1 TCP_MISS/200 8077 GET
> http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html


The first request JMeter send without authentication options, because this
options are create after server got a response with 401/407 code.

In performance test I'll see the following log: (50 % of all requests are
send without authentication options) - IMO this is incorrect load of proxy
server or we lose a lot of time for create authentication scheme for each
request

- TCP_DENIED/407 (without proxy authentication)
- TCP_MISS/200 (with proxy authentication)
- TCP_DENIED/407 (without proxy authentication)
- TCP_MISS/200 (with proxy authentication)
- TCP_DENIED/407 (without proxy authentication)
- TCP_MISS/200 (with proxy authentication)


The first request (the response for this request) use by httpclient for
detect Standard authentication type (Basic/Digest/NTLM/SPNEGO/Kerberos). I
think If we have not dynamic proxy we can *reuse* knowledges about
authentication type in the second and subsequent requests.
After such changes we will see the following log:

- TCP_DENIED/407 (without proxy authentication)
- TCP_MISS/200 (with proxy authentication)
- TCP_MISS/200 (with proxy authentication)
- TCP_MISS/200 (with proxy authentication)


What do you think about such changes? If all is OK I can contribute the fix


Thanks,
Artem


[GitHub] jmeter issue #378: Fix 43612

2018-03-21 Thread artem-fedorov
Github user artem-fedorov commented on the issue:

https://github.com/apache/jmeter/pull/378
  
@pmouawad 
I think it fix for old bug 43612.
See screenshots:
https://bz.apache.org/bugzilla/attachment.cgi?id=35796
https://bz.apache.org/bugzilla/attachment.cgi?id=35797


---


[GitHub] jmeter pull request #378: Fix 43612

2018-03-20 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/378#discussion_r175794961
  
--- Diff: 
src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java ---
@@ -1649,6 +1648,43 @@ else if(getSendParameterValuesAsPostBody()) {
 }
 StringEntity requestEntity = new 
StringEntity(entityBodyContent.toString(), charset);
 entity.setEntity(requestEntity);
+} else if (hasArguments()) {
--- End diff --

Done


---


[GitHub] jmeter issue #378: Fix 43612

2018-03-20 Thread artem-fedorov
Github user artem-fedorov commented on the issue:

https://github.com/apache/jmeter/pull/378
  
something wrong with TCP_TESTS


---


[GitHub] jmeter pull request #378: Fix 43612

2018-03-20 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/378

Fix 43612

Hello,

I tried to send PUT request with a few Parameters, but I don't see them in 
my Request. I found bug for it 
https://bz.apache.org/bugzilla/show_bug.cgi?id=43612 

If I send PUT request with RawBody it works fine. 

Please, review my PR with fix

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter fix-43612

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/378.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #378


commit 3a9dbfd3fc9d5d7d76b2d6d1c3db8f510f80ef8e
Author: Artem Fedorov 
Date:   2018-03-19T16:04:10Z

fix put arguments

commit 7cebb0e707e92be41ecfb6b68d288f78a7da66d8
Author: Artem Fedorov 
Date:   2018-03-19T16:04:18Z

changelog

commit 70f8004bc64dc0309198f998965556a75efa4663
Author: Artem Fedorov 
Date:   2018-03-20T08:50:56Z

add tests




---


[GitHub] jmeter pull request #373: Fix/stackoverflowerror throughput controller. Bug ...

2018-01-30 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/373

Fix/stackoverflowerror throughput controller. Bug 62062

When I ran the following Test Plan I got the `java.lang.StackOverflowError`
```
   - innerLoop
 - ThroughputController (sut)
- sampler one
- sampler two
```


```
...
at 
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222)
at 
org.apache.jmeter.control.GenericController.next(GenericController.java:173)
at org.apache.jmeter.control.LoopController.next(LoopController.java:128)
at 
org.apache.jmeter.control.LoopController.nextIsNull(LoopController.java:163)
at 
org.apache.jmeter.control.GenericController.next(GenericController.java:168)
at org.apache.jmeter.control.LoopController.next(LoopController.java:128)
at 
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222)
at 
org.apache.jmeter.control.GenericController.next(GenericController.java:173)
at org.apache.jmeter.control.LoopController.next(LoopController.java:128)
at 
org.apache.jmeter.control.LoopController.nextIsNull(LoopController.java:163)
at 
org.apache.jmeter.control.GenericController.next(GenericController.java:168)
at org.apache.jmeter.control.LoopController.next(LoopController.java:128)
at 
org.apache.jmeter.control.GenericController.nextIsAController(GenericController.java:222)
at 
org.apache.jmeter.control.GenericController.next(GenericController.java:173)
...
```
This PR contains the test that reproduced this bug and the fix.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter 
fix/stackoverflowerror-throughput-controller

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/373.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #373


commit e308797e1b141ecd4d07be3839d609468848060a
Author: Artem Fedorov 
Date:   2018-01-30T12:31:10Z

Fix StackOverFlowError in ThroughputController

commit 47edd57a6c18712bd41367b8426950990c46a70e
Author: Artem Fedorov 
Date:   2018-01-30T12:47:10Z

add changelog




---


[GitHub] jmeter pull request #344: Migrate JSON Path Assertion into JMeter core

2017-11-30 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/344#discussion_r154099867
  
--- Diff: test/src/org/apache/jmeter/assertions/TestJSONPathAssertion.java 
---
@@ -0,0 +1,383 @@
+/*
+ * 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.assertions;
+
+import org.apache.jmeter.samplers.SampleResult;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class TestJSONPathAssertion {
+
+@Test
+public void testGetJsonPath() {
+JSONPathAssertion instance = new JSONPathAssertion();
+String expResult = "";
+String result = instance.getJsonPath();
+assertEquals(expResult, result);
+}
+
+@Test
+public void testSetJsonPath() {
+String jsonPath = "";
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setJsonPath(jsonPath);
+}
+
+@Test
+public void testGetExpectedValue() {
+JSONPathAssertion instance = new JSONPathAssertion();
+String expResult = "";
+String result = instance.getExpectedValue();
+assertEquals(expResult, result);
+}
+
+@Test
+public void testSetExpectedValue() {
+String expectedValue = "";
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setExpectedValue(expectedValue);
+}
+
+@Test
+public void testSetJsonValidationBool() {
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setJsonValidationBool(false);
+}
+
+@Test
+public void testIsJsonValidationBool() {
+JSONPathAssertion instance = new JSONPathAssertion();
+boolean result = instance.isJsonValidationBool();
+assertEquals(false, result);
+}
+
+@Test
+public void testGetResult_positive() {
--- End diff --

It's also work fine in Java :smile: 


---


[GitHub] jmeter pull request #344: Migrate JSON Path Assertion into JMeter core

2017-11-30 Thread artem-fedorov
Github user artem-fedorov commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/344#discussion_r154098390
  
--- Diff: 
src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPathAssertion.java 
---
@@ -0,0 +1,218 @@
+/*
+ * 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.extractor.json.jsonpath;
+
+import com.jayway.jsonpath.JsonPath;
+import net.minidev.json.JSONArray;
+import net.minidev.json.JSONObject;
+import org.apache.jmeter.assertions.Assertion;
+import org.apache.jmeter.assertions.AssertionResult;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.testelement.AbstractTestElement;
+import org.apache.jmeter.util.JMeterUtils;
+import org.apache.oro.text.regex.Pattern;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Serializable;
+import java.text.DecimalFormat;
+import java.util.Map;
+
+/**
+ * This is main class for JSONPath Assertion which verifies assertion on
+ * previous sample result using JSON path expression
+ */
+public class JSONPathAssertion extends AbstractTestElement implements 
Serializable, Assertion {
+private static final Logger log = 
LoggerFactory.getLogger(JSONPostProcessor.class);
+private static final long serialVersionUID = 1L;
+public static final String JSONPATH = "JSON_PATH";
+public static final String EXPECTEDVALUE = "EXPECTED_VALUE";
+public static final String JSONVALIDATION = "JSONVALIDATION";
+public static final String EXPECT_NULL = "EXPECT_NULL";
+public static final String INVERT = "INVERT";
+public static final String ISREGEX = "ISREGEX";
+
+public static final DecimalFormat decimalFormatter = new 
DecimalFormat("#.#");
+
+static {
+decimalFormatter.setMaximumFractionDigits(340); // 
java.text.DecimalFormat.DOUBLE_FRACTION_DIGITS == 340
+decimalFormatter.setMinimumFractionDigits(1);
+}
+
+public String getJsonPath() {
+return getPropertyAsString(JSONPATH);
+}
+
+public void setJsonPath(String jsonPath) {
+setProperty(JSONPATH, jsonPath);
+}
+
+public String getExpectedValue() {
+return getPropertyAsString(EXPECTEDVALUE);
+}
+
+public void setExpectedValue(String expectedValue) {
+setProperty(EXPECTEDVALUE, expectedValue);
+}
+
+public void setJsonValidationBool(boolean jsonValidation) {
+setProperty(JSONVALIDATION, jsonValidation);
+}
+
+public void setExpectNull(boolean val) {
+setProperty(EXPECT_NULL, val);
+}
+
+public boolean isExpectNull() {
+return getPropertyAsBoolean(EXPECT_NULL);
+}
+
+public boolean isJsonValidationBool() {
+return getPropertyAsBoolean(JSONVALIDATION);
+}
+
+public void setInvert(boolean invert) {
+setProperty(INVERT, invert);
+}
+
+public boolean isInvert() {
+return getPropertyAsBoolean(INVERT);
+}
+
+public void setIsRegex(boolean flag) {
+setProperty(ISREGEX, flag);
+}
+
+public boolean isUseRegex() {
+return getPropertyAsBoolean(ISREGEX, true);
+}
+
+private void doAssert(String jsonString) {
+Object value = JsonPath.read(jsonString, getJsonPath());
+
+if (isJsonValidationBool()) {
+if (value instanceof JSONArray) {
+if (arrayMatched((JSONArray) value)) {
+return;
+}
+} else {
+if (isExpectNull() && value == null) {
+return;
+} else if (isEquals(value)) {
+return;
+  

[GitHub] jmeter issue #344: Migrate JSON Path Assertion into JMeter core

2017-11-30 Thread artem-fedorov
Github user artem-fedorov commented on the issue:

https://github.com/apache/jmeter/pull/344
  
@pmouawad 
I moved classes to `org.apache.jmeter.assertions` folder.

Regarding Tests: You are really missed this class 
`test/src/org/apache/jmeter/assertions/TestJSONPathAssertion.java` 


---


[GitHub] jmeter pull request #344: Migrate JSON Path Assertion into JMeter core

2017-11-29 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/344

Migrate JSON Path Assertion into JMeter core



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter donate-json-assertion

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/344.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #344


commit bb4a2f46b64073726d3224fc8d6f791604f8109f
Author: Artem Fedorov 
Date:   2017-11-29T14:03:35Z

add JSONPAthAssertion class

commit e058138654fc9832aa899ca9033dc998a7264d5e
Author: Artem Fedorov 
Date:   2017-11-29T14:03:50Z

add JSONPathAssertionGui class

commit 28903c3ddd6aaa515e283c109fb12b07ce0aa7e9
Author: Artem Fedorov 
Date:   2017-11-29T14:04:00Z

add tests classes

commit 0e327c996270e9ac0318326523b45a015916381a
Author: Artem Fedorov 
Date:   2017-11-29T14:04:14Z

add message properties

commit 1a0588c767d5aaa9a6a9c6fc1b243249e6800d4a
Author: Artem Fedorov 
Date:   2017-11-29T14:04:31Z

add saveService properties

commit 5d4582090984d20a0e40f6bea611814bb26bf500
Author: Artem Fedorov 
Date:   2017-11-29T14:05:12Z

add html docs

commit 9c3a6283db1773bf7694954676ac8d44e6de2cc4
Author: Artem Fedorov 
Date:   2017-11-29T14:05:28Z

add xdocs

commit cb6411c9fb39a211521df02066be1170b730a92a
Author: Artem Fedorov 
Date:   2017-11-29T14:17:45Z

add changelog




---


[GitHub] jmeter pull request #338: Fix main frame position

2017-11-23 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/338

Fix main frame position

1) Move JMeter window at the top the stacking order of any other windows. 
(Before: after start JMeter this window can be located under another window)
2) Show JMeter window relative to default graphics device with relative 
size to it. (Problem now is if you have 2 monitors JMeter shows main frame with 
dimension relative to summary screen resolution. For example 2 monitors 
1920x1080 are summarized to 3840x1080 and JMeter window width will be 80% from 
3840)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter fix/show-main-frame

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/338.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #338


commit 12fb8670e4bb81f8d035365dc9688c9f4f739ff4
Author: Artem Fedorov 
Date:   2017-11-23T09:13:29Z

fix main frame position

commit aaee0a5b18e66c89abc5a027c7abf21b91983487
Author: Artem Fedorov 
Date:   2017-11-23T09:22:57Z

fix changes




---


[GitHub] jmeter pull request #330: Remove Workbench

2017-11-14 Thread artem-fedorov
GitHub user artem-fedorov opened a pull request:

https://github.com/apache/jmeter/pull/330

Remove Workbench

https://bz.apache.org/bugzilla/show_bug.cgi?id=61591

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/artem-fedorov/jmeter drop-workbench

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/330.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #330


commit a44559f3d132130a3c75bcad51ee6d5f83c8cf94
Author: Artem Fedorov 
Date:   2017-11-15T07:19:14Z

drop workbench




---


Re: Workbench : Let's drop it ?

2017-11-14 Thread Artem Fedorov
I attached patch in this bug:
https://bz.apache.org/bugzilla/show_bug.cgi?id=61591


On Sun, Nov 12, 2017 at 4:05 PM, Ralf Roeber  wrote:

> I use the workbench for recording.
> I propose to add recording information to documentation about workbench.
> I propose to rename workbench to "temporary elements"
>
> -0
>
> El 12 nov. 2017 1:33 p. m., "Felix Schumacher" <
> felix.schumac...@internetallee.de> escribió:
>
>
>
> Am 10. November 2017 16:07:39 MEZ schrieb Philippe Mouawad <
> philippe.moua...@gmail.com>:
> >If we look at consensus, we have:
> >
> >  - 3 (+1) to remove it (Maxime, Antonio and me) with favor to move the
> >elements inside Test plan as disabled (so backward compat). If we have
> >a PR
> >or patch that does that, I'll merge it after testing as much as
> >possible.
> > - 1 (-1) or (0) for sebb, do you agree sebb ? what would be your exact
> >   position ?
> >
> >
> >@Felix, @Milamber, @Vladimir,@Graham, @Mikhail , any thoughts on this ?
>
> I only use the workbench for the recorder and the mirror server. If I can
> place them somewhere else, I personally would be fine with removal of
> workbench.
>
> But I understand sebb's concerns.
>
> So it is a weak +1 from me.
>
> Felix
> >
> >
> >
> >Thanks
> >
> >On Fri, Nov 10, 2017 at 4:01 PM, Andrey Pokhilko  wrote:
> >
> >> I don't see any point for Workbench to exist. Simply disabling
> >elements
> >> in-place makes them temporary stored anywhere in test plan.
> >>
> >> Do we have a decision to remote it or not? I don't want to spend
> >> resources if we don't have consensus.
> >>
> >> Andrey Pokhilko
> >>
> >> 09.11.2017 13:41, sebb пишет:
> >> > Why not consider how to make the Workbench more intuitive and
> >useful?
> >> >
> >> > On 8 November 2017 at 16:47, Philippe Mouawad
> >> >  wrote:
> >> >> As you say, it’s oddity.
> >> >> A tool should be intuitive, this part is not, we cannot always
> >say,
> >> rtfm.
> >> >> You know that lot of people don’t read docs.
> >> >>
> >> >> Let’s try and see if it is that complex.
> >> >>
> >> >> We shouldn’t say , we cannot touch, JMeter is not legacy, so we
> >touch ,
> >> >> break then fix .
> >> >>
> >> >> Regards
> >> >>
> >> >> On Wednesday, November 8, 2017, sebb  wrote:
> >> >>
> >> >>> On 8 November 2017 at 16:18, Philippe Mouawad
> >> >>> > wrote:
> >> >>>> Hello,
> >> >>>> I’d say Test Plan.
> >> >>>> I suggest testcompiler ignores them
> >> >>> That would involve a lot of testing to ensure nothing broke.
> >> >>>
> >> >>> Are you sure it's worth it?
> >> >>>
> >> >>> There have been other instances where what seems to be a minor
> >change
> >> >>> turns out to be far more intrusive than first expected.
> >> >>> Dropping Workbench seems like such a case to me; it's been part
> >of
> >> >>> JMeter for so long that there are bound to be lots of places that
> >> >>> assume it is present.
> >> >>>
> >> >>> I agree that the Workbench is a bit of an oddity, but I think
> >removing
> >> >>> it is going to prove much more of a headache than improving the
> >> >>> documentation to explain it better.
> >> >>> And potentially find more uses for it.
> >> >>>
> >> >>>> Regards
> >> >>>>
> >> >>>> On Wednesday, November 8, 2017, Artem Fedorov <
> >> >>> artem.fedo...@blazemeter.com >
> >> >>>> wrote:
> >> >>>>
> >> >>>>> Hello,
> >> >>>>>
> >> >>>>> If we dropped WorkBench, in which element we can add Non-Test
> >> Elements
> >> >>>>> (HTTP Mirror Server, HTTP(S) Test Script Recorder, Property
> >Display)?
> >> >>>>> Can we add these Non-Test Elements to Test Plan (root) or Test
> >> Fragment?
> >> >>>>>
> >> >>>>> Thanks
> >> >>>>>
> >> >>>>> <https://

Re: Workbench : Let's drop it ?

2017-11-08 Thread Artem Fedorov
Hello,

If we dropped WorkBench, in which element we can add Non-Test Elements
(HTTP Mirror Server, HTTP(S) Test Script Recorder, Property Display)?
Can we add these Non-Test Elements to Test Plan (root) or Test Fragment?

Thanks


Без
вирусов. www.avast.ru

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, Nov 8, 2017 at 4:41 PM, Philippe Mouawad  wrote:

> Great !
>
> On Wed, Nov 8, 2017 at 2:38 PM, Andrey Pokhilko  wrote:
>
> > FYI BlazeMeter will attempt to implement this change and contribute it.
> >
> > Andrey Pokhilko
> >
> > 04.11.2017 17:06, Andrey Pokhilko пишет:
> > > I'll need to think about it.
> > >
> > > Andrey Pokhilko
> > >
> > > 04.11.2017 17:01, Philippe Mouawad пишет:
> > >> On Sat, Nov 4, 2017 at 2:52 PM, Andrey Pokhilko  wrote:
> > >>
> > >>> +1 from me, I think it is possible to automatically move elements
> from
> > >>> loaded test plans.
> > >>>
> > >> Do you have some time to contribute a patch for this if you think it's
> > >> needed ?
> > >>
> > >>> Andrey Pokhilko
> > >>>
> > >>> 04.11.2017 15:18, Maxime Chassagneux пишет:
> >  Hi,
> > 
> >  I never use it, except for recording script, so +1 for me.
> > 
> >  Regards
> > 
> >  2017-11-04 13:07 GMT+01:00 Philippe Mouawad <
> > philippe.moua...@gmail.com
> >  :
> > 
> > > Hello,
> > > Workbench element is confusing for beginners who don't understand
> > > clearly its use.
> > >
> > > Thinking more about it, I don't see today why we should still keep
> > it.
> > >
> > > The only advantage of this element is Non Test Elements which would
> > > be made available from Test Plan directly.
> > > When running a test those element would not impact test plan.
> > >
> > > The only issue is backward compatibility, should we try to move
> > >>> elements in
> > > workbench under test plan or just mention a backward
> incompatibility.
> > >
> > > Users would manually move there elements to Test Plan.
> > >
> > > Regards
> > >
> >
> >
>
>
> --
> Cordialement.
> Philippe Mouawad.
>


Support WebDriver pluign in JMeter 3.2

2017-03-13 Thread Artem Fedorov
Hello,

I am testing jmeter-plugins with JMeter 3.2 and find some problem with Selenium
Web Driver .

This Driver use org.apache.jmeter.util.JSR223BeanInfoSupport.LANGUAGE_NAMES

but
now it is a private field. With this exception will be fail to creating
popupMenu in TestPlanGui.

Can you make this field public?

Thanks,
Artem


Rotating JTL file writer

2017-02-16 Thread Artem Fedorov
Hello,

I want to write into JTL file a lot of data (about 50 megabytes per a
second). This file takes a lot of space on hard drive and fails tests
because of "Not enough space" errors.

I wrote a feature, that allows writing sequence of files, limited by number
of samples per file. This enables recorded file to be handled in some
background process, archived/deleted for saving free space. File names form
sequence like "result.jtl => result.1.jtl => result.2.jtl".

I made it as a subclass of ResultCollector, but it might be worth including
this as core feature of ResultCollector class.

Do you think this feature is worth including into ResultCollector? Or
should I keep it as standalone plugin for JMeter?

Thanks,
Artem