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

Introduce DataIterator and IDataDriver #1479

Merged
merged 12 commits into from
Jun 27, 2022

Conversation

leonard84
Copy link
Member

The main motivation is to extract the DataIterator logic from the
PlatformParameterizedSpecRunner into a reusable form, so that it can
serve as foundation for data driven specs in the future.

This also opened up the possibility of adding a new extension point IDataDriver,
which can be used to control the actual iterations of a feature.
A possible use-case is to enable property based testing like jqwik
via a third-party extension.

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #1479 (9261e4a) into master (a897f6b) will increase coverage by 79.73%.
The diff coverage is 83.61%.

@@              Coverage Diff              @@
##             master    #1479       +/-   ##
=============================================
+ Coverage          0   79.73%   +79.73%     
- Complexity        0     4024     +4024     
=============================================
  Files             0      411      +411     
  Lines             0    12710    +12710     
  Branches          0     1649     +1649     
=============================================
+ Hits              0    10134    +10134     
- Misses            0     1981     +1981     
- Partials          0      595      +595     
Impacted Files Coverage Δ
.../org/spockframework/runtime/model/FeatureInfo.java 95.45% <50.00%> (ø)
...ework/runtime/PlatformParameterizedSpecRunner.java 71.42% <70.00%> (ø)
...rg/spockframework/runtime/DataIteratorFactory.java 80.95% <80.95%> (ø)
...ork/runtime/ParameterizedFeatureChildExecutor.java 95.45% <92.30%> (ø)
...a/org/spockframework/runtime/model/MethodInfo.java 95.16% <92.85%> (ø)
...ockframework/runtime/ParameterizedFeatureNode.java 78.18% <100.00%> (ø)
.../spockframework/runtime/SpockExecutionContext.java 95.34% <100.00%> (ø)
.../spockframework/runtime/extension/IDataDriver.java 100.00% <100.00%> (ø)
.../spockframework/runtime/model/ExecutionResult.java 100.00% <100.00%> (ø)
...rg/spockframework/runtime/model/ParameterInfo.java 100.00% <100.00%> (ø)
... and 407 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 a897f6b...9261e4a. Read the comment docs.

wolfs
wolfs previously approved these changes Jun 2, 2022
Copy link

@wolfs wolfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this to replace an ugly hack for Gradle's multi version extension, and it works good! So I'd like to have this as a feature and would use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants