Python: testing beyond exceptions

Recently working on some code I was doing some basic tests that checked for an exception being raised. The tests looked like this: def test_user_identification_is_valid_option(self): with self.assertRaises(ValueError): example_seller(products=[ 'id': 'hai', 'description': 'a description', 'recurrence': None, 'user_identification': True, }]) def test_…

Running tests on Sauce Labs via Travis

For the Payments Team's front-end projects we've just landed support for running the front-end unit tests using Sauce Labs. About Sauce Labs In case you've never heard of Sauce Labs (unlikely!) they provide access to a multitude of browser/platform combinations via vms so you can run your automated test…

JS: Creating instances without new

During a code review recently I was looking at some code that was using the new keyword to create an instance e.g: var inst = new MyConstructor(); The context object when new isn't used The code contained a safeguard to bail if the new keyword wasn't used. Which is a…

Taming SlimerJS

We've been using CasperJS for E2E testing on Marketplace projects for quite some time. Run alongside unittests, E2E testing allows us to provide coverage for specific UI details and to make sure that users flows operate as expected. It also can be used for writing regression tests for complex interactions.…