3 ms·
I'm actually more interested in the opposite, i.e. writing python code that tests a js (react) ui. I'm currently using pytest-splinter with phantomjs2, everyth
by ecesena 11y ago
I'm actually more interested in the opposite, i.e. writing python code that tests a js (react) ui.
I'm currently using pytest-splinter with phantomjs2, everything works quite well, but I had issues with simulating clicks (I'm still at an early stage of exploration, it could be my fault).
Any similar experiences?
- aptwebapps 11y agoHave you looked Selenium's Python integration? [1] If so, what issues prevent you from using it? 1. https://selenium-python.readthedocs.org/ https://selenium-python.readthedocs.org/
- ecesena 11y agoSplinter is based on that
- crdoconnor 11y agoYou should check out my new integration testing framework: http://hitchtest.com http://hitchtest.com It handles a lot of the boilerplate for running services like django, celery, postgres, etc. as well as getting selenium up and running with firefox so that you can simulate clicks and stuff and a mock SMTP server so that you can simulate sending emails.
- nichol4s 11y agoThanks! This looks pretty nice. I like how you've added the option to 'time travel' and check for example if a reminder mail is being send correctly.
- crdoconnor 11y agoGlad you like it. >I like how you've added the option to 'time travel' and check for example if a reminder mail is being send correctly. Yes, those two things are a large part of why I wrote it. I wanted a clean integration with libfaketime and I wanted to be able to create simple mock services that logged out JSON that the test could wait for with epoll, parse and use to verify that the event interaction occurred (e.g. email got received by SMTP gateway/API call was made).
- ecesena 11y agoCool thanks - I'll look at it!
- tluyben2 11y agoWe have started tests with PythonJS for testing this and, carefully, also for writing the actual JS. So far it works really well; PythonJS is very nicely done and after playing with it for a few hours (!) code looks and feels better than the corresponding JS.
- rectangletangle 11y agohttps://github.com/rectangletangle/imjf-py https://github.com/rectangletangle/imjf-py I wrote this Python client which facilitates basic JS integration testing.
- dsego 11y agoYou can try bok-choy ( bok-choy.readthedocs.org ).