Mocking django class based views

While going through Appendix C I quickly ran into trouble with the mocky Unit test for the new list view when I converted it to a class based view. the following is a description of how I made it work.


Read More

making sure you see all your failed tests in Jenkins

Jenkins runs it's build shell scripts with /bin/sh -xe which means any command that runs tests that has failing tests will abort the entire build and you likely won't see the JUnit reports for your entire test suite.

I've come up with some simple shell functions that will allow all of our test commands to run and then still allow the build to still fail like it's supposed to when we are ready for it.


Read More

Jenkins and github integration for the testinggoat book

This article describes my Jenkins setup for going through the book Test-Driven Development with Python

We will discuss the following steps:

  • Initial linode setup (Ubuntu 16.04LTS)
  • securing your linode
  • setting up jenkins
  • Nginx reverse proxy for jenkins with free SSL using let's encrypt
  • github integration with protected branches based on our tests
  • better tracking and presentation of our test runs via xUnit (as per John Fitzpatrick's suggestion on the Chapter 24 page of the book)

Read More

A better way to run QUnit tests.

There is a much simpler and better way to run QUnit tests for Test-Driven Development with Python

After trying to use the xUnit plugin for Jenkins (which I will be writing about more in depth soon) I ran into the problem of generating JUnit reports for QUnit tests. This article is about my solution to that problem.


Read More

retry helper for BrokenPipeError in selenium

While going over chapter 21 of Test-Driven Development with Python I kept getting failing tests with

BrokenPipeError: [Errno 32] Broken pipe exception

This article describes my workaround for this problem.


Read More