Mitchell McKenna - tagged with testing http://mitchmckenna.com/feed en-us http://blogs.law.harvard.edu/tech/rss LifePress mitchellmckenna@gmail.com "Avoiding Mockageddon" Sebastian Bergmann http://mitchmckenna.com/post/18964/avoiding-mockageddon-sebastian-bergmann

Conference talk from Sebastian Bergmann, the creator of PHPUnit, on the dangers of "overmocking" as well as how to avoid them.

]]>
Tue, 14 Jul 2020 11:00:00 -0400 http://mitchmckenna.com/post/18964/avoiding-mockageddon-sebastian-bergmann/avoiding-mockageddon-sebastian-bergmann
Writing Your Own Test Doubles http://mitchmckenna.com/post/17038/writing-your-own-test-doubles

Adam Wathan screencast on creating your own test doubles.

Once in a while I run into a situation where trying to use a mocking library hurts the readability of my test. In this screencast, I walk through writing a custom fake to clean up the test and simplify my assertions.

]]>
Wed, 21 Sep 2016 15:13:00 -0400 http://mitchmckenna.com/post/17038/writing-your-own-test-doubles/writing-your-own-test-doubles
Dredd - API Testing Framework http://mitchmckenna.com/post/15790/dredd-api-testing-framework

Dredd is a command-line tool for validating API documentation written in API Blueprint format against its actual code. With Dredd you can easily plug your API documentation into a Continous Integration system like Travis CI or Jenkins and have API documentation up-to-date, all the time. Works to test API's written in PHP, Node.js, Ruby and Python. I've been using Swagger for API docs, but I'm looking forward to trying out Dredd + Blueprint in a future project.

]]>
Sat, 26 Sep 2015 20:59:00 -0400 http://mitchmckenna.com/post/15790/dredd-api-testing-framework/dredd-api-testing-framework
pageres - Get Screenshots Of A Responsive Site At Many Sizes At Once http://mitchmckenna.com/post/14528/pageres-get-screenshots-of-a-responsive-site-at-many-sizes-at-once

Nodejs library to easily get screenshots of a responsive site at various resolutions; in your node script just specify the site and the size of screenshots and the directory to save the screenshots to.

]]>
Mon, 30 Jun 2014 15:07:00 -0400 http://mitchmckenna.com/post/14528/pageres-get-screenshots-of-a-responsive-site-at-many-sizes-at-once/pageres-get-screenshots-of-a-responsive-site-at-many-sizes-at-once
Laravel 4 Debugbar http://mitchmckenna.com/post/14147/laravel-4-debugbar

This is a package to integrate PHP Debug Bar with Laravel. Adds a service provider and facade to use as a profiler which you can see results in the debug bar at bottom of your pages during development.

]]>
Wed, 05 Mar 2014 15:03:00 -0500 http://mitchmckenna.com/post/14147/laravel-4-debugbar/laravel-4-debugbar
Better Testing in Laravel - Jeffrey Way http://mitchmckenna.com/post/12641/laracon-day-1-talk-2-jeffrey-way

Jeffery Way, editor at Nettuts, is somewhat of a Laravel evangelist. In his talk at Laravel Conference 2013 he goes over how you can write more testable code, and how you can improve your unit tests.

  • 5:40 - Intro to Laravel's handy generator Artisan to generate files, and a package he put together of even more handy generators, you can get it on github: Laravel-4-Generators.
  • 10:55 - Using Dependency Injection to write more testable code.
  • 13:30 - Smart type hinting with Laravel's IOC Containers.
  • 18:45 - Intro to Interfaces using an example of injecting your database layer via an Interface implementation so your controller isn't bound to an ORM.
  • 24:05 - Creating php unit tests.
  • 28:40 - Using mock objects and the Mockery framework.
  • 33:50 - Making tests more readable. I found this interesting; creating common assertions to simplify writing tests, so your more likely to write them in the future.
]]>
Fri, 22 Mar 2013 02:49:00 -0400 http://mitchmckenna.com/post/12641/laracon-day-1-talk-2-jeffrey-way/laracon-day-1-talk-2-jeffrey-way