royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <>
Subject Re: Test Beads (was Re: Unit Tests et. al.)
Date Tue, 07 Nov 2017 17:40:06 GMT
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

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

Hope this is clearer…

> On Nov 7, 2017, at 7:33 PM, Alex Harui <> 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
>    }
>  }

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message