uclahs-cds / tool-NFTest

CLI to automate Nextflow pipeline testing
GNU General Public License v2.0
11 stars 1 forks source link

Mock nextflow processes #31

Open zhuchcn opened 1 year ago

zhuchcn commented 1 year ago

In python unit test, functions can be mocked so they returns certain values or data without going through the processes that takes long time, and only for the purpose of testing. So I'm thinking that would be great if we can somehow implement the mocking in nftest. A naive thought is that we can analyze the process/workflow definition and figure out the input output file pattern, and replace the code block with user specified code, or use existing files to mock the output files of the process. This will let it test the process/workflow logic without waiting for hours for the actual tool to run. @uclahs-cds/nextflow-wg @uclahs-cds/software-wg

yashpatel6 commented 1 year ago

I agree this would be useful; I don't know if we'll be able to completely implement mocking but I do have some ideas on adding some way to test a specific process rather than having to run the entire pipeline. Will keep you posted!