[TIP] pytest: plugin for CasperJS or javascript integration tests

Marius Gedminas marius at gedmin.as
Fri May 8 05:24:47 PDT 2015


On Thu, May 07, 2015 at 06:03:52PM -0700, Luke Mergner wrote:
<snip>
> Ideally, I’d like to run the CasperJS integration tests through pytest.
> I’ve spent some time sketching out a test runner in Python that collects
> the test_*.js files by name and runs them in a threaded subprocess. It
> catches the return code, etc., from which I can infer success or failure.
> (Cool! I wrote my first threaded module.) Then I thought, it sure would be
> nice to add this as a pytest-plugin, then the server can be started as a
> fixture and the tests added in the normal test discovery phase.

You may also want to check out https://pypi.python.org/pypi/oejskit

Even if it won't help you with CasperJS (with which I'm unfamiliar), it
can be useful as an example of how one can integrate unit tests written
in JavaScript with py.test.

Marius Gedminas
-- 
The difference between Microsoft and 'Jurassic Park':
In one, a mad businessman makes a lot of money with beasts that should be
extinct.
The other is a film.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 173 bytes
Desc: Digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20150508/a92555c1/attachment.pgp>


More information about the testing-in-python mailing list