Skip to content

Conversation

@edmundmiller
Copy link
Collaborator

@edmundmiller edmundmiller commented Jul 3, 2025

This might close #227?

edmundmiller and others added 8 commits July 3, 2025 08:22
- 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>
@edmundmiller edmundmiller marked this pull request as draft July 3, 2025 13:43
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.

Run nf-test in stub mode

1 participant