Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test only changed functions #6

Open
roman01la opened this issue Jul 30, 2018 · 4 comments
Open

Test only changed functions #6

roman01la opened this issue Jul 30, 2018 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@roman01la
Copy link

Does it runs generative tests for every specced function in a namespace or only for what's changed? Haven't tried it yet, but how does it impacts perf when everything gets checked on every code reload?
Thanks!

@gnl
Copy link
Owner

gnl commented Jul 30, 2018

When generative testing is enabled and (g/check) is called at the bottom of the namespace, it runs the checks for every specced function in a hot-reloaded namespace. It would be great if we could go more granular and really only re-test changed functions, but we ain't there yet. I heard that there's some work being done by the folks at Cognitect that might make this possible in the future, so keeping an eye on it.

There is a performance impact depending on the number and complexity of the functions in the changed namespace as well as the number of test iterations you set, but whether that'll be a problem really depends on the project and personal workflow/preferences.

There's more info on this in the spec-testing section in the documentation, but the TL;DR is that if you feel the performance impact is too great, you can enable ::check true, adjust ::num-tests-ext, and enable ::extensive-tests in your test configuration, so that you can only run the generated generative tests as part of your regular CI/testing workflow.

With generative testing disabled (which it is by default) in your regular dev build config the performance impact is virtually zero.

@gnl gnl added the enhancement New feature or request label Jul 31, 2018
@gnl gnl added this to the someday milestone Aug 26, 2018
@gnl
Copy link
Owner

gnl commented May 21, 2020

👋 Hi. I'm posting this same comment to all issue threads to just give a quick heads up that the project, despite rumours and some evidence to the contrary, is not dead. It was hibernating for a little while and now nearing the long-awaited next release, which will fix some long-standing issues (and introduce some breaking changes to the config).

I'll be reviewing all open issues and PRs over the next couple of weeks, so stay tuned and thanks for the patience.

See also this Slack thread

@gnl
Copy link
Owner

gnl commented Jul 20, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants