Re: ApacheJMeter_parent.pom test dependencies

2017-11-25 Thread Graham Russell
Yes, you might be right. It would make sense to add them to the test scope
if this doesn't break the maven release as they shouldn't be part of any
release.

On Sat, 25 Nov 2017 at 17:30 Philippe Mouawad 
wrote:

> Hello,
> I am wondering if we don't have an issue with our dependencies:
>
> Shouldn't those ones be in scope test:
> spock-core
> hamcrest-core
> hamcrest-date
> objenesis
> cglib-nodep
>
> --
> Regards.
> Philippe
>


[GitHub] jmeter issue #332: Added Spock framework and some tests, both old and new

2017-11-25 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/332
  
Thank you for merging!


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153054513
  
--- Diff: src/functions/org/apache/jmeter/functions/ChangeCase.java ---
@@ -127,19 +129,14 @@ public String getReferenceKey() {
 return DESC;
 }
 
-private static String camel(String str, boolean isFirstCapitalized) {
-StringBuilder builder = new StringBuilder(str.length());
-String[] tokens = NOT_ALPHANUMERIC_REGEX.split(str);
-for (int i = 0; i < tokens.length; i++) {
-String lowerCased = StringUtils.lowerCase(tokens[i]);
-if(i == 0) {
-builder.append(isFirstCapitalized ? 
StringUtils.capitalize(lowerCased):
-lowerCased);
-} else {
-builder.append(StringUtils.capitalize(lowerCased));
-}
+private static String camel(String input, boolean uncapitalizeFirst) {
+List tokens = 
Arrays.asList(SPLIT_CHARS.split(input)).stream()
+.filter(s -> 
!s.isEmpty()).map(StringUtils::lowerCase).map(StringUtils::capitalize)
--- End diff --

I generally prefer each item on a new line - I had to read this line twice 
as I missed the map in the middle on first pass, whereas I think:
```java
.filter(StringUtils::isNotEmpty)
.map(StringUtils::lowerCase)
.map(StringUtils::capitalize)
```
is just that bit easier to read and doesn't get in the way of comprehending 
the code.


---


[GitHub] jmeter issue #341: Test isIgnore after post processor and assertions

2017-11-25 Thread FSchumacher
Github user FSchumacher commented on the issue:

https://github.com/apache/jmeter/pull/341
  
I wonder, whether instead of or additionally to the new `setIgnore` method, 
we should add and expose a `setMetadata(type, content)` method.
I believe it would be useful for example to:
* mark samples to be ignored by listeners and such
* use the information later on to group by (a use case would be to group by 
some user given metadata in the view results tree)


---


Jenkins build is back to normal : JMeter Windows #912

2017-11-25 Thread Apache Jenkins Server
See 




Build failed in Jenkins: JMeter Windows #911

2017-11-25 Thread Apache Jenkins Server
See 


Changes:

[fschumacher] More unit tests and a bit of simplification plus removal of 
useless javadoc.

This closes #332 from github
Contributed by Graham Russell

--
[...truncated 189.66 KB...]
   [jmeter] summary +  1 in 00:00:30 =0.0/s Avg: 30116 Min: 30116 Max: 
30116 Err: 0 (0.00%) Active: 1 Started: 2 Finished: 1
   [jmeter] summary =  2 in 00:00:31 =0.1/s Avg: 15322 Min:   528 Max: 
30116 Err: 0 (0.00%)
   [jmeter] summary =  2 in 00:00:31 =0.1/s Avg: 15322 Min:   528 Max: 
30116 Err: 0 (0.00%)
   [jmeter] Tidying up ...@ Sat Nov 25 17:53:33 UTC 2017 (1511632413226)
   [jmeter] ... end of run
 [echo] Bug60607 output files compared OK

batchtest:
 [echo] Starting SlowCharsFeature_HttpClient4 with file 
SlowCharsFeature.jmx using -X -Jdummy=dummy
   [jmeter] SLF4J: Class path contains multiple SLF4J bindings.
   [jmeter] SLF4J: Found binding in 
[jar:file:/F:/jenkins/jenkins-slave/workspace/JMeter%20Windows/trunk/lib/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [jmeter] SLF4J: Found binding in 
[jar:file:/F:/jenkins/jenkins-slave/workspace/JMeter%20Windows/trunk/lib/opt/activemq-all-5.15.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [jmeter] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
explanation.
   [jmeter] SLF4J: Actual binding is of type 
[org.apache.logging.slf4j.Log4jLoggerFactory]
   [jmeter] Nov 25, 2017 5:53:37 PM java.util.prefs.WindowsPreferences 
   [jmeter] Creating summariser 
   [jmeter] Created the tree successfully using testfiles/SlowCharsFeature.jmx
   [jmeter] WARNING: Could not open/create prefs root node 
Software\JavaSoft\Prefs at root 0x8002. Windows RegCreateKeyEx(...) 
returned error code 5.
   [jmeter] Starting the test @ Sat Nov 25 17:53:37 UTC 2017 (1511632417494)
   [jmeter] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 
4445
   [jmeter] summary =  3 in 00:00:19 =0.2/s Avg:  6062 Min:   763 Max: 
11501 Err: 0 (0.00%)
   [jmeter] Tidying up ...@ Sat Nov 25 17:53:57 UTC 2017 (1511632437114)
   [jmeter] ... end of run
 [echo] SlowCharsFeature_HttpClient4 output files compared OK

batchtest:
 [echo] Starting SlowCharsFeature_Java with file SlowCharsFeature.jmx using 
-X -Jjmeter.httpsampler=Java
   [jmeter] SLF4J: Class path contains multiple SLF4J bindings.
   [jmeter] SLF4J: Found binding in 
[jar:file:/F:/jenkins/jenkins-slave/workspace/JMeter%20Windows/trunk/lib/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [jmeter] SLF4J: Found binding in 
[jar:file:/F:/jenkins/jenkins-slave/workspace/JMeter%20Windows/trunk/lib/opt/activemq-all-5.15.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [jmeter] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
explanation.
   [jmeter] SLF4J: Actual binding is of type 
[org.apache.logging.slf4j.Log4jLoggerFactory]
   [jmeter] Nov 25, 2017 5:54:01 PM java.util.prefs.WindowsPreferences 
   [jmeter] WARNING: Could not open/create prefs root node 
Software\JavaSoft\Prefs at root 0x8002. Windows RegCreateKeyEx(...) 
returned error code 5.
   [jmeter] Creating summariser 
   [jmeter] Created the tree successfully using testfiles/SlowCharsFeature.jmx
   [jmeter] Starting the test @ Sat Nov 25 17:54:01 UTC 2017 (1511632441432)
   [jmeter] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 
4445
   [jmeter] summary +  1 in 00:00:01 =1.2/s Avg:   792 Min:   792 Max:  
 792 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0
   [jmeter] summary +  1 in 00:00:12 =0.1/s Avg: 12000 Min: 12000 Max: 
12000 Err: 0 (0.00%) Active: 0 Started: 1 Finished: 1
   [jmeter] summary =  2 in 00:00:13 =0.2/s Avg:  6396 Min:   792 Max: 
12000 Err: 0 (0.00%)
   [jmeter] Tidying up ...@ Sat Nov 25 17:54:15 UTC 2017 (1511632455627)
   [jmeter] ... end of run
 [echo] SlowCharsFeature_Java output files compared OK

batchtest:
 [echo] Starting Http4ImplPreemptiveBasicAuth with file 
Http4ImplPreemptiveBasicAuth.jmx using -X -Jdummy=dummy
   [jmeter] SLF4J: Class path contains multiple SLF4J bindings.
   [jmeter] SLF4J: Found binding in 
[jar:file:/F:/jenkins/jenkins-slave/workspace/JMeter%20Windows/trunk/lib/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [jmeter] SLF4J: Found binding in 
[jar:file:/F:/jenkins/jenkins-slave/workspace/JMeter%20Windows/trunk/lib/opt/activemq-all-5.15.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
   [jmeter] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
explanation.
   [jmeter] SLF4J: Actual binding is of type 
[org.apache.logging.slf4j.Log4jLoggerFactory]
   [jmeter] Nov 25, 2017 5:54:19 PM java.util.prefs.WindowsPreferences 
   [jmeter] WARNING: Could not open/create prefs root node 
Software\JavaSoft\Prefs at r

ApacheJMeter_parent.pom test dependencies

2017-11-25 Thread Philippe Mouawad
Hello,
I am wondering if we don't have an issue with our dependencies:

Shouldn't those ones be in scope test:
spock-core
hamcrest-core
hamcrest-date
objenesis
cglib-nodep

-- 
Regards.
Philippe


[GitHub] jmeter issue #332: Added Spock framework and some tests, both old and new

2017-11-25 Thread FSchumacher
Github user FSchumacher commented on the issue:

https://github.com/apache/jmeter/pull/332
  
Thanks for your contribution.


---


[GitHub] jmeter pull request #332: Added Spock framework and some tests, both old and...

2017-11-25 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153049075
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * 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.functions;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.jmeter.engine.util.CompoundVariable;
+import org.apache.jmeter.functions.ChangeCase.ChangeCaseMode;
+import org.apache.jmeter.junit.JMeterTestCase;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.hamcrest.CoreMatchers;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class TestChangeCaseExamples extends JMeterTestCase {
+
+@Parameters
+public static Collection data() {
+return Arrays.asList(new Object[][] { { " spaces before and after 
",
+new String[] { " SPACES BEFORE AND AFTER ",
--- End diff --

I agree.

See the PR for an example in `HTTPUtilsSpec` (and smaller examples in a few 
of the other tests).


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread FSchumacher
Github user FSchumacher commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153048358
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * 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.functions;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.jmeter.engine.util.CompoundVariable;
+import org.apache.jmeter.functions.ChangeCase.ChangeCaseMode;
+import org.apache.jmeter.junit.JMeterTestCase;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.hamcrest.CoreMatchers;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class TestChangeCaseExamples extends JMeterTestCase {
+
+@Parameters
+public static Collection data() {
+return Arrays.asList(new Object[][] { { " spaces before and after 
",
+new String[] { " SPACES BEFORE AND AFTER ",
--- End diff --

This would be a perfect showcase for spock, don't you think?


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread FSchumacher
Github user FSchumacher commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153048353
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * 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.functions;
+
+import static org.junit.Assert.*;
--- End diff --

Right, but we don't enforce it yet and there are more in our test code base.

I will have a look at my eclipse settings.


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153048260
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * 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.functions;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.jmeter.engine.util.CompoundVariable;
+import org.apache.jmeter.functions.ChangeCase.ChangeCaseMode;
+import org.apache.jmeter.junit.JMeterTestCase;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.hamcrest.CoreMatchers;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class TestChangeCaseExamples extends JMeterTestCase {
+
+@Parameters
+public static Collection data() {
+return Arrays.asList(new Object[][] { { " spaces before and after 
",
+new String[] { " SPACES BEFORE AND AFTER ",
--- End diff --

One per line or all on one line would make this easier to read, also a 
comment regarding which mode corresponds to which position would be helpful for 
future reference (if/when it changes).


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153048235
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * 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.functions;
+
+import static org.junit.Assert.*;
--- End diff --

No `*` imports :)


---


[GitHub] jmeter issue #342: More edge cases for changeCase function and slight behavi...

2017-11-25 Thread codecov-io
Github user codecov-io commented on the issue:

https://github.com/apache/jmeter/pull/342
  
# [Codecov](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=h1) 
Report
> Merging 
[#342](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=desc) into 
[trunk](https://codecov.io/gh/apache/jmeter/commit/59f75bb89c37d265eaf74e309b27918d7c7750d7?src=pr&el=desc)
 will **increase** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree 
graph](https://codecov.io/gh/apache/jmeter/pull/342/graphs/tree.svg?token=6Q7CI1wFSh&src=pr&width=650&height=150)](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=tree)

```diff
@@ Coverage Diff  @@
##  trunk #342  +/-   ##

+ Coverage 57.89%   57.91%   +0.01% 
- Complexity1002410032   +8 

  Files  1146 1147   +1 
  Lines 7376273790  +28 
  Branches   7327 7329   +2 

+ Hits  4270842734  +26 
- Misses2857628577   +1 
- Partials   2478 2479   +1
```


| [Impacted 
Files](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=tree) | Coverage 
Δ | Complexity Δ | |
|---|---|---|---|
| 
[...rc/org/apache/jmeter/functions/TestChangeCase.java](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvZnVuY3Rpb25zL1Rlc3RDaGFuZ2VDYXNlLmphdmE=)
 | `94% <100%> (ø)` | `13 <0> (ø)` | :arrow_down: |
| 
[...pache/jmeter/functions/TestChangeCaseExamples.java](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvZnVuY3Rpb25zL1Rlc3RDaGFuZ2VDYXNlRXhhbXBsZXMuamF2YQ==)
 | `100% <100%> (ø)` | `7 <7> (?)` | |
| 
[...ctions/org/apache/jmeter/functions/ChangeCase.java](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=tree#diff-c3JjL2Z1bmN0aW9ucy9vcmcvYXBhY2hlL2ptZXRlci9mdW5jdGlvbnMvQ2hhbmdlQ2FzZS5qYXZh)
 | `98.43% <100%> (+0.1%)` | `19 <1> (+1)` | :arrow_up: |
| 
[...ocol/jms/org/apache/jmeter/protocol/jms/Utils.java](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=tree#diff-c3JjL3Byb3RvY29sL2ptcy9vcmcvYXBhY2hlL2ptZXRlci9wcm90b2NvbC9qbXMvVXRpbHMuamF2YQ==)
 | `54.83% <0%> (-2.16%)` | `15% <0%> (ø)` | |
| 
[...apache/jmeter/extractor/TestBoundaryExtractor.java](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvZXh0cmFjdG9yL1Rlc3RCb3VuZGFyeUV4dHJhY3Rvci5qYXZh)
 | `97.88% <0%> (ø)` | `17% <0%> (ø)` | :arrow_down: |

--

[Continue to review full report at 
Codecov](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=continue).
> **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute  (impact)`, `ø = not affected`, `? = missing 
data`
> Powered by 
[Codecov](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=footer). Last 
update 
[59f75bb...3d576bf](https://codecov.io/gh/apache/jmeter/pull/342?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).



---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread FSchumacher
GitHub user FSchumacher opened a pull request:

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

More edge cases for changeCase function and slight behaviour changes.

## Description
Addition of more examples to test with the different change case modes.
We now really split on all non alpha numeric characters - even unicode ones.
The input strings for the camel case modes get trimmed before further 
actions.

A further question is, whether we should trim the input in the other modes 
as well?
For example "` space in front`" + `capitalize` = "`Space in front`" or "` 
space in front`"?


## Motivation and Context
The handling of whitespace and other non alphanumeric characters was not 
well defined.

## How Has This Been Tested?
unit tests are added and run

## Screenshots (if appropriate):

## Types of changes
- Bug fix (non-breaking change which fixes an issue)

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


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

$ git pull https://github.com/FSchumacher/jmeter camel-case-examples

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

https://github.com/apache/jmeter/pull/342.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 #342


commit 3d576bfca9eb2503f7ba04c083f7e3d9167751b9
Author: Felix Schumacher 
Date:   2017-11-25T13:47:53Z

More edge cases for changeCase function and slight behaviour changes.

Addition of more examples to test with the different change case modes.
We now really split on all non alpha numeric characters - even unicode ones.
The input strings for the camel case modes get trimmed before further 
actions.




---


Re: svn commit: r1816194 - /jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java

2017-11-25 Thread Philippe Mouawad
ok for me Felix

On Saturday, November 25, 2017, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

> Am 23.11.2017 um 23:27 schrieb pmoua...@apache.org:
>
>> Author: pmouawad
>> Date: Thu Nov 23 22:27:35 2017
>> New Revision: 1816194
>>
>> URL: http://svn.apache.org/viewvc?rev=1816194&view=rev
>> Log:
>> Refactored TestChangeCase
>> Contributed by Graham Russell (@ham1)
>> This closes #339
>>
>> Modified:
>>  jmeter/trunk/test/src/org/apache/jmeter/functions/TestChang
>> eCase.java
>>
>> Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestChange
>> Case.java
>> URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apach
>> e/jmeter/functions/TestChangeCase.java?rev=1816194&r1=
>> 1816193&r2=1816194&view=diff
>> 
>> ==
>> --- jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java
>> (original)
>> +++ jmeter/trunk/test/src/org/apache/jmeter/functions/TestChangeCase.java
>> Thu Nov 23 22:27:35 2017
>> @@ -20,8 +20,10 @@ package org.apache.jmeter.functions;
>>
>>
>
> ...
>
>   @Test
>>   public void testChangeCaseCamelCaseFirstLowerWithFirstUpperCaseChar()
>> throws Exception {
>> -params.add(new CompoundVariable("Ab-CD eF"));
>> -params.add(new CompoundVariable("lower_CAMEL_CASE"));
>> -changeCase.setParameters(params);
>> -String returnValue = changeCase.execute(result, null);
>> +String returnValue = execute("Ab-CD eF", "lower_CAMEL_CASE");
>>   assertEquals("abCdEf", returnValue);
>> -
>> -params.clear();
>> -params.add(new CompoundVariable(" zadad"));
>> -params.add(new CompoundVariable("lower_CAMEL_CASE"));
>> -changeCase.setParameters(params);
>> -returnValue = changeCase.execute(result, null);
>> +
>> +returnValue = execute(" zadad", "lower_CAMEL_CASE");
>>   assertEquals("Zadad", returnValue);
>>
>
> Is "Zadad" really the expected result for "[SPACE]zadad" in lower camel
> case?
>
> I would prefer to trim the input before conversion, so that we would get
> "zadad" in this case.
>
> Felix
>
>
>>
>
>

-- 
Cordialement.
Philippe Mouawad.


Jenkins build is back to normal : JMeter-trunk #6502

2017-11-25 Thread Apache Jenkins Server
See 




buildbot success in on jmeter-trunk

2017-11-25 Thread buildbot
The Buildbot has detected a restored build on builder jmeter-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/jmeter-trunk/builds/3271

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-jmeter-commit' 
triggered this build
Build Source Stamp: [branch jmeter/trunk] 1816280
Blamelist: fschumacher

Build succeeded!

Sincerely,
 -The Buildbot





Build failed in Jenkins: JMeter-trunk #6501

2017-11-25 Thread Apache Jenkins Server
See 


Changes:

[fschumacher] Update groovy-all to 2.4.13

--
[...truncated 135.38 KB...]
  [javadoc] Loading source files for package org.apache.jmeter.functions.gui...
  [javadoc] Loading source files for package org.apache.jmeter.gui...
  [javadoc] Loading source files for package org.apache.jmeter.gui.action...
  [javadoc] Loading source files for package 
org.apache.jmeter.gui.action.impl...
  [javadoc] Loading source files for package 
org.apache.jmeter.gui.action.template...
  [javadoc] Loading source files for package 
org.apache.jmeter.gui.action.thinktime...
  [javadoc] Loading source files for package 
org.apache.jmeter.gui.action.validation...
  [javadoc] Loading source files for package org.apache.jmeter.gui.logging...
  [javadoc] Loading source files for package org.apache.jmeter.gui.plugin...
  [javadoc] Loading source files for package org.apache.jmeter.gui.tree...
  [javadoc] Loading source files for package org.apache.jmeter.gui.util...
  [javadoc] Loading source files for package org.apache.jmeter.plugin...
  [javadoc] Loading source files for package org.apache.jmeter.processor...
  [javadoc] Loading source files for package org.apache.jmeter.processor.gui...
  [javadoc] Loading source files for package org.apache.jmeter.report.config...
  [javadoc] Loading source files for package org.apache.jmeter.report.core...
  [javadoc] Loading source files for package 
org.apache.jmeter.report.dashboard...
  [javadoc] Loading source files for package 
org.apache.jmeter.report.processor...
  [javadoc] Loading source files for package 
org.apache.jmeter.report.processor.graph...
  [javadoc] Loading source files for package 
org.apache.jmeter.report.processor.graph.impl...
  [javadoc] Loading source files for package org.apache.jmeter.reporters...
  [javadoc] Loading source files for package org.apache.jmeter.reporters.gui...
  [javadoc] Loading source files for package org.apache.jmeter.samplers...
  [javadoc] Loading source files for package org.apache.jmeter.samplers.gui...
  [javadoc] Loading source files for package org.apache.jmeter.save...
  [javadoc] Loading source files for package 
org.apache.jmeter.save.converters...
  [javadoc] Loading source files for package org.apache.jmeter.services...
  [javadoc] Loading source files for package org.apache.jmeter.swing...
  [javadoc] Loading source files for package org.apache.jmeter.testbeans...
  [javadoc] Loading source files for package org.apache.jmeter.testbeans.gui...
  [javadoc] Loading source files for package org.apache.jmeter.testelement...
  [javadoc] Loading source files for package 
org.apache.jmeter.testelement.property...
  [javadoc] Loading source files for package org.apache.jmeter.threads...
  [javadoc] Loading source files for package org.apache.jmeter.threads.gui...
  [javadoc] Loading source files for package org.apache.jmeter.timers...
  [javadoc] Loading source files for package org.apache.jmeter.timers.gui...
  [javadoc] Loading source files for package org.apache.jmeter.util...
  [javadoc] Loading source files for package org.apache.jmeter.util.keystore...
  [javadoc] Loading source files for package org.apache.jmeter.visualizers...
  [javadoc] Loading source files for package 
org.apache.jmeter.visualizers.backend...
  [javadoc] Loading source files for package 
org.apache.jmeter.visualizers.gui...
  [javadoc] Loading source files for package org.apache.jmeter.extractor...
  [javadoc] Loading source files for package org.apache.jmeter.extractor.gui...
  [javadoc] Loading source files for package 
org.apache.jmeter.extractor.json.jsonpath...
  [javadoc] Loading source files for package 
org.apache.jmeter.extractor.json.jsonpath.gui...
  [javadoc] Loading source files for package 
org.apache.jmeter.extractor.json.render...
  [javadoc] Loading source files for package org.apache.jmeter.modifiers...
  [javadoc] Loading source files for package org.apache.jmeter.modifiers.gui...
  [javadoc] Loading source files for package org.apache.jmeter.sampler...
  [javadoc] Loading source files for package org.apache.jmeter.sampler.gui...
  [javadoc] Loading source files for package org.apache.jmeter.thinktime...
  [javadoc] Loading source files for package org.apache.jmeter.validation...
  [javadoc] Loading source files for package 
org.apache.jmeter.visualizers.backend.graphite...
  [javadoc] Loading source files for package 
org.apache.jmeter.visualizers.backend.influxdb...
  [javadoc] Loading source files for package 
org.apache.jmeter.visualizers.utils...
  [javadoc] Loading source files for package 
org.apache.jmeter.protocol.http.config...
  [javadoc] Loading source files for package 
org.apache.jmeter.protocol.http.config.gui...
  [javadoc] Loading source files for package 
org.apache.jmeter.protocol.http.control...
  [javadoc] Loading source files for package 
org.apache.jmeter.protocol.http.control.gui...
  [ja

Re: svn commit: r1816008 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/ src/core/org/apache/jmeter/threads/ src/functions/org/apache/jmeter/functions/ src/protocol/http/org/apache/jmeter/protocol

2017-11-25 Thread Felix Schumacher

Am 23.11.2017 um 12:30 schrieb Felix Schumacher:

Am 23.11.2017 12:04, schrieb Milamber:

neon.3


Strange. If I read 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=206345 correctly, this 
was a bug in eclipse, but should be fixed with newer releases.


I have testet with neon.1 (I believe it was 1a)


Actually I had checked with oxygen 1.a, which is newer than neon and 
doesn't show this behaviour. So I think that warning was a false 
positive from an old eclipse version and will revert the changes.


Felix


I still think, that multiline @code tags are valid and this is a false 
positive from eclipse.
I haven't found an official statement on multiline inline tags in 
javadoc, though.


Felix



Le 23 nov. 2017 11:04, "Milamber"  a écrit :


neon.3

Le 23 nov. 2017 11:02, "Felix Schumacher"  a écrit :




Am 23. November 2017 07:59:39 MEZ schrieb Milamber 
:

>
>
>On 22/11/2017 20:00, Felix Schumacher wrote:
>> Am 22.11.2017 um 19:13 schrieb Milamber:
>>>
>>>
>>> On 22/11/2017 16:17, Felix Schumacher wrote:

 Am 22. November 2017 10:43:09 MEZ schrieb Milamber
 :
>
> On 22/11/2017 08:18, Felix Schumacher wrote:
>> Am 22. November 2017 08:53:54 MEZ schrieb milam...@apache.org:
>>> Author: milamber
>>> Date: Wed Nov 22 07:53:54 2017
>>> New Revision: 1816008
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1816008&view=rev
>>> Log:
>>> Fix some javadoc issues
>>>
>>> Modified:
>>> jmeter/trunk/src/core/org/apache/jmeter/gui/GuiPackage.java
> Modified:
>>>
>jmeter/trunk/src/functions/org/apache/jmeter/functions/CSVRead.java
>>> URL:
>>>
>
>http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org
/apache/jmeter/functions/CSVRead.java?rev=1816008&r1=1816007
&r2=1816008&view=diff
>
>
>
>===
===
>
>
>>> ---
>
>jmeter/trunk/src/functions/org/apache/jmeter/functions/CSVRead.java
>>> (original)
>>> +++
>
>jmeter/trunk/src/functions/org/apache/jmeter/functions/CSVRead.java
>>> Wed Nov 22 07:53:54 2017
>>> @@ -35,11 +35,11 @@ import org.slf4j.LoggerFactory;
>>> * line-thru the data in the CSV file - one line per each test.
>E.g.
>>> inserting
>>>    * the following in the test scripts :
>>>    *
>>> - * {@code
>>> + * {@code}
>> Are you sure the closing bracket is correct here?
> It's was a warning from eclipse...
 Which version of Java did your workspace use?
>>>
>>> Java 8
>>
>> Strange. I didn't get any warnings. But now - with the current 
code -

>
>> I get a warning about {@code}: "Description expected after @code"
>>
>> What warning did you get?
>
> From Eclipse check: Javadoc: Missing closing brace for inline tag

Which version of eclipse do you use?

>
>
>>
>> Felix
>>>
>>>

 Felix

>
>>> * ${__CSVRead(c:/BOF/abcd.csv,0)} // read (first) line of
>>> 'c:/BOF/abcd.csv' ,
>>> - * return the 1st column ( represented by the 
'0'),

>>> + * return the 1st column (represented by the '0'),
>> Is the sup doing any harm?
>>
>>> * ${__CSVRead(c:/BOF/abcd.csv,1)} // read (first) line of
>>> 'c:/BOF/abcd.csv' ,
>>> - * return the 2nd column ( represented by the 
'1'),

>>> + * return the 2nd column (represented by the '1'),
>>> * ${__CSVRead(c:/BOF/abcd.csv,next())} // Go to next line of
>>> 'c:/BOF/abcd.csv'
>>>    * }
>>> * NOTE: A single instance of each different file is opened and
>used
> for
>>> all
>>>





buildbot failure in on jmeter-trunk

2017-11-25 Thread buildbot
The Buildbot has detected a new failure on builder jmeter-trunk while building 
. Full details are available at:
https://ci.apache.org/builders/jmeter-trunk/builds/3269

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: bb_slave1_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-jmeter-commit' 
triggered this build
Build Source Stamp: [branch jmeter/trunk] 1816278
Blamelist: fschumacher

BUILD FAILED: failed shell_3

Sincerely,
 -The Buildbot