You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When test task is used in a TDD workflow and you do not pass it any specific namespace, it's performance would not be judged acceptable by a TDD practitioner.
You can veryfy the issue as follows:
git clone https://github.com/magomimmo/modern-cljs.git
cd modern-cljs
git checkout se-tutorial-15
boot watch testing test -n modern-cljshopping.validators-test
Starting file watcher (CTRL-C to quit)...
Testing modern-cljs.shopping.validators-test
Ran 1 tests containing 13 assertions.
0 failures, 0 errors.
Elapsed time: 4.777 sec
then force a test failure as follows:
Modify the first unit test in the monder-cljs/test/cljc/modern_cljs/shopping/validators_test.cljc as follows:
This is because boot-test runs tests in a new pod each time. This means that all namespaces need to be compiled each time, instead only the changed ones.
Alternative (used by e.g. Midje) would be to use tools.namespace to reload changed namespaces in the same pod each time.
About this, can we actually do anything about it? It would be really great if boot had a good story for tests. I know that @Deraen has developed an alternative (boot-alt-test) but they both feel incomplete at the moment and it would be awesome to focus our energy on either one or the other. Lein beats us here and we don't want that 😈
When
test
task is used in a TDD workflow and you do not pass it any specific namespace, it's performance would not be judged acceptable by a TDD practitioner.You can veryfy the issue as follows:
then force a test failure as follows:
Modify the first unit test in the
monder-cljs/test/cljc/modern_cljs/shopping/validators_test.cljc
as follows:you'll see the following report:
As you see it takes 0.5 sec.
Now remove the forced failure:
As you see it takes only 0.3 sec to get the results again:
Stop boot process and relaunch it without specifying any namespace:
boot watch testing test Starting file watcher (CTRL-C to quit)... Testing modern-cljs.core Testing modern-cljs.login Testing modern-cljs.login.validators Testing modern-cljs.remotes Testing modern-cljs.shopping.validators Testing modern-cljs.shopping.validators-test Testing modern-cljs.templates.shopping Ran 1 tests containing 13 assertions. 0 failures, 0 errors. Elapsed time: 8.998 sec
Now it takes 9 sec, instead of 4 sec to launch the tests. Force a failure as before.
Now it takes almost 6 sec to rerun the tests. Fix the forced failure
as you see it takes again more than 5 sec to rerun the tests.
Is that normal?
The text was updated successfully, but these errors were encountered: