diff --git a/bioflow_insight_cli/main.py b/bioflow_insight_cli/main.py
index 4bf7d41668e825df94072c5d9971214972e8e909..278e64eab945a18a4c72789c3e471a3abdaf9c4a 100644
--- a/bioflow_insight_cli/main.py
+++ b/bioflow_insight_cli/main.py
@@ -121,7 +121,7 @@ def cli(main_workflow_path, render_graphs: bool, **kwargs):
     in folders with eponymous names.
     """
 
-    w = Workflow(file=main_workflow_path, **kwargs)
+    w = Workflow(file=main_workflow_path, display_info = False, **kwargs)
     w.initialise()
     w.generate_all_graphs(render_graphs=render_graphs)
 
diff --git a/run_tests.py b/run_tests.py
index cbc9dc30a5837acddd375910e4e4e482cc7b7713..df6b6575c7a89ed4e343f9af7231597a9d0c1a34 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 import sys
 import unittest
+import glob
 
 
 # Run all tests
@@ -11,6 +12,34 @@ def main(pattern='test_*.py', *args):
     results = runner.run(test_suite)
     return results.wasSuccessful()
 
+def write_duplicate_test():
+    #I'm gonna automatically write the tests before running them
+    #This is just a simple duplicate option to test the workflows
+    script = """import unittest
+import glob
+from src.workflow import Workflow
+
+class TestWorkflows(unittest.TestCase):
+    """
+
+    workflows = glob.glob(f'./tests/ressources/workflows/*', recursive=False)
+    for wf in workflows:
+        num = wf.split("/")[-1]
+        text=f"""
+        def test_wf{num}_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/{num}", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/{num}/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        """
+
+        script+=text
+    
+    with open("./tests/test_workflows_simple_duplicate.py", "w") as text_file:
+        text_file.write(script)
+
 
 if __name__ == '__main__':
+
+    write_duplicate_test()
     sys.exit(0 if main(*sys.argv[1:]) else 1)
diff --git a/src/graph.py b/src/graph.py
index bc0afd123bf2a7a0583ca7f2e6868d264471618f..2023eef66d8f0922a58457d2655d85c906973c45 100644
--- a/src/graph.py
+++ b/src/graph.py
@@ -733,6 +733,64 @@ class Graph():
         for n in list(set(nodes_to_conserve)):
             elements.append(get_object(n))
         return elements
+    
+    #Method that checks if a specified structute is the same than the workflows
+    #WARNING: The method i'm using isn't perfect (i'm not claiming it is)-> but it works well enough for what i want to use it for:)
+    def check_if_equal(self, file, processes_2_remove=[]):
+        if(not self.initialised):
+            self.initialise(processes_2_remove=processes_2_remove)
+        spec_graph_wfA = self.full_dico
+        with open(file) as json_file:
+            spec_graph_wfB = json.load(json_file)
+
+
+        def translate_dico(dico):
+            names_already_given = []
+            def get_ids_2_nodes(dico, ids_2_nodes):
+                for node in dico['nodes']:
+                    already_in, index = True, 0
+                    #We assume the name is not already given 
+                    while(already_in):
+                        if("src.operation.Operation" in node["id"]):
+                            val = f"operation_{node['xlabel']}_{index}"
+                        elif("src.process.Process" in node["id"]):
+                            val = f"process_{node['name']}_{index}"
+                        if(val in names_already_given):
+                            index+=1
+                        else:
+                            already_in = False
+                            names_already_given.append(val)
+                            ids_2_nodes[node["id"]] = val
+                for sub in dico['subworkflows']:
+                    get_ids_2_nodes(dico['subworkflows'][sub], ids_2_nodes)
+            
+            ids_2_nodes={}
+            get_ids_2_nodes(dico, ids_2_nodes=ids_2_nodes)
+
+            def rewrite(dico, rewritten):
+                for node in dico['nodes']:
+                    rewritten["nodes"].append(ids_2_nodes[node['id']])
+                for edge in dico['edges']:
+                    rewritten["edges"].append({"A": ids_2_nodes[edge['A']], "B": ids_2_nodes[edge['B']]})
+                for sub in dico['subworkflows']:
+                    temp = {}
+                    temp["nodes"] = []
+                    temp["edges"] = []
+                    temp["subworkflows"] = {}
+                    rewrite(dico["subworkflows"][sub], temp)
+                    rewritten["subworkflows"][sub] = temp
+
+            translated = {}
+            translated["nodes"] = []
+            translated["edges"] = []
+            translated["subworkflows"] = {}
+            rewrite(dico, translated)
+            return translated
+        
+        #TO do that we rewrite the structure using a commun language (without using the ids) -> then just check if the translated structures are the same
+        return translate_dico(spec_graph_wfA) ==translate_dico(spec_graph_wfB)
+
+
             
 
 
diff --git a/src/main.py b/src/main.py
index 1fe16cd9112a259548e0f83766fa9857187c446b..84af93f17fca5fe80f19c8030eda936ad4533e57 100644
--- a/src/main.py
+++ b/src/main.py
@@ -74,6 +74,8 @@ class Main(Nextflow_Building_Blocks):
             #Check that includes are not defined in the main or subworkflows
             self.check_includes()
             self.root = Root(code=self.get_code(), origin=self, modules_defined=self.modules_defined, subworkflow_inputs = [])
+            #The weird DSL1 bug is here
+            #self.root = Root(code=self.get_code(), origin=self, modules_defined=self.modules_defined)
             self.root.initialise()
 
 
diff --git a/src/workflow.py b/src/workflow.py
index 35f48c903f3b699ce7bc5d7fe581566a6d8473e0..6aada985dc2907ef7376eab88eab6b108f6dc9de 100644
--- a/src/workflow.py
+++ b/src/workflow.py
@@ -180,12 +180,27 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
         else:
             raise Exception(f"The workflow's DSL is '{self.DSL}' -> I don't know what this is!")
 
+    #################
+    #    GRAPHS
+    #################
 
     def generate_specification_graph(self, render_graphs = True):
         self.iniatilise_tab_processes_2_remove()
         self.graph.initialise(processes_2_remove = self.processes_2_remove)
         self.graph.get_specification_graph(render_graphs = render_graphs)
 
+    #TODO -> update this
+    def generate_all_graphs(self, render_graphs = True):
+        self.generate_specification_graph(render_graphs = render_graphs)
+
+    #Method that checks if a given graph sepcification is an isomorphism with the workflows
+    def check_if_equal(self, file):
+        self.iniatilise_tab_processes_2_remove()
+        return self.graph.check_if_equal(file, processes_2_remove = self.processes_2_remove)
+
+
+
+
     #Returns a dico of number of processes called per each condition 
     #For example : {condition1: 14, condition2: 10, condition:3}
     #14 process calls depend on condition1
