Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Spock framework and some tests, both old and new #332

Closed
wants to merge 8 commits into from
Closed

Added Spock framework and some tests, both old and new #332

wants to merge 8 commits into from

Conversation

@ham1
Copy link
Contributor

@ham1 ham1 commented Nov 19, 2017

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:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
@codecov-io
Copy link

@codecov-io codecov-io commented Nov 19, 2017

Codecov Report

Merging #332 into trunk will increase coverage by 0.17%.
The diff coverage is 78.96%.

Impacted file tree graph

@@             Coverage Diff             @@
##             trunk     #332      +/-   ##
===========================================
+ Coverage     57.9%   58.08%   +0.17%     
- Complexity   10023    10100      +77     
===========================================
  Files         1148     1155       +7     
  Lines        73798    73897      +99     
  Branches      7331     7339       +8     
===========================================
+ Hits         42732    42921     +189     
+ Misses       28587    28496      -91     
- Partials      2479     2480       +1
Impacted Files Coverage Δ Complexity Δ
...ache/jmeter/report/processor/ApdexSummaryData.java 68.42% <ø> (+68.42%) 8 <0> (+8) ⬆️
...apache/jmeter/report/processor/ListResultData.java 75% <ø> (+75%) 5 <0> (+5) ⬆️
...e/jmeter/report/processor/ApdexThresholdsInfo.java 100% <ø> (+100%) 5 <0> (+5) ⬆️
...apache/jmeter/timers/UniformRandomTimerSpec.groovy 100% <100%> (ø) 3 <3> (?)
...meter/protocol/jdbc/sampler/JDBCSamplerSpec.groovy 100% <100%> (ø) 6 <6> (?)
...che/jmeter/protocol/http/util/HTTPUtilsSpec.groovy 100% <100%> (ø) 6 <6> (?)
.../report/processor/Top5ErrorsSummaryDataSpec.groovy 100% <100%> (ø) 5 <5> (?)
.../jmeter/report/processor/ListResultDataSpec.groovy 100% <100%> (ø) 1 <1> (?)
...t/processor/Top5ErrorsBySamplerConsumerSpec.groovy 100% <100%> (ø) 4 <4> (?)
...r/report/processor/ApdexSummaryConsumerSpec.groovy 100% <100%> (ø) 1 <1> (?)
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85a9f13...9d1ff3b. Read the comment docs.

Loading

@pmouawad
Copy link
Contributor

@pmouawad pmouawad commented Nov 21, 2017

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

Loading

@ham1
Copy link
Contributor Author

@ham1 ham1 commented Nov 23, 2017

I've fixed any conflicts now.

So far I've kept the migrations of, 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 used in DataSourceElement.getConnection()
  • Top5ErrorsBySamplerData and found a bug and fixed it here and #337
  • Top5ErrorsBySamplerConsumer with some refactoring

Codecov edits its original comment, coverage is marginally up.

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.

Loading

@ham1
Copy link
Contributor Author

@ham1 ham1 commented Nov 23, 2017

I've added some more tests:

  • ApdexSummaryConsumer and
  • ListResultData

Plus some code tidy up.

Any thoughts?

Loading

@pmouawad
Copy link
Contributor

@pmouawad pmouawad commented Nov 23, 2017

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

Loading

@ham1
Copy link
Contributor Author

@ham1 ham1 commented Nov 23, 2017

Great, thank you. If someone could merge #337 first then I can make there are no conflicts.

Loading

asfgit pushed a commit that referenced this issue Nov 25, 2017
This is part of pr #332 from github.
Contributed by Graham Russell


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1816319 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this issue Nov 25, 2017
Part of pr #332 from github
Contributed by Graham Russell


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1816321 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this issue Nov 25, 2017
Part of pr #332 from github.
Contributed by Graham Russell


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1816322 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this issue Nov 25, 2017
Contributed by Graham Russell


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1816323 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this issue Nov 25, 2017
…atting.

Part of pr #332 from github
Contributed by Graham Russell


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1816326 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this issue Nov 25, 2017
Part of #332 from github
Contributed by Graham Russell


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1816327 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this issue Nov 25, 2017
asfgit pushed a commit that referenced this issue Nov 25, 2017
asfgit pushed a commit that referenced this issue Nov 25, 2017
@asfgit asfgit closed this in 3625487 Nov 25, 2017
@FSchumacher
Copy link
Contributor

@FSchumacher FSchumacher commented Nov 25, 2017

Thanks for your contribution.

Loading

@ham1 ham1 deleted the spock branch Nov 25, 2017
@ham1
Copy link
Contributor Author

@ham1 ham1 commented Nov 25, 2017

Thank you for merging!

Loading

asfgit pushed a commit that referenced this issue Dec 22, 2017
Follow-up to r1816319 and relates to #332 on github.


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1819017 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit that referenced this issue Dec 22, 2017
for maven, ant and the tests, too.

Follow-up to r1819017 which was a follow-up to r1816319.
Relates to #332 on github


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1819021 13f79535-47bb-0310-9956-ffa450edef68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants