tarpas / pytest-testmon

Selects tests affected by changed files. Executes the right tests first. Continuous test runner when used with pytest-watch.
https://testmon.org
MIT License
800 stars 54 forks source link

[Question] Generate .testmondata database without running tests #185

Closed Lightjohn closed 2 years ago

Lightjohn commented 2 years ago

Hi,

I'm trying to speed up a CI that is taking 3H30 in serial. Testmon could do a wonderful work in that aspect (and even more). But the first run is an issue so I thought of something:

When I create a new branch from master (against which a full CI has been run) would it be possible to just say: here testmon generate your database against that code/commit that I know is tested and so no need to run the tests. Generating DB should be fast and then I can develop new features and only run tests affected by my changes.

Maybe an option like --testmon-norun or --testmon-updateonly?

Is it something that could happen or did I misunderstood how testmon works?

Thanks and good job for this code!

tarpas commented 2 years ago

You're misunderstanding how testmon works. For a testmon run both dependency information and list of changes is needed. The process you're describing could generate the list of changes but not the dependency information. Dependencies are only determined during code execution.

tarpas commented 2 years ago

@Lightjohn but it is probably possible to run testmon in CI and re-use the information on the branch. Can you write me more about your project? tibor@testmon.org