planemo icon indicating copy to clipboard operation
planemo copied to clipboard

Workflow testing reports number of tests incorrectly

Open wm75 opened this issue 6 years ago • 1 comments

The following test.yml for the training material quality-control tutorial workflow provides a good illustration of the problem:

---
- doc: "Test sample data for Sequence-analyses:Quality-control"
  job:
    reads_1:
      class: File
      location: https://zenodo.org/record/61771/files/GSM461178_untreat_paired_subset_1.fastq
      filetype: fastqsanger
    reads_2:
      class: File
      location: https://zenodo.org/record/61771/files/GSM461178_untreat_paired_subset_2.fastq
      filetype: fastqsanger
  outputs:
    reads_1_fastqc:
      asserts:
        has_text:
          text: 'Sanger / Illumina 1.9'
    reads_1_cutadapt:
      asserts:
        has_text:
          text: '3,651,491 bp (98.7%)'
    reads_2_fastqc:
      asserts:
        has_text:
          text: 'Sequence length	37'
    reads_cutadapt:
      asserts:
        has_text:
          text: '98,624 (98.6%)'
    multiqc:
      asserts:
        has_text:
          text: 'FastQC'

This workflow test checks properties of 5 different output files, yet planemo reports: All 1 test(s) successfully executed.

5 test(s) executed is what I would have expected.

wm75 avatar Nov 07 '18 08:11 wm75

It is a one test with 5 asserts/steps - this is fairly common approach and you will still see details if one of the steps fail. Similar to this being one test: https://github.com/galaxyproject/galaxy/blob/dev/test/api/test_histories.py#L58

martenson avatar Nov 07 '18 13:11 martenson