Right. I’m proposing a totally different architecture.

In the architecture I’m proposing, the runner is a passive observer. The tests 
would be run by *the beads themselves* and *push* the results out to the runner.

The runner would have a count of the number of tests that are supposed to be 
run, and when all the tests return (or a fail-early test comes back) the runner 
exits with the pass/fail result.

To be clear, there would be *two* separate architectures.

1. Unit tests would be reserved for simple tests which could be run without 
waiting for UI things to happen. That would use an active test runner.
2. Integration tests would allow for complex and async tests where the test 
runner would be passive.

Hope this is clearer…
Harbs

> On Nov 7, 2017, at 7:33 PM, Alex Harui <[email protected]> wrote:
> 
> If the runner calls testBead.test(), the next line of code cannot check
> for results.
> 
>  for (i = 0; i < numTests; i++) {
>    testBead[i].test():
>    if (testBead[i].failed) {
>       // record failure
>    }
>  }

Reply via email to