Implementation of topics channel testing for processes and workflows#355
Merged
nvnieuwk merged 9 commits intoaskimed:mainfrom Mar 17, 2026
Merged
Implementation of topics channel testing for processes and workflows#355nvnieuwk merged 9 commits intoaskimed:mainfrom
nvnieuwk merged 9 commits intoaskimed:mainfrom
Conversation
… not add functionality for the `then` block
Collaborator
Author
|
An example snapshot from topics looks like this: This is for a process that has one output topic called |
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
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 PR implements the long awaited support for topic channels in process and workflow tests.
Currently this PR is not complete, I will update the following list whenever some new steps are done, but feel free to test this branch out already!
You can test the topic channels in the following way:
nextflow_process { name "Test Process TEST" script "main.nf" process "TEST" topics 'test', 'other' // Define topics to be checked for for all tests in this test file test("Should run without failures") { topics 'another' // Define topics to be checked for in this test only (this expands the topics defined in the upper scope) when { process { """ input[0] = "test" """ } } then { assert process.success assert snapshot(topics).match() // the 'topics' property functions the same as the 'process.out' property, meaning that you can access the specific topics using 'topic.<key>' or 'topic.get("<key>")' or 'topic["<key>"]' } } }Any feedback would be greatly appreciated! If you need a compiled jar file of this branch, feel free to ask me :)