This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-04
Channels
- # aleph (1)
- # aws-lambda (2)
- # beginners (30)
- # boot (2)
- # cider (7)
- # cljs-dev (65)
- # clojure (130)
- # clojure-denmark (1)
- # clojure-france (1)
- # clojure-germany (2)
- # clojure-greece (1)
- # clojure-italy (19)
- # clojure-kc (2)
- # clojure-nl (12)
- # clojure-poland (1)
- # clojure-russia (11)
- # clojure-spain (1)
- # clojure-spec (20)
- # clojure-uk (176)
- # clojurescript (65)
- # css (3)
- # cursive (8)
- # datomic (26)
- # editors (94)
- # emacs (10)
- # fulcro (66)
- # graphql (5)
- # midje (1)
- # off-topic (48)
- # om-next (2)
- # overtone (1)
- # re-frame (15)
- # reagent (6)
- # reitit (10)
- # shadow-cljs (68)
- # sql (3)
generative tests with specs take really long to run. what are some tips to try and reduce the testing time?
This can depend on your specs. Recursive specs can be especially costly. Can you give an example that’s taking a while to run?
@ackerleytng I don't feel generative tests should be run automatically as part of your (fast) unit test suite. They can/should be run separately or as part of CI for example. Because generative testing can definitely take a while.
Rich has mentioned a number of times that generative tests should only run when the relevant code changes. I'm sure he'd be very happy if someone built that for him.
I have built the hard parts of it, just needs a lot of productization
Do you mean to suggest that it's going to be a product that's sold or branded? Or just that it's rough? If it's rough, is it in such a state that the community might learn much from it by seeing it and seeing where they can take it?
It will be a contrib library. It’s not at a state where I’m ready to publish it yet, both for design and impl
We may end up sharing some code with codeq 2 also, which is similarly unfinished. Just a lot of stuff to shake out and none of us have time to work on either atm
@dominicm Shameless plug – https://github.com/gnl/ghostwheel runs gen-tests per namespace on hot-reload which is effectively just that (or close to it), with the option to make re-rendering dependent on successful test completion.
That’s great but what I’ve been working on is code analysis at the function dependency level
Function-level granularity would be even better for this of course – looking forward to it. Is this going to be a core thing or a third-party library?
The important thing is that if you're working on layout/view stuff where quick hot-reloading is most valuable, it doesn't run any expensive event handler gen-tests, etc.
@U064X3EF3 Oh, I just saw the other thread where you answered that, nevermind.
@seancorfield Thanks! I'm writing my own custom generators, could that contribute to slower testing?
even with overrides like {::foo (fn [] (gen/return <something pre-generated>}
does not improve testing speeds much. why would this be?
gen/return
probably doesn't run the generator at all, right?
well it is a generator, but everything it does is trivial, so it by itself should never make anything slow