Reputation: 300
I need to parallelize my python unit-tests which I wrote using the default unittest module. I'm trying to decide between two approaches:
I lean towards #1 since I already have a working setup and particularly the test suite generation (which is using a generator that parse an excel spreadsheet and is not trivial)
Any recommendation on a particular approach to follow ?
Note: my company is using LSF and I must use it for resource sharing with other teams.
Upvotes: 4
Views: 765
Reputation: 23561
i'd first try to simply install "pytest-xdist" from pypi and run your existing tests with "py.test -n 5" in 5 parallel processes. If that basically works it means that modifying pytest-xdist to use the LSF transport is a worthwhile option. Effectively you will need to look into extending execnet (http://codespeak.net/execnet) which is the underlying library for distributing execution. HTH.
Upvotes: 1