Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-6099

The IoC testing framework should log a warning or failure if a test specification is malformed

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: IoC Testing Framework
    • Labels:
      None

      Description

      It's easy to accidentally create a fluid.test.testCaseHolder "modules" specification structure that isn't quite properly formed. I accidentally wrote something like this, for example, where I omitted the "tests" block:

      fluid.defaults("flock.test.badTester", {
          gradeNames: "fluid.test.testCaseHolder,
      
          modules: [
              {
                   sequence: [
                       {
                           func: "QUnit.ok",
                           args: [true]
                       }
                   ]
              }
          ]
      });
      

      In this case, no errors or warnings are raised, and the test case passes with "0 of 0 tests run."

      Perhaps one option, instead, is to fail in the case that we encounter no tests? Or provide some kind of validation for test specifications? This is obviously a case of user error, but would be helpful to provide them with some guidance if we can.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              antranig Antranig Basman
              Reporter:
              colin Colin Clark
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: