Getting your commit graph to show everything on Github

This is fairly simple, but for the sake of vanity and the motivation that this little time series graph brings I have to mention it.

github commit graph

I set up git with a fresh repo on my local machine after having set up 2 factor auth for github at work and despaired for a little while with the setup.  But I eventually got through that (A helpful page) only to find that my commits weren’t showing up on my graph even though my commits were showing up in github! I’d authenticated and everything. Instead a ghostly avatar with my name showed up in my activity feed.

As it turns out the commit graph is only updated if Github recognizes your git config user.email!

Simply set it with git config user.email "yourgithubaccountemail@example.com" and all should be right in the world on your next git push and you won’t miss any more little green boxes.

Quick Test Automation with CasperJS

I find myself as the sole QA Engineer at a rapidly changing startup needing to automate integration tests.  There are legacy Capybara tests in our large Sinatra app, some javascript unit tests, and a bevy of test suites for the remainder of the stack. But, like any software product, its codebase grows faster than the test suite.

In looking for a quick way to get repeatable manual tests of the web application front end I settled on CasperJS.  Partly because of the speed of implementation, and the familiarity of Javascript and some robust features like great command line tools.

npm install casperjs --devel

And you’re on your way!

A great use i’ve found for casper scripts is to quickly hit all of the accessible dynamic FE page types we have and check for a 200 status to help regression test very quickly.

casper.test.begin('johanncodes.com returns an OK status', 1, function(test) {
    casper.start('https://johanncodes.com/', function() {
        test.assertHttpStatus(200);
    }).run(function() {
        test.done();
    });
});

Another great feature i’ve made use of is CasperJS’ great form fill and submission ability, which lets me easily work through tasks like user account creation, user profile changes, navigation through checkout flows and other fun things.

Even with very rudimentary javascript knowledge you can start to build very powerful tests and scripts almost immediately.  If you’re looking to automate very rote parts of your QA flow that have a binary success/fail state you can check for CasperJS is worth a look.

Check out the docs and installation instructions.

Happy testing!