-
Notifications
You must be signed in to change notification settings - Fork 36
Data Driven Testing #310
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
Draft
edmundmiller
wants to merge
8
commits into
askimed:main
Choose a base branch
from
edmundmiller:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Data Driven Testing #310
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced a Map<String, Object> for parameters in AbstractTest. - Added getter and setter methods for parameters in both AbstractTest and ITest. - Updated TestContext to initialize and manage test parameters dynamically. - Enhanced property access in TestContext to support test parameters. This change improves the flexibility of test configurations and parameter management.
…en testing - Introduced DataDrivenTest class to facilitate setup, execution, and cleanup of data-driven tests using closures. - Added DataTableParser class to parse Spock-style where blocks, supporting data tables, data pipes, and variable assignments. - Enhanced FunctionTestSuite, PipelineTestSuite, ProcessTestSuite, and WorkflowTestSuite with testEach method for parameterized testing using data tables. - Implemented interpolation of test names based on provided templates and parameters. These changes improve the flexibility and usability of the testing framework for data-driven scenarios.
- Introduced a new test file for the SAY_HELLO process using Spock-style data-driven testing. - Implemented various test scenarios including data table testing, data pipes testing, and mixed data assignments. - Enhanced test coverage by including edge cases and assertions for process success and failure. These additions improve the robustness of the testing framework for the SAY_HELLO process.
- Enhance evaluateSimpleExpression to properly handle string concatenation with + operator - Add evaluateStringConcatenation method for basic expression evaluation - Use word boundaries in variable replacement to avoid partial matches - Support mixed string and number concatenation in computed assignments Fixes issue where expressions like 'name + "-" + number' were not being evaluated correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Override setParameters in ProcessTest to propagate parameters to TestContext - Ensure test parameters are available as variables in test closures - Fix MissingPropertyException when accessing parameter variables like $name This enables proper parameter access in data-driven test execution. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change from 'where:' label syntax to 'where()' method call syntax - Use proper Groovy method call format for where blocks - Update all example test cases to use correct syntax This ensures compatibility with Groovy's DSL parsing requirements. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Test data table parsing with pipe separators - Test data pipes parsing with << syntax - Test mixed data pipes and computed assignments - Validate parameter extraction and expression evaluation - Use Java 8 compatible string concatenation syntax 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- simple-data-driven.nf.test: Basic data pipes example - data-table-test.nf.test: Pipe-separated data table example - double-pipe-test.nf.test: Double pipe separator example - mixed-syntax-test.nf.test: Mixed data pipes and computed assignments All examples have been tested and verified to work correctly with the implementation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This might close #227?