Centralize test detection
wip