You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by ham1 <gi...@git.apache.org> on 2017/11/19 11:05:18 UTC

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

GitHub user ham1 opened a pull request:

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

    Added Spock framework and some tests, both old and new

    ## Description
    WIP for adding Spock to JMeter. Created some new tests and translated some old ones.
    
    ## Motivation and Context
    See the Mocking Framework email thread: http://mail-archives.apache.org/mod_mbox/jmeter-dev/201612.mbox/%3c36ce3782-dee8-388c-9539-5bcfb8d5f39a@internetallee.de%3e
    
    ## How Has This Been Tested?
    By running the unit tests ;)
    
    ## Screenshots (if appropriate):
    
    ## Types of changes
    - Dev enhancement
    
    ## Checklist:
    <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
    <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
    - [x] My code follows the [code style][style-guide] of this project.
    - [ ] 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/ham1/jmeter spock

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

    https://github.com/apache/jmeter/pull/332.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 #332
    
----
commit 86cd98eca1c14bd51673f5271ebed376e54e40db
Author: Graham Russell <gr...@ham1.co.uk>
Date:   2017-11-18T17:17:42Z

    Added Spock framework and some tests, both old and new

----


---

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

Posted by ham1 <gi...@git.apache.org>.
Github user ham1 commented on the issue:

    https://github.com/apache/jmeter/pull/332
  
    I've added some more tests:
    * `ApdexSummaryConsumer` and 
    * `ListResultData`
    
    Plus some code tidy up.
    
    Any thoughts?


---

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

Posted by ham1 <gi...@git.apache.org>.
Github user ham1 commented on the issue:

    https://github.com/apache/jmeter/pull/332
  
    Oh, failed due to tabs from isVar/PropDefined function patch.


---

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

Posted by FSchumacher <gi...@git.apache.org>.
Github user FSchumacher commented on the issue:

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


---

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

Posted by pmouawad <gi...@git.apache.org>.
Github user pmouawad commented on the issue:

    https://github.com/apache/jmeter/pull/332
  
    Thanks @ham1 ,
    I will have some time next week to merge it or this week-end.
    If anybody wants to do that before he's welcome.
    Thanks


---

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

Posted by codecov-io <gi...@git.apache.org>.
Github user codecov-io commented on the issue:

    https://github.com/apache/jmeter/pull/332
  
    # [Codecov](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=h1) Report
    > Merging [#332](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=desc) into [trunk](https://codecov.io/gh/apache/jmeter/commit/133fe9a2e2322dab3bd092a105b17172c8d06a94?src=pr&el=desc) will **decrease** coverage by `0.07%`.
    > The diff coverage is `75.14%`.
    
    [![Impacted file tree graph](https://codecov.io/gh/apache/jmeter/pull/332/graphs/tree.svg?src=pr&token=6Q7CI1wFSh&width=650&height=150)](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree)
    
    ```diff
    @@             Coverage Diff              @@
    ##              trunk     #332      +/-   ##
    ============================================
    - Coverage     57.86%   57.79%   -0.08%     
    - Complexity     9994     9998       +4     
    ============================================
      Files          1146     1150       +4     
      Lines         73605    73564      -41     
      Branches       7312     7338      +26     
    ============================================
    - Hits          42594    42517      -77     
    - Misses        28532    28562      +30     
    - Partials       2479     2485       +6
    ```
    
    
    | [Impacted Files](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
    |---|---|---|---|
    | [...st/src/org/apache/jmeter/junit/JMeterTestCase.java](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvanVuaXQvSk1ldGVyVGVzdENhc2UuamF2YQ==) | `30.86% <0%> (-1.19%)` | `10 <0> (ø)` | |
    | [...c/org/apache/jmeter/junit/JMeterTestCaseJUnit.java](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvanVuaXQvSk1ldGVyVGVzdENhc2VKVW5pdC5qYXZh) | `9.67% <0%> (-0.5%)` | `3 <0> (ø)` | |
    | [...rc/org/apache/jmeter/junit/spock/JMeterSpec.groovy](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvanVuaXQvc3BvY2svSk1ldGVyU3BlYy5ncm9vdnk=) | `1.96% <1.96%> (ø)` | `1 <1> (?)` | |
    | [...c/org/apache/jmeter/engine/util/PackageSpec.groovy](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvZW5naW5lL3V0aWwvUGFja2FnZVNwZWMuZ3Jvb3Z5) | `100% <100%> (ø)` | `3 <3> (?)` | |
    | [...t/src/org/apache/jmeter/control/RunTimeSpec.groovy](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvY29udHJvbC9SdW5UaW1lU3BlYy5ncm9vdnk=) | `100% <100%> (ø)` | `4 <4> (?)` | |
    | [...apache/jmeter/timers/UniformRandomTimerSpec.groovy](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvdGltZXJzL1VuaWZvcm1SYW5kb21UaW1lclNwZWMuZ3Jvb3Z5) | `100% <100%> (ø)` | `3 <3> (?)` | |
    | [...meter/protocol/jdbc/sampler/JDBCSamplerSpec.groovy](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvcHJvdG9jb2wvamRiYy9zYW1wbGVyL0pEQkNTYW1wbGVyU3BlYy5ncm9vdnk=) | `100% <100%> (ø)` | `6 <6> (?)` | |
    | [...che/jmeter/protocol/http/util/HTTPUtilsSpec.groovy](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvcHJvdG9jb2wvaHR0cC91dGlsL0hUVFBVdGlsc1NwZWMuZ3Jvb3Z5) | `100% <100%> (ø)` | `6 <6> (?)` | |
    | [...he/jmeter/control/RandomOrderControllerSpec.groovy](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvY29udHJvbC9SYW5kb21PcmRlckNvbnRyb2xsZXJTcGVjLmdyb292eQ==) | `100% <100%> (ø)` | `6 <6> (?)` | |
    | [test/src/org/apache/jmeter/JMeterVersionTest.java](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvSk1ldGVyVmVyc2lvblRlc3QuamF2YQ==) | `76.13% <54.16%> (-0.03%)` | `38 <4> (+5)` | |
    | ... and [18 more](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=tree-more) | |
    
    ------
    
    [Continue to review full report at Codecov](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=continue).
    > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
    > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
    > Powered by [Codecov](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=footer). Last update [133fe9a...5cacd14](https://codecov.io/gh/apache/jmeter/pull/332?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).



---

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

Posted by ham1 <gi...@git.apache.org>.
Github user ham1 commented on the issue:

    https://github.com/apache/jmeter/pull/332
  
    Great, thank you. If someone could merge #337 first then I can make there are no conflicts.


---

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

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

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

Posted by ham1 <gi...@git.apache.org>.
Github user ham1 commented on the issue:

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


---

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

Posted by ham1 <gi...@git.apache.org>.
Github user ham1 commented on the issue:

    https://github.com/apache/jmeter/pull/332
  
    I've fixed any conflicts now.
    
    So far I've migrated and added to:
    * RunTime
    * HTTPUtils
    
    I've added new tests for:
    * UniformRandomTimer
    * JDBCSampler  - however I can't see how to test `sample()` due to  use of the inner class `DataSourceComponenetImpl` inside the `DataSourceElement.getConnection()`
    *  `Top5ErrorsBySamplerConsumer` with some refactoring
    * ` Top5ErrorsBySamplerData` and found a bug and fixed it here and #337 
    
    Codecov hasn't posted again to the PR, but the coverage is now marginally higher: https://codecov.io/gh/apache/jmeter/pull/332
    
    I will try to add some more tests over the next few days if this is useful? 
    
    Also, I don't know much about ant and the way JMeter manages dependencies, so please let me know if there's a better way.


---

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

Posted by pmouawad <gi...@git.apache.org>.
Github user pmouawad commented on the issue:

    https://github.com/apache/jmeter/pull/332
  
    Hi @ham1 ,
    Thanks for this interesting PR.
    There is a conflict in it, could you rebase it as you proposed.
    Also, there is something I don't understand, I see coverage has decreased while you modified some existing tests and added new ones.
    Maybe as a first step, you could only add new tests and not impact existing ones ?
    
    Thank you
    Regards


---