FLUID-6099: The IoC testing framework should log a warning or failure if a test specification is malformed

Metadata

Source
FLUID-6099
Type
Improvement
Priority
Major
Status
Open
Resolution
N/A
Assignee
Antranig Basman
Reporter
Colin Clark
Created
2016-12-18T12:19:51.828-0500
Updated
2016-12-18T19:01:24.182-0500
Versions
  1. 2.0
Fixed Versions
N/A
Component
  1. IoC Testing Framework

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.

Comments

  • Antranig Basman commented 2016-12-18T19:01:24.182-0500

    See also FLUID-6097 for an IoC testing framework diagnostics improvement