diff --git a/tests/ressources/call/calls_to_test.nf b/tests/ressources/call/calls_to_test.nf
deleted file mode 100644
index 01b04229a3ce22d89b85f02ab9f38343040b5b10..0000000000000000000000000000000000000000
--- a/tests/ressources/call/calls_to_test.nf
+++ /dev/null
@@ -1,13 +0,0 @@
-//GiantSpaceRobot/tsRNAsearch
-
-DESEQ2(COUNTS_TO_COLLAPSED_COUNTS.out.collapsed_count.collect(), "$layoutfile", PREPARE_NCRNA_GTF.out.ncRNA_gtf)
-DATA_TRANSFORMATIONS("$layoutfile", \
-    GENERATE_TRNA_DEPTH_FILES.out.depth_files.collect(), \
-    GENERATE_NCRNA_DEPTH_FILES.out.depth_files.collect(), \
-    GENERATE_MULTIMAPPER_TRNA_DEPTH_FILES.out.depth_files.collect(), \
-    SUM_COUNTS.out.sum_counts)
-DISTRIBUTION_SCORE(DATA_TRANSFORMATIONS.out.ncrna_stddev, DATA_TRANSFORMATIONS.out.trna_stddev, PREPARE_NCRNA_GTF.out.ncRNA_gtf)
-SLOPE_SCORE(DATA_TRANSFORMATIONS.out.depth_means, "$layoutfile", PREPARE_NCRNA_GTF.out.ncRNA_gtf)
-
-
-//Case where call.into{ch1, ch2}
\ No newline at end of file
diff --git a/tests/ressources/channel/empty_wf.nf b/tests/ressources/channel/empty_wf.nf
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/ressources/process/process_DSL1.nf b/tests/ressources/process/process_DSL1.nf
deleted file mode 100644
index e67c592ccbef2dd4d5b10a75be4cbf75b080c846..0000000000000000000000000000000000000000
--- a/tests/ressources/process/process_DSL1.nf
+++ /dev/null
@@ -1,18 +0,0 @@
-//Taken from https://github.com/maxemil/ALE-pipeline/blob/c8f17b11dd3496420cfcb4a5c29564d2257eabf4/main.nf
-//+ modified
-
-process cleanSpeciesTree {
-  input:
-  file species_tree
-  file 'map_species.txt' from species_map.first()
-
-  output:
-  file "${species_tree.baseName}_clean.tree" into clean_species_tree
-  file "${species_tree.baseName}_root.tree" into rooted_species_tree
-
-  publishDir params.output_trees, mode: 'copy'
-  tag {"${species_tree.simpleName}"}
-
-  script:
-  template 'cleanSpeciesTree.py'
-}
\ No newline at end of file
diff --git a/tests/ressources/process/process_DSL2.nf b/tests/ressources/process/process_DSL2.nf
deleted file mode 100644
index 5dd75965c82dbfee0e3b68d6dac96bc85f8423cf..0000000000000000000000000000000000000000
--- a/tests/ressources/process/process_DSL2.nf
+++ /dev/null
@@ -1,80 +0,0 @@
-//Taken from https://github.com/nf-core/mhcquant/blob/b80a5a4fbf1ff4d409885d08ab09f6ceeb7fe4c9/modules/local/openms_falsediscoveryrate.nf
-//+ modified
-
-process OPENMS_FALSEDISCOVERYRATE  {
-    tag "$meta.id"
-    label 'process_single'
-
-    conda "bioconda::openms=3.0.0"
-    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
-        'https://depot.galaxyproject.org/singularity/openms:3.0.0--h8964181_1' :
-        'biocontainers/openms:3.0.0--h8964181_1' }"
-
-    input:
-        tuple val(meta), path(idxml)
-
-    output:
-        tuple val(meta), path("*.idXML"), emit: idxml
-        path "versions.yml"             , emit: versions
-
-    when:
-        task.ext.when == null || task.ext.when
-
-    script:
-        def prefix           = task.ext.prefix ?: "${idxml.baseName}_fdr"
-
-        """
-        FalseDiscoveryRate -in $idxml \\
-            -protein 'false' \\
-            -out ${prefix}.idXML \\
-            -threads $task.cpus
-
-        cat <<-END_VERSIONS > versions.yml
-        "${task.process}":
-            openms: \$(echo \$(FileInfo --help 2>&1) | sed 's/^.*Version: //; s/-.*\$//' | sed 's/ -*//; s/ .*\$//')
-        END_VERSIONS
-        """
-}
-
-/*
-
-//wtsi-hgi/nf_cellbender/modules/core.nf
-
-input:
-        val(outdir_prev)
-        tuple(
-            val(experiment_id),
-            path(file_10x_barcodes),
-            path(file_10x_features),
-            path(file_10x_matrix),
-            val(ncells_expected),
-            val(ndroplets_include_cellbender)
-        )
-        val(estimate_params_umis)
-
-    output:
-        val(outdir, emit: outdir)
-        tuple(
-            val(experiment_id),
-            path(file_10x_barcodes),
-            path(file_10x_features),
-            path(file_10x_matrix),
-            path("${outfile}-expected_cells.txt"),
-            path("${outfile}-total_droplets_included.txt"),
-            emit: cb_input
-        )
-        path(
-            "${outfile}-expected_cells.txt",
-            emit: expected_cells
-        )
-        path(
-            "${outfile}-total_droplets_included.txt",
-            emit: total_droplets_include
-        )
-        path("${outfile}-cell_estimate_cutoff.tsv.gz")
-        path("${outfile}-total_droplets_cutoff.tsv.gz")
-        path("plots/*.png") optional true
-        path("plots/*.pdf") optional true
-
-*/
-
diff --git a/tests/ressources/workflows/wf1/specification_graph.json b/tests/ressources/workflows/wf1/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..2eb338d86db0336c884ae1f594c2fc918557756c
--- /dev/null
+++ b/tests/ressources/workflows/wf1/specification_graph.json
@@ -0,0 +1,146 @@
+{
+    "nodes": [],
+    "edges": [],
+    "subworkflows": {
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.operation.Operation object at 0x786a10c39fc0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "sub1.out.view()",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x786a10c399f0>",
+                    "B": "<src.operation.Operation object at 0x786a10c39fc0>",
+                    "label": "sub1.out"
+                }
+            ],
+            "subworkflows": {
+                "sub1_0": {
+                    "nodes": [
+                        {
+                            "id": "<src.process.Process object at 0x786a10c394e0>",
+                            "name": "M1",
+                            "shape": "ellipse",
+                            "xlabel": "",
+                            "fillcolor": ""
+                        },
+                        {
+                            "id": "<src.process.Process object at 0x786a10c395a0>",
+                            "name": "M2",
+                            "shape": "ellipse",
+                            "xlabel": "",
+                            "fillcolor": ""
+                        },
+                        {
+                            "id": "<src.operation.Operation object at 0x786a10c39420>",
+                            "name": "",
+                            "shape": "point",
+                            "xlabel": "M1.out",
+                            "fillcolor": "white"
+                        },
+                        {
+                            "id": "<src.operation.Operation object at 0x786a10c399f0>",
+                            "name": "",
+                            "shape": "point",
+                            "xlabel": "emit: M1.out",
+                            "fillcolor": ""
+                        }
+                    ],
+                    "edges": [
+                        {
+                            "A": "<src.process.Process object at 0x786a10c394e0>",
+                            "B": "<src.operation.Operation object at 0x786a10c39420>",
+                            "label": "M1.out"
+                        },
+                        {
+                            "A": "<src.operation.Operation object at 0x786a10c39420>",
+                            "B": "<src.process.Process object at 0x786a10c395a0>",
+                            "label": ""
+                        },
+                        {
+                            "A": "<src.process.Process object at 0x786a10c394e0>",
+                            "B": "<src.operation.Operation object at 0x786a10c399f0>",
+                            "label": "M1.out"
+                        }
+                    ],
+                    "subworkflows": {}
+                }
+            }
+        },
+        "sub3_0": {
+            "nodes": [
+                {
+                    "id": "<src.operation.Operation object at 0x786a10c3a770>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "sub1.out.view()",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x786a10c3a560>",
+                    "B": "<src.operation.Operation object at 0x786a10c3a770>",
+                    "label": "sub1.out"
+                }
+            ],
+            "subworkflows": {
+                "sub1_1": {
+                    "nodes": [
+                        {
+                            "id": "<src.process.Process object at 0x786a10c3a4a0>",
+                            "name": "M1",
+                            "shape": "ellipse",
+                            "xlabel": "",
+                            "fillcolor": ""
+                        },
+                        {
+                            "id": "<src.process.Process object at 0x786a10c39f00>",
+                            "name": "M2",
+                            "shape": "ellipse",
+                            "xlabel": "",
+                            "fillcolor": ""
+                        },
+                        {
+                            "id": "<src.operation.Operation object at 0x786a10c3a500>",
+                            "name": "",
+                            "shape": "point",
+                            "xlabel": "M1.out",
+                            "fillcolor": "white"
+                        },
+                        {
+                            "id": "<src.operation.Operation object at 0x786a10c3a560>",
+                            "name": "",
+                            "shape": "point",
+                            "xlabel": "emit: M1.out",
+                            "fillcolor": ""
+                        }
+                    ],
+                    "edges": [
+                        {
+                            "A": "<src.process.Process object at 0x786a10c3a4a0>",
+                            "B": "<src.operation.Operation object at 0x786a10c3a500>",
+                            "label": "M1.out"
+                        },
+                        {
+                            "A": "<src.operation.Operation object at 0x786a10c3a500>",
+                            "B": "<src.process.Process object at 0x786a10c39f00>",
+                            "label": ""
+                        },
+                        {
+                            "A": "<src.process.Process object at 0x786a10c3a4a0>",
+                            "B": "<src.operation.Operation object at 0x786a10c3a560>",
+                            "label": "M1.out"
+                        }
+                    ],
+                    "subworkflows": {}
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf1/test1.nf b/tests/ressources/workflows/wf1/test1.nf
new file mode 100644
index 0000000000000000000000000000000000000000..4d043918a8df85843398c22f2657ca2456445857
--- /dev/null
+++ b/tests/ressources/workflows/wf1/test1.nf
@@ -0,0 +1,55 @@
+#!/usr/bin/env nextflow
+
+
+
+process M1 {
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub1 {
+    main:
+    M1()
+    M2(M1.out)
+
+    emit:
+    M1.out
+}
+
+workflow sub2 {
+    main:
+    sub1()
+    sub1.out.view()
+}
+
+
+workflow sub3 {
+    main:
+    sub1()
+    sub1.out.view()
+}
+
+workflow {
+    
+    if(1==1){
+        sub2()
+    } else {
+        sub3()
+    }
+
+    
+}
+
diff --git a/tests/ressources/workflows/wf10/specification_graph.json b/tests/ressources/workflows/wf10/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..e34b9d597e8d8b90456bfd68372d239f859c912f
--- /dev/null
+++ b/tests/ressources/workflows/wf10/specification_graph.json
@@ -0,0 +1,50 @@
+{
+    "nodes": [
+        {
+            "id": "<src.process.Process object at 0x71ee1a494c70>",
+            "name": "M1",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a496ce0>",
+            "name": "M1",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a4950f0>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a497700>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M1.out",
+            "fillcolor": "white"
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.process.Process object at 0x71ee1a494c70>",
+            "B": "<src.operation.Operation object at 0x71ee1a497700>",
+            "label": "M1.out"
+        },
+        {
+            "A": "<src.process.Process object at 0x71ee1a496ce0>",
+            "B": "<src.operation.Operation object at 0x71ee1a497700>",
+            "label": "M1.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a497700>",
+            "B": "<src.process.Process object at 0x71ee1a4950f0>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {}
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf10/test10.nf b/tests/ressources/workflows/wf10/test10.nf
new file mode 100644
index 0000000000000000000000000000000000000000..e29cbd4296f5b9b41a7944ebf74773469b15f1c7
--- /dev/null
+++ b/tests/ressources/workflows/wf10/test10.nf
@@ -0,0 +1,38 @@
+#!/usr/bin/env nextflow
+
+
+process M1 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+process M2 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+
+workflow {
+    if(1==1){
+        M1()
+    } else {
+        M1()
+    }
+    M2(M1.out)
+
+}
+
diff --git a/tests/ressources/workflows/wf11/specification_graph.json b/tests/ressources/workflows/wf11/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..62ec257161aeaa8bb547e315fb0f9677483e5b5b
--- /dev/null
+++ b/tests/ressources/workflows/wf11/specification_graph.json
@@ -0,0 +1,62 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a48e440>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = M1()",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a48fb50>",
+            "name": "M1",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a48fac0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = Channel.empty()",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a48ed40>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a48fa60>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.process.Process object at 0x71ee1a48fb50>",
+            "B": "<src.operation.Operation object at 0x71ee1a48e440>",
+            "label": ""
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a48e440>",
+            "B": "<src.operation.Operation object at 0x71ee1a48fa60>",
+            "label": "a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a48fac0>",
+            "B": "<src.operation.Operation object at 0x71ee1a48fa60>",
+            "label": "a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a48fa60>",
+            "B": "<src.process.Process object at 0x71ee1a48ed40>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {}
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf11/test11.nf b/tests/ressources/workflows/wf11/test11.nf
new file mode 100644
index 0000000000000000000000000000000000000000..731decbe33d58ad2ea3638909562656008e2b69a
--- /dev/null
+++ b/tests/ressources/workflows/wf11/test11.nf
@@ -0,0 +1,47 @@
+#!/usr/bin/env nextflow
+
+
+process M1 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+process M2 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+
+workflow {
+
+    if (1==1){
+        
+        a = M1()
+    }else{
+        a = Channel.empty()
+    } 
+
+    //Differential analysis
+    if (2==2){
+        M2(a)
+    }
+
+    
+    
+
+}
+
diff --git a/tests/ressources/workflows/wf12/specification_graph.json b/tests/ressources/workflows/wf12/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..595f78cf2224ee8dee7b03b6273a9419d5b88fbf
--- /dev/null
+++ b/tests/ressources/workflows/wf12/specification_graph.json
@@ -0,0 +1,113 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4963b0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "b = sub1.out.a",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a285210>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "b",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a2cb730>",
+            "B": "<src.operation.Operation object at 0x71ee1a4963b0>",
+            "label": "sub1.out.a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4963b0>",
+            "B": "<src.operation.Operation object at 0x71ee1a285210>",
+            "label": "b"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a285210>",
+            "B": "<src.operation.Operation object at 0x71ee1a2ca380>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a496b90>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a = M1()",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a2ca230>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a2cb730>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: a",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71ee1a2ca230>",
+                    "B": "<src.operation.Operation object at 0x71ee1a496b90>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a496b90>",
+                    "B": "<src.operation.Operation object at 0x71ee1a2cb730>",
+                    "label": "a"
+                }
+            ],
+            "subworkflows": {}
+        },
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a287ac0>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a287040>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "b",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a2ca380>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: b",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a2ca380>",
+                    "B": "<src.operation.Operation object at 0x71ee1a287040>",
+                    "label": "b"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a287040>",
+                    "B": "<src.process.Process object at 0x71ee1a287ac0>",
+                    "label": ""
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf12/test12.nf b/tests/ressources/workflows/wf12/test12.nf
new file mode 100644
index 0000000000000000000000000000000000000000..3b41670f56efd4a012ccb82be03575897ac30c38
--- /dev/null
+++ b/tests/ressources/workflows/wf12/test12.nf
@@ -0,0 +1,57 @@
+#!/usr/bin/env nextflow
+
+
+process M1 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+process M2 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+workflow sub1 {
+    main:
+    a = M1()
+
+    emit:
+    a
+}
+
+workflow sub2 {
+
+    take:
+    b
+
+    main:
+    M2(b)
+
+}
+
+
+workflow {
+
+    sub1()
+    b = sub1.out.a
+    sub2(b)
+
+    
+    
+
+}
+
diff --git a/tests/ressources/workflows/wf13/specification_graph.json b/tests/ressources/workflows/wf13/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..9cfc7d41c9146129aea1f5b3b48883709c906294
--- /dev/null
+++ b/tests/ressources/workflows/wf13/specification_graph.json
@@ -0,0 +1,82 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a29d8d0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "b = sub1.out.a",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.process.Process object at 0x71eeceeed7b0>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71eeceeec040>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "b",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71eeceeec2e0>",
+            "B": "<src.operation.Operation object at 0x71ee1a29d8d0>",
+            "label": "sub1.out.a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a29d8d0>",
+            "B": "<src.operation.Operation object at 0x71eeceeec040>",
+            "label": "b"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71eeceeec040>",
+            "B": "<src.process.Process object at 0x71eeceeed7b0>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.operation.Operation object at 0x71eeceeed4b0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a = M1()",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.process.Process object at 0x71eeceeee830>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71eeceeec2e0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: a",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71eeceeee830>",
+                    "B": "<src.operation.Operation object at 0x71eeceeed4b0>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71eeceeed4b0>",
+                    "B": "<src.operation.Operation object at 0x71eeceeec2e0>",
+                    "label": "a"
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf13/test13.nf b/tests/ressources/workflows/wf13/test13.nf
new file mode 100644
index 0000000000000000000000000000000000000000..568b0e75d9556462ca37463d1f55b919cf767fb5
--- /dev/null
+++ b/tests/ressources/workflows/wf13/test13.nf
@@ -0,0 +1,47 @@
+#!/usr/bin/env nextflow
+
+
+process M1 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+process M2 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+workflow sub1 {
+    main:
+    a = M1()
+
+    emit:
+    a
+}
+
+
+workflow {
+
+    sub1()
+    b = sub1.out.a
+    M2(b)
+
+    
+    
+
+}
+
diff --git a/tests/ressources/workflows/wf14/specification_graph.json b/tests/ressources/workflows/wf14/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..02765cfdcf0ecb7b445ec2f5052d5f57abc532a0
--- /dev/null
+++ b/tests/ressources/workflows/wf14/specification_graph.json
@@ -0,0 +1,70 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a498160>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "b = Channel.empty()",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a3c9930>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "b",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a498160>",
+            "B": "<src.operation.Operation object at 0x71ee1a3c9930>",
+            "label": "b"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a3c9930>",
+            "B": "<src.operation.Operation object at 0x71ee1a498250>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a2686d0>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a269d20>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "b",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a498250>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: b",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a498250>",
+                    "B": "<src.operation.Operation object at 0x71ee1a269d20>",
+                    "label": "b"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a269d20>",
+                    "B": "<src.process.Process object at 0x71ee1a2686d0>",
+                    "label": ""
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf14/test14.nf b/tests/ressources/workflows/wf14/test14.nf
new file mode 100644
index 0000000000000000000000000000000000000000..093241f45329f714de7a814a9ee904d1f246c03a
--- /dev/null
+++ b/tests/ressources/workflows/wf14/test14.nf
@@ -0,0 +1,48 @@
+#!/usr/bin/env nextflow
+
+
+process M1 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+process M2 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+workflow sub2 {
+
+    take:
+    b
+
+    main:
+    M2(b)
+
+}
+
+
+workflow {
+
+    b = Channel.empty()
+    sub2(b)
+
+    
+    
+
+}
+
diff --git a/tests/ressources/workflows/wf15/specification_graph.json b/tests/ressources/workflows/wf15/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..387e9473e7950d71a4bb607d69fa7ed636b46ab5
--- /dev/null
+++ b/tests/ressources/workflows/wf15/specification_graph.json
@@ -0,0 +1,216 @@
+{
+    "nodes": [
+        {
+            "id": "<src.process.Process object at 0x71ee1a488a60>",
+            "name": "M1",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4a5f90>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M1.out",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a4a4820>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4a4d60>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M2.out",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4a4c40>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "sub_M3.out",
+            "fillcolor": "white"
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.process.Process object at 0x71ee1a488a60>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a5f90>",
+            "label": "M1.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a5f90>",
+            "B": "<src.operation.Operation object at 0x71ee1a48fbe0>",
+            "label": ""
+        },
+        {
+            "A": "<src.process.Process object at 0x71ee1a4a4820>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a4d60>",
+            "label": "M2.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a4d60>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a4c70>",
+            "label": ""
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a48fdc0>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a4c40>",
+            "label": "sub_M3.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a4af0>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a4c40>",
+            "label": "sub_M3.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a4c40>",
+            "B": "<src.operation.Operation object at 0x71ee1a488b20>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {
+        "sub_M3_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4a5d20>",
+                    "name": "M3",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a5390>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "ch",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a48fbe0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: ch",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a48fdc0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M3.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a48fbe0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a5390>",
+                    "label": "ch"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a5390>",
+                    "B": "<src.process.Process object at 0x71ee1a4a5d20>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a4a5d20>",
+                    "B": "<src.operation.Operation object at 0x71ee1a48fdc0>",
+                    "label": "M3.out"
+                }
+            ],
+            "subworkflows": {}
+        },
+        "sub_M3_1": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4a4a60>",
+                    "name": "M3",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a4880>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "ch",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a4c70>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: ch",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a4af0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M3.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a4c70>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a4880>",
+                    "label": "ch"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a4880>",
+                    "B": "<src.process.Process object at 0x71ee1a4a4a60>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a4a4a60>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a4af0>",
+                    "label": "M3.out"
+                }
+            ],
+            "subworkflows": {}
+        },
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a48a890>",
+                    "name": "M4",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a48a470>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "b",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a488b20>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: b",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a488b20>",
+                    "B": "<src.operation.Operation object at 0x71ee1a48a470>",
+                    "label": "b"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a48a470>",
+                    "B": "<src.process.Process object at 0x71ee1a48a890>",
+                    "label": ""
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf15/test15.nf b/tests/ressources/workflows/wf15/test15.nf
new file mode 100644
index 0000000000000000000000000000000000000000..4acfa2b9f7aff8d6a4908205ecfef67432c9adc1
--- /dev/null
+++ b/tests/ressources/workflows/wf15/test15.nf
@@ -0,0 +1,91 @@
+#!/usr/bin/env nextflow
+
+
+process M1 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+process M2 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M3 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub_M3 {
+
+    take:
+    ch
+
+    main:
+    M3(ch)
+
+    emit:
+    M3.out
+
+}
+
+
+
+process M4 {
+    input:
+    path a
+
+
+    """
+    SOMETHING
+    """
+}
+
+
+workflow sub2 {
+
+    take:
+    b
+
+    main:
+    M4(b)
+
+}
+
+
+workflow {
+
+    if(1==1){
+        M1()
+        sub_M3(M1.out)
+    }else{
+        M2()
+        sub_M3(M2.out)
+
+    }
+
+    sub2(sub_M3.out)
+
+    
+    
+
+}
+
diff --git a/tests/ressources/workflows/wf16/specification_graph.json b/tests/ressources/workflows/wf16/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..528f2bb2d8d9913996e1c0e21475bcb0065d0bda
--- /dev/null
+++ b/tests/ressources/workflows/wf16/specification_graph.json
@@ -0,0 +1,130 @@
+{
+    "nodes": [
+        {
+            "id": "<src.process.Process object at 0x71ee1a53a5c0>",
+            "name": "M1",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a2562f0>",
+            "name": "M3",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a257df0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M1.out",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a2dde70>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a4a6380>",
+            "name": "M3",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4a63e0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M2.out",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4a48e0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M3.out",
+            "fillcolor": "white"
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.process.Process object at 0x71ee1a53a5c0>",
+            "B": "<src.operation.Operation object at 0x71ee1a257df0>",
+            "label": "M1.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a257df0>",
+            "B": "<src.process.Process object at 0x71ee1a2562f0>",
+            "label": ""
+        },
+        {
+            "A": "<src.process.Process object at 0x71ee1a2dde70>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a63e0>",
+            "label": "M2.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a63e0>",
+            "B": "<src.process.Process object at 0x71ee1a4a6380>",
+            "label": ""
+        },
+        {
+            "A": "<src.process.Process object at 0x71ee1a2562f0>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a48e0>",
+            "label": "M3.out"
+        },
+        {
+            "A": "<src.process.Process object at 0x71ee1a4a6380>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a48e0>",
+            "label": "M3.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a48e0>",
+            "B": "<src.operation.Operation object at 0x71ee1a53b220>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a53aa10>",
+                    "name": "M4",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a53b2b0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "b",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a53b220>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: b",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a53b220>",
+                    "B": "<src.operation.Operation object at 0x71ee1a53b2b0>",
+                    "label": "b"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a53b2b0>",
+                    "B": "<src.process.Process object at 0x71ee1a53aa10>",
+                    "label": ""
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf16/test16.nf b/tests/ressources/workflows/wf16/test16.nf
new file mode 100644
index 0000000000000000000000000000000000000000..5e7e3dc547cd95da9c8ae9ce171e1d427ac3d538
--- /dev/null
+++ b/tests/ressources/workflows/wf16/test16.nf
@@ -0,0 +1,76 @@
+#!/usr/bin/env nextflow
+
+
+process M1 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+process M2 {
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M3 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M4 {
+    input:
+    path a
+
+
+    """
+    SOMETHING
+    """
+}
+
+
+workflow sub2 {
+
+    take:
+    b
+
+    main:
+    M4(b)
+
+}
+
+
+workflow {
+
+    if(1==1){
+        M1()
+        M3(M1.out)
+    }else{
+        M2()
+        M3(M2.out)
+
+    }
+
+    sub2(M3.out)
+
+    
+    
+
+}
+
diff --git a/tests/ressources/workflows/wf17/specification_graph.json b/tests/ressources/workflows/wf17/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..b67a38d69e5fbdbd3d0fef08750cc4f0a82b756f
--- /dev/null
+++ b/tests/ressources/workflows/wf17/specification_graph.json
@@ -0,0 +1,218 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a497850>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = sub1()",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4a7070>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = sub2()",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a497310>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "c = a",
+            "fillcolor": "white"
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a7190>",
+            "B": "<src.operation.Operation object at 0x71ee1a497850>",
+            "label": "emit: a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a6920>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a7070>",
+            "label": "emit: a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a497850>",
+            "B": "<src.operation.Operation object at 0x71ee1a497310>",
+            "label": "a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4a7070>",
+            "B": "<src.operation.Operation object at 0x71ee1a497310>",
+            "label": "a"
+        }
+    ],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a2cb3a0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a = M2.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a240fa0>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a243850>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a7400>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a = Channel.empty()",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a2cbbb0>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a7190>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: a",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71ee1a240fa0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a2cb3a0>",
+                    "label": "M2.out"
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a2cbbb0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a243850>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a243850>",
+                    "B": "<src.process.Process object at 0x71ee1a240fa0>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a2cb3a0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a7190>",
+                    "label": "a"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a7400>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a7190>",
+                    "label": "a"
+                }
+            ],
+            "subworkflows": {}
+        },
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a6950>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a = M2.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4a6650>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a67d0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a68c0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a = Channel.empty()",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4a6c50>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4a69b0>",
+                    "name": "M3",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a6920>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: a",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71ee1a4a6650>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a6950>",
+                    "label": "M2.out"
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a4a6c50>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a67d0>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a67d0>",
+                    "B": "<src.process.Process object at 0x71ee1a4a6650>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a6950>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a6920>",
+                    "label": "a"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a68c0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4a6920>",
+                    "label": "a"
+                }
+            ],
+            "subworkflows": {
+                "sub3_0": {
+                    "nodes": [
+                        {
+                            "id": "<src.operation.Operation object at 0x71ee1a4a6cb0>",
+                            "name": "",
+                            "shape": "point",
+                            "xlabel": "ch = Channel.empty()",
+                            "fillcolor": ""
+                        }
+                    ],
+                    "edges": [],
+                    "subworkflows": {}
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf17/test17.nf b/tests/ressources/workflows/wf17/test17.nf
new file mode 100644
index 0000000000000000000000000000000000000000..373dc48dffbcf9a30b2cf2ea03d62e216f53e463
--- /dev/null
+++ b/tests/ressources/workflows/wf17/test17.nf
@@ -0,0 +1,77 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub1 {
+    main:
+    M1()
+    if(2==2){
+        M2(M1.out)
+        a = M2.out
+    } else {
+        a = Channel.empty()
+    }
+
+    emit:
+    a
+}
+
+process M3 {
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub2 {
+    main:
+    M1()
+    if(2==2){
+        M2(M1.out)
+        a = M2.out
+    } else {
+        a = Channel.empty()
+    }
+    sub3()
+    M3()
+
+    emit:
+    a
+    
+
+}
+
+workflow sub3 {
+    main:
+    ch = Channel.empty()
+    
+
+}
+
+
+workflow {    
+    //sub1()
+    if(1==1){
+        a = sub1()
+    } else {
+        a = sub2()
+    }
+    c = a
+}
+
diff --git a/tests/ressources/workflows/wf2/specification_graph.json b/tests/ressources/workflows/wf2/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..dac46c982ea5c6f39f1f7675cc772479f631edeb
--- /dev/null
+++ b/tests/ressources/workflows/wf2/specification_graph.json
@@ -0,0 +1,106 @@
+{
+    "nodes": [],
+    "edges": [],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a284100>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a285c30>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a2b3f10>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a229480>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M2.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71ee1a284100>",
+                    "B": "<src.operation.Operation object at 0x71ee1a2b3f10>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a2b3f10>",
+                    "B": "<src.process.Process object at 0x71ee1a285c30>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a285c30>",
+                    "B": "<src.operation.Operation object at 0x71ee1a229480>",
+                    "label": "M2.out"
+                }
+            ],
+            "subworkflows": {}
+        },
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4887c0>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a48ada0>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a48a5f0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a48ad40>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M2.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71ee1a4887c0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a48a5f0>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a48a5f0>",
+                    "B": "<src.process.Process object at 0x71ee1a48ada0>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a48ada0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a48ad40>",
+                    "label": "M2.out"
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf2/test2.nf b/tests/ressources/workflows/wf2/test2.nf
new file mode 100644
index 0000000000000000000000000000000000000000..52c1f31406dfecd4cdc7f79408d0e631cfd0c00b
--- /dev/null
+++ b/tests/ressources/workflows/wf2/test2.nf
@@ -0,0 +1,53 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub1 {
+    main:
+    M1()
+    M2(M1.out)
+
+    emit:
+    M2.out
+}
+
+workflow sub2 {
+    main:
+    M1()
+    M2(M1.out)
+
+    emit:
+    M2.out
+
+}
+
+
+
+workflow {
+    
+    //sub1()
+    if(1==1){
+        sub1()
+    } else {
+        sub2()
+    }
+
+    
+}
+
diff --git a/tests/ressources/workflows/wf3/specification_graph.json b/tests/ressources/workflows/wf3/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..e5f689e9be48980e7bb97496ec4afb1821d5956e
--- /dev/null
+++ b/tests/ressources/workflows/wf3/specification_graph.json
@@ -0,0 +1,149 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4971c0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = sub1()",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a48ada0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = sub2()",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a496da0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "c = a",
+            "fillcolor": "white"
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a340fa0>",
+            "B": "<src.operation.Operation object at 0x71ee1a4971c0>",
+            "label": "emit: M2.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a32d7e0>",
+            "B": "<src.operation.Operation object at 0x71ee1a48ada0>",
+            "label": "emit: M2.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4971c0>",
+            "B": "<src.operation.Operation object at 0x71ee1a496da0>",
+            "label": "a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a48ada0>",
+            "B": "<src.operation.Operation object at 0x71ee1a496da0>",
+            "label": "a"
+        }
+    ],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a496c20>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a496830>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4967d0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a340fa0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M2.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71ee1a496c20>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4967d0>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4967d0>",
+                    "B": "<src.process.Process object at 0x71ee1a496830>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a496830>",
+                    "B": "<src.operation.Operation object at 0x71ee1a340fa0>",
+                    "label": "M2.out"
+                }
+            ],
+            "subworkflows": {}
+        },
+        "sub2_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a488a60>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a240760>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a32da50>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a32d7e0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M2.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.process.Process object at 0x71ee1a488a60>",
+                    "B": "<src.operation.Operation object at 0x71ee1a32da50>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a32da50>",
+                    "B": "<src.process.Process object at 0x71ee1a240760>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a240760>",
+                    "B": "<src.operation.Operation object at 0x71ee1a32d7e0>",
+                    "label": "M2.out"
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf3/test3.nf b/tests/ressources/workflows/wf3/test3.nf
new file mode 100644
index 0000000000000000000000000000000000000000..b1271b69ec7f6f8072e8df5e0b0120597fd3b3c3
--- /dev/null
+++ b/tests/ressources/workflows/wf3/test3.nf
@@ -0,0 +1,50 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub1 {
+    main:
+    M1()
+    M2(M1.out)
+
+    emit:
+    M2.out
+}
+
+workflow sub2 {
+    main:
+    M1()
+    M2(M1.out)
+
+    emit:
+    M2.out
+
+}
+
+
+workflow {    
+    //sub1()
+    if(1==1){
+        a = sub1()
+    } else {
+        a = sub2()
+    }
+    c = a
+}
+
diff --git a/tests/ressources/workflows/wf4/specification_graph.json b/tests/ressources/workflows/wf4/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..fa988c3f7b86b572c1956ee3235062cad4949467
--- /dev/null
+++ b/tests/ressources/workflows/wf4/specification_graph.json
@@ -0,0 +1,94 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a496170>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "Channel.empty()",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a496170>",
+            "B": "<src.operation.Operation object at 0x71ee1a4975e0>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4973a0>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4968c0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a496f50>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a496380>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4975e0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: a",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a287b20>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M2.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4975e0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4968c0>",
+                    "label": "a"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4968c0>",
+                    "B": "<src.process.Process object at 0x71ee1a4973a0>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a4973a0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a496380>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a496380>",
+                    "B": "<src.process.Process object at 0x71ee1a496f50>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a496f50>",
+                    "B": "<src.operation.Operation object at 0x71ee1a287b20>",
+                    "label": "M2.out"
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf4/test4.nf b/tests/ressources/workflows/wf4/test4.nf
new file mode 100644
index 0000000000000000000000000000000000000000..331304076c7d5c5d898968b280be80b979e2066c
--- /dev/null
+++ b/tests/ressources/workflows/wf4/test4.nf
@@ -0,0 +1,41 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub1 {
+    take:
+    a
+
+    main:
+    M1(a)
+    M2(M1.out)
+
+    emit:
+    M2.out
+}
+
+
+
+workflow {    
+    sub1(Channel.empty())
+}
+
diff --git a/tests/ressources/workflows/wf5/specification_graph.json b/tests/ressources/workflows/wf5/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..259eca243f6974bbfcc79453ee3a08157b9cd8aa
--- /dev/null
+++ b/tests/ressources/workflows/wf5/specification_graph.json
@@ -0,0 +1,106 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a4a4df0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "c = sub1(Channel.empty())",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a498b20>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "Channel.empty()",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a498b20>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a4b20>",
+            "label": ""
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a4982e0>",
+            "B": "<src.operation.Operation object at 0x71ee1a4a4df0>",
+            "label": "emit: M2.out"
+        }
+    ],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a4a47f0>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a498730>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a498040>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a498250>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4a4b20>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: a",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4982e0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M2.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4a4b20>",
+                    "B": "<src.operation.Operation object at 0x71ee1a498730>",
+                    "label": "a"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a498730>",
+                    "B": "<src.process.Process object at 0x71ee1a4a47f0>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a4a47f0>",
+                    "B": "<src.operation.Operation object at 0x71ee1a498250>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a498250>",
+                    "B": "<src.process.Process object at 0x71ee1a498040>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a498040>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4982e0>",
+                    "label": "M2.out"
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf5/test5.nf b/tests/ressources/workflows/wf5/test5.nf
new file mode 100644
index 0000000000000000000000000000000000000000..81b30d82b67b641b68ccc63a3840e370162bf8e1
--- /dev/null
+++ b/tests/ressources/workflows/wf5/test5.nf
@@ -0,0 +1,41 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub1 {
+    take:
+    a
+
+    main:
+    M1(a)
+    M2(M1.out)
+
+    emit:
+    M2.out
+}
+
+
+
+workflow {    
+    c = sub1(Channel.empty())
+}
+
diff --git a/tests/ressources/workflows/wf6/specification_graph.json b/tests/ressources/workflows/wf6/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..42a0511d6c2760307c8b6e7c33fb8cbf7107b8c2
--- /dev/null
+++ b/tests/ressources/workflows/wf6/specification_graph.json
@@ -0,0 +1,130 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a497bb0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = 1",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a497010>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a = Channel.empty()",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a496200>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "c = sub1(a)",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a496da0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "a",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a497bb0>",
+            "B": "<src.operation.Operation object at 0x71ee1a496da0>",
+            "label": "a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a497010>",
+            "B": "<src.operation.Operation object at 0x71ee1a496da0>",
+            "label": "a"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a496da0>",
+            "B": "<src.operation.Operation object at 0x71ee1a496350>",
+            "label": ""
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a496950>",
+            "B": "<src.operation.Operation object at 0x71ee1a496200>",
+            "label": "emit: M2.out"
+        }
+    ],
+    "subworkflows": {
+        "sub1_0": {
+            "nodes": [
+                {
+                    "id": "<src.process.Process object at 0x71ee1a496a70>",
+                    "name": "M1",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a496b00>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "a",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.process.Process object at 0x71ee1a496b30>",
+                    "name": "M2",
+                    "shape": "ellipse",
+                    "xlabel": "",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a4970a0>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "M1.out",
+                    "fillcolor": "white"
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a496350>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "take: a",
+                    "fillcolor": ""
+                },
+                {
+                    "id": "<src.operation.Operation object at 0x71ee1a496950>",
+                    "name": "",
+                    "shape": "point",
+                    "xlabel": "emit: M2.out",
+                    "fillcolor": ""
+                }
+            ],
+            "edges": [
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a496350>",
+                    "B": "<src.operation.Operation object at 0x71ee1a496b00>",
+                    "label": "a"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a496b00>",
+                    "B": "<src.process.Process object at 0x71ee1a496a70>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a496a70>",
+                    "B": "<src.operation.Operation object at 0x71ee1a4970a0>",
+                    "label": "M1.out"
+                },
+                {
+                    "A": "<src.operation.Operation object at 0x71ee1a4970a0>",
+                    "B": "<src.process.Process object at 0x71ee1a496b30>",
+                    "label": ""
+                },
+                {
+                    "A": "<src.process.Process object at 0x71ee1a496b30>",
+                    "B": "<src.operation.Operation object at 0x71ee1a496950>",
+                    "label": "M2.out"
+                }
+            ],
+            "subworkflows": {}
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf6/test6.nf b/tests/ressources/workflows/wf6/test6.nf
new file mode 100644
index 0000000000000000000000000000000000000000..3e71a59d73f8ce61c68bbb8c998c186b8e559eab
--- /dev/null
+++ b/tests/ressources/workflows/wf6/test6.nf
@@ -0,0 +1,46 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+workflow sub1 {
+    take:
+    a
+
+    main:
+    M1(a)
+    M2(M1.out)
+
+    emit:
+    M2.out
+}
+
+
+
+workflow {
+    if(1==1){
+        a = 1
+    } else {
+        a = Channel.empty()
+    }
+    c = sub1(a)
+}
+
diff --git a/tests/ressources/workflows/wf7/specification_graph.json b/tests/ressources/workflows/wf7/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..216264373f0df3533f9f99c26f0c0b1ae521c613
--- /dev/null
+++ b/tests/ressources/workflows/wf7/specification_graph.json
@@ -0,0 +1,50 @@
+{
+    "nodes": [
+        {
+            "id": "<src.process.Process object at 0x71ee1a496170>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a496470>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M1.out",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a494880>",
+            "name": "M1",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a495bd0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "Channel.empty()",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.process.Process object at 0x71ee1a494880>",
+            "B": "<src.operation.Operation object at 0x71ee1a496470>",
+            "label": "M1.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a496470>",
+            "B": "<src.process.Process object at 0x71ee1a496170>",
+            "label": ""
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a495bd0>",
+            "B": "<src.process.Process object at 0x71ee1a494880>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {}
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf7/test7.nf b/tests/ressources/workflows/wf7/test7.nf
new file mode 100644
index 0000000000000000000000000000000000000000..d54dd9579a6bc071ae21ca681900a52259b71a05
--- /dev/null
+++ b/tests/ressources/workflows/wf7/test7.nf
@@ -0,0 +1,32 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+
+workflow {
+    M1(Channel.empty())
+    if(1==1){
+        M2(M1.out)
+    }
+
+}
+
diff --git a/tests/ressources/workflows/wf8/specification_graph.json b/tests/ressources/workflows/wf8/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..46978b07d59b56bf2bd95a7e048eb5476eda1f7c
--- /dev/null
+++ b/tests/ressources/workflows/wf8/specification_graph.json
@@ -0,0 +1,62 @@
+{
+    "nodes": [
+        {
+            "id": "<src.process.Process object at 0x71ee1a496050>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a496410>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M1()",
+            "fillcolor": "white"
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a2400a0>",
+            "name": "M1",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a495780>",
+            "name": "M3",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a243580>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "M1.out",
+            "fillcolor": "white"
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.process.Process object at 0x71ee1a2400a0>",
+            "B": "<src.operation.Operation object at 0x71ee1a496410>",
+            "label": ""
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a496410>",
+            "B": "<src.process.Process object at 0x71ee1a496050>",
+            "label": ""
+        },
+        {
+            "A": "<src.process.Process object at 0x71ee1a2400a0>",
+            "B": "<src.operation.Operation object at 0x71ee1a243580>",
+            "label": "M1.out"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a243580>",
+            "B": "<src.process.Process object at 0x71ee1a495780>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {}
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf8/test8.nf b/tests/ressources/workflows/wf8/test8.nf
new file mode 100644
index 0000000000000000000000000000000000000000..720d2ff4629e15d188af6f061d1330ffdbba739c
--- /dev/null
+++ b/tests/ressources/workflows/wf8/test8.nf
@@ -0,0 +1,38 @@
+#!/usr/bin/env nextflow
+
+process M1 {
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M2 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+process M3 {
+    input:
+    path a
+
+    """
+    SOMETHING
+    """
+}
+
+
+workflow {
+    M2(M1())
+    M3(M1.out)
+}
+
diff --git a/tests/ressources/workflows/wf9/specification_graph.json b/tests/ressources/workflows/wf9/specification_graph.json
new file mode 100644
index 0000000000000000000000000000000000000000..c9cc76ac79a262fa8a9936acd5c40ab6e27b8608
--- /dev/null
+++ b/tests/ressources/workflows/wf9/specification_graph.json
@@ -0,0 +1,50 @@
+{
+    "nodes": [
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a53b1c0>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "ch2 = Channel.empty()",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a32ff10>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "ch2 = Channel.empty()",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.process.Process object at 0x71ee1a53b2b0>",
+            "name": "M2",
+            "shape": "ellipse",
+            "xlabel": "",
+            "fillcolor": ""
+        },
+        {
+            "id": "<src.operation.Operation object at 0x71ee1a268850>",
+            "name": "",
+            "shape": "point",
+            "xlabel": "ch2",
+            "fillcolor": ""
+        }
+    ],
+    "edges": [
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a53b1c0>",
+            "B": "<src.operation.Operation object at 0x71ee1a268850>",
+            "label": "ch2"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a32ff10>",
+            "B": "<src.operation.Operation object at 0x71ee1a268850>",
+            "label": "ch2"
+        },
+        {
+            "A": "<src.operation.Operation object at 0x71ee1a268850>",
+            "B": "<src.process.Process object at 0x71ee1a53b2b0>",
+            "label": ""
+        }
+    ],
+    "subworkflows": {}
+}
\ No newline at end of file
diff --git a/tests/ressources/workflows/wf9/test9.nf b/tests/ressources/workflows/wf9/test9.nf
new file mode 100644
index 0000000000000000000000000000000000000000..cc1a5a5fcfa8b6022c97662419c997a47d1ba528
--- /dev/null
+++ b/tests/ressources/workflows/wf9/test9.nf
@@ -0,0 +1,28 @@
+#!/usr/bin/env nextflow
+
+
+
+process M2 {
+    input:
+    path a
+
+    output:
+    path 'chunk_*'
+
+    """
+    SOMETHING
+    """
+}
+
+
+
+workflow {
+    if(1==1){
+        ch2 = Channel.empty()
+    } else {
+        ch2 = Channel.empty()
+    }
+    M2(ch2)
+
+}
+
diff --git a/tests/test_call.py b/tests/test_call.py
deleted file mode 100644
index a5821895c2b1a1c78628adb23a3d0dcf3f6c8852..0000000000000000000000000000000000000000
--- a/tests/test_call.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.call import *
-
-class TestCall(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_channel.py b/tests/test_channel.py
deleted file mode 100644
index b823d57b323a84889cd4eb09898c493903bd8612..0000000000000000000000000000000000000000
--- a/tests/test_channel.py
+++ /dev/null
@@ -1,86 +0,0 @@
-import unittest
-from src.channel import *
-from src.nextflow_file import Nextflow_File
-
-
-class EmptyNextflowFile(Nextflow_File):
-    def __init__(self, address="tests/ressources/channel/empty_wf.nf", display_info=False, *args, **kwargs):
-        super().__init__(address=address, display_info=display_info, *args, **kwargs)
-
-    def check_file_correctness_after_DSL(self):
-        return
-
-
-class TestChannel(unittest.TestCase):
-
-    def test_get_code(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        self.assertIsInstance(ch1, Channel)
-        self.assertEqual(ch1.get_code(), "ch1")
-
-    def test_get_name(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        self.assertEqual(ch1.get_name(), "ch1")
-
-    def test_get_type(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        self.assertEqual(ch1.get_type(), "Channel")
-
-    def test_add_source(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        self.assertEqual(ch1.get_source(), [])
-        ele = "This is a test"
-        ch1.add_source(ele)
-        self.assertEqual(ch1.get_source(), [ele])
-
-    def test_add_sink(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        self.assertEqual(ch1.get_sink(), [])
-        ele = "This is a test"
-        ch1.add_sink(ele)
-        self.assertEqual(ch1.get_sink(), [ele])
-
-    def test_set_sink_null(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        ele = "This is a test"
-        ch1.add_sink(ele)
-        self.assertEqual(ch1.get_sink(), [ele])
-        ch1.set_sink_null()
-        self.assertEqual(ch1.get_sink(), [])
-
-    def test_remove_element_from_sink(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        ele = "This is a test"
-        ch1.add_sink(ele)
-        self.assertEqual(ch1.get_sink(), [ele])
-        ch1.remove_element_from_sink(ele = ele)
-        self.assertEqual(ch1.get_sink(), [])
-
-    def test_equal(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        ch1_1 = Channel(name = "ch1", origin = wf1)
-        ch2 = Channel(name = "ch2", origin = wf1)
-        self.assertTrue(ch1.equal(channel=ch1_1))
-        self.assertFalse(ch1.equal(channel=ch2))
-
-    def test_get_structure(self):
-        wf1 = EmptyNextflowFile()
-        ch1 = Channel(name = "ch1", origin = wf1)
-        dico = {}
-        dico['nodes'] = []
-        dico['edges'] = []
-        dico['subworkflows'] = {}
-        ch1.add_source("out1")
-        ch1.add_source("out2")
-        ch1.get_structure(dico, "in")
-        dico_true = {'nodes': [], 'edges': [{'A': 'out1', 'B': 'in', 'label': 'ch1'}, {'A': 'out2', 'B': 'in', 'label': 'ch1'}], 'subworkflows': {}}
-        self.assertEqual(dico, dico_true)
-    
diff --git a/tests/test_code.py b/tests/test_code.py
deleted file mode 100644
index 0dd7b5f0c4663b41c58cf209799441bcd52d29d9..0000000000000000000000000000000000000000
--- a/tests/test_code.py
+++ /dev/null
@@ -1,16 +0,0 @@
-import unittest
-from src.code_ import *
-
-class TestCode(unittest.TestCase):
-
-    def test_get_code(self):
-        with open("tests/ressources/outils/remove_comments_with.nf", 'r') as f:
-            code_with_comments = f.read()
-
-        with open("tests/ressources/outils/remove_comments_wo.nf", 'r') as f:
-            code_wo_comments = f.read()
-        code = Code(code_with_comments, origin=None)
-        self.assertEqual(code.code, '\n'+code_with_comments+'\n')
-        self.assertEqual(code.code_wo_comments.strip(), code_wo_comments.strip())
-        self.assertEqual(code.get_code(), code_wo_comments.strip())
-    
diff --git a/tests/test_emitted.py b/tests/test_emitted.py
deleted file mode 100644
index ea4a1287459f4a4d4cb4484be4691f99f853e55d..0000000000000000000000000000000000000000
--- a/tests/test_emitted.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.emitted import *
-
-class TestEmitted(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_executor.py b/tests/test_executor.py
deleted file mode 100644
index 350e7e22ef61fa8c1607968e59bb5651bb48d0e9..0000000000000000000000000000000000000000
--- a/tests/test_executor.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.executor import *
-
-class TestExecutor(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_function.py b/tests/test_function.py
deleted file mode 100644
index cd19970c738e0e458e73bfb991adf82754ff02db..0000000000000000000000000000000000000000
--- a/tests/test_function.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.function import *
-
-class TestFunction(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_graph.py b/tests/test_graph.py
deleted file mode 100644
index 7b35fdb97edcdcc1cc111c3993a2bf4de5a9ffac..0000000000000000000000000000000000000000
--- a/tests/test_graph.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.graph import *
-
-class TestGraph(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_include.py b/tests/test_include.py
deleted file mode 100644
index 80dd16f67b605c25e7b8ce0aafb3b6bce4879ca7..0000000000000000000000000000000000000000
--- a/tests/test_include.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.include import *
-
-class TestInclude(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_main_DSL2.py b/tests/test_main_DSL2.py
deleted file mode 100644
index 463a752aa43e30e2e5cccb4de65ce0d7c278b5b2..0000000000000000000000000000000000000000
--- a/tests/test_main_DSL2.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.main import *
-
-class TestMain(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_nextflow_building_blocks.py b/tests/test_nextflow_building_blocks.py
deleted file mode 100644
index 47937bdcd8a8d6272366e12599405191da59ef27..0000000000000000000000000000000000000000
--- a/tests/test_nextflow_building_blocks.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import unittest
-from src.nextflow_building_blocks import *
-
-class TestNextflow_Building_Blocks(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
-
diff --git a/tests/test_nextflow_file.py b/tests/test_nextflow_file.py
deleted file mode 100644
index 7b8b3098787ddbcfa172f643c591539ecf947391..0000000000000000000000000000000000000000
--- a/tests/test_nextflow_file.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.nextflow_file import *
-
-class TestNextflow_File(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_operation.py b/tests/test_operation.py
deleted file mode 100644
index 160b5fd8bbe2aeb7716ee52adac7d4a668d6f785..0000000000000000000000000000000000000000
--- a/tests/test_operation.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.operation import *
-
-class TestOperation(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_process.py b/tests/test_process.py
deleted file mode 100644
index ff40c83af42704aa802c4691d60b5795351d7223..0000000000000000000000000000000000000000
--- a/tests/test_process.py
+++ /dev/null
@@ -1,105 +0,0 @@
-import unittest
-from src.process import *
-from src.nextflow_file import Nextflow_File
-
-class TestProcess(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-
-
-    def test_initialise_name(self):
-        #DSL1
-        file = Nextflow_File("tests/ressources/process/process_DSL1.nf", display_info=False, DSL = "DSL1")
-        file.initialise()
-        process_DSL1 = file.processes[0]
-        self.assertEqual(process_DSL1.get_name(),  "cleanSpeciesTree")
-        self.assertEqual(process_DSL1.get_alias(), "cleanSpeciesTree")
-        #DSL2
-        file = Nextflow_File("tests/ressources/process/process_DSL2.nf", display_info=False, DSL = "DSL2")
-        file.initialise()
-        process_DSL2 = file.processes[0]
-        self.assertEqual(process_DSL2.get_name(),  "OPENMS_FALSEDISCOVERYRATE")
-        self.assertEqual(process_DSL2.get_alias(), "OPENMS_FALSEDISCOVERYRATE")
-
-    def test_set_alias(self):
-        file = Nextflow_File("tests/ressources/process/process_DSL2.nf", display_info=False, DSL = "DSL2")
-        file.initialise()
-        process_DSL2 = file.processes[0]
-        self.assertEqual(process_DSL2.get_alias(), "OPENMS_FALSEDISCOVERYRATE")
-        new_alias = "new_alias"
-        process_DSL2.set_alias(new_alias)
-        self.assertEqual(process_DSL2.get_name(),  "OPENMS_FALSEDISCOVERYRATE")
-        self.assertEqual(process_DSL2.get_alias(), new_alias)
-    
-    
-    def test_which_DSL(self):
-        #DSL1
-        file = Nextflow_File("tests/ressources/process/process_DSL1.nf", display_info=False, DSL = "DSL1")
-        file.initialise()
-        process_DSL1 = file.processes[0]
-        self.assertEqual(process_DSL1.which_DSL(),  "DSL1")
-        #DSL2
-        file = Nextflow_File("tests/ressources/process/process_DSL2.nf", display_info=False, DSL = "DSL1")
-        file.initialise()
-        process_DSL2 = file.processes[0]
-        self.assertEqual(process_DSL2.which_DSL(),  "DSL2")
-        
-    def test_is_initialised(self):
-        #DSL1
-        file = Nextflow_File("tests/ressources/process/process_DSL1.nf", display_info=False, DSL = "DSL1")
-        file.initialise()
-        process_DSL1 = file.processes[0]
-        self.assertTrue(process_DSL1.is_initialised())
-        #DSL2
-        file = Nextflow_File("tests/ressources/process/process_DSL2.nf", display_info=False, DSL = "DSL2")
-        file.initialise()
-        process_DSL2 = file.processes[0]
-        self.assertTrue(process_DSL2.is_initialised())
-    
-    
-    def test_get_type(self):
-        #DSL1
-        file = Nextflow_File("tests/ressources/process/process_DSL1.nf", display_info=False, DSL = "DSL1")
-        file.initialise()
-        process_DSL1 = file.processes[0]
-        self.assertEqual(process_DSL1.get_type(),  "Process")
-        #DSL2
-        file = Nextflow_File("tests/ressources/process/process_DSL2.nf", display_info=False, DSL = "DSL2")
-        file.initialise()
-        process_DSL2 = file.processes[0]
-        self.assertEqual(process_DSL2.get_type(),  "Process")
-
-    #TODO define the tests for the inputs and outputs
-        
-    def test_get_structure(self):
-        #DSL1
-        file = Nextflow_File("tests/ressources/process/process_DSL1.nf", display_info=False, DSL = "DSL1")
-        file.initialise()
-        process_DSL1 = file.processes[0]
-        dico = {}
-        dico['nodes'] = []
-        dico['edges'] = []
-        dico['subworkflows'] = {}
-        process_DSL1.get_structure(dico)
-        dico_true = {'nodes': [{'id': str(process_DSL1), 'name': 'cleanSpeciesTree', 'shape': 'ellipse', 'xlabel': '', 'fillcolor': ''}], 'edges': [], 'subworkflows': {}}
-        self.assertEqual(dico,  dico_true)
-        
-        #DSL2
-        file = Nextflow_File("tests/ressources/process/process_DSL2.nf", display_info=False, DSL = "DSL2")
-        file.initialise()
-        process_DSL2 = file.processes[0]
-        dico = {}
-        dico['nodes'] = []
-        dico['edges'] = []
-        dico['subworkflows'] = {}
-        process_DSL2.get_structure(dico)
-        dico_true = {'nodes': [{'id': str(process_DSL2), 'name': 'OPENMS_FALSEDISCOVERYRATE', 'shape': 'ellipse', 'xlabel': '', 'fillcolor': ''}], 'edges': [], 'subworkflows': {}}
-        self.assertEqual(dico,  dico_true)
-
-    def test_(self):
-        file = Nextflow_File("tests/ressources/process/process_DSL1.nf", display_info=False, DSL = "DSL1")
-        file.initialise()
-        process_DSL1 = file.processes[0]
-
-    
diff --git a/tests/test_subworkflow.py b/tests/test_subworkflow.py
deleted file mode 100644
index 93f1bc0e19d0f87543cff5e67482d1f04f1f94ee..0000000000000000000000000000000000000000
--- a/tests/test_subworkflow.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import unittest
-from src.subworkflow import *
-
-class TestSubworkflow(unittest.TestCase):
-
-    def test_check_everything_works(self):
-        self.assertTrue(True)
-    
diff --git a/tests/test_workflows_simple_duplicate.py b/tests/test_workflows_simple_duplicate.py
new file mode 100644
index 0000000000000000000000000000000000000000..30c2ed5a9a8ad920ddd76637435d1c55f9bb164d
--- /dev/null
+++ b/tests/test_workflows_simple_duplicate.py
@@ -0,0 +1,108 @@
+import unittest
+import glob
+from src.workflow import Workflow
+
+class TestWorkflows(unittest.TestCase):
+    
+        def test_wfwf6_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf6", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf6/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf1_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf1", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf1/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf13_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf13", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf13/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf8_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf8", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf8/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf3_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf3", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf3/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf2_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf2", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf2/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf5_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf5", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf5/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf16_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf16", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf16/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf12_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf12", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf12/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf10_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf10", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf10/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf9_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf9", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf9/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf7_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf7", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf7/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf4_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf4", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf4/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf15_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf15", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf15/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf17_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf17", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf17/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf14_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf14", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf14/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
+        def test_wfwf11_simple_duplicate(self):
+            w = Workflow(f"tests/ressources/workflows/wf11", display_info=False, duplicate=True)
+            w.initialise()
+            json_files = glob.glob(f'tests/ressources/workflows/wf11/*.json', recursive=False)
+            self.assertTrue(w.check_if_equal(json_files[0]))
+        
\ No newline at end of file