Category Archive

Testing has a bad rap. The thought of writing unit tests to exercise code with the goal of 100% code coverage can be overwhelming for many projects. The number of man-hours to set up tests, create mocks when needed, test boundary conditions, contrive odd ball test cases can take some steam out of the project. If this is the definition of test, then yes, writing these types of tests can be tedious and feel meaningless.

I am a proponent of writing tests with a narrow focus. The tests I describe here show the completion of a story or the resolution of a bug. With this narrowness in mind, the task is much less daunting. My goal now is not about code coverage, but more about quality code. With this test, I want to be able to demonstrate to myself (and to whoever is reviewing my changes), that I have successfully resolved my task.

In this blog I will talk about my suggestions for writing meaningful tests in the context of a code review.

In this updated blog post, we’ve built an employee directory using Angular 2 with unit tests, gone over some differences between Angular 2 and version 1, and introduced some of the features of TypeScript.

I originally wrote this article/application when Angular 2 was still in beta. Now that it has released officially, I have updated the source code to reflect updates made to the Angular 2 framework for release. My approach to get this working was to start from the new Angular 2 quick-start project, port in the original application source code, and refactor as needed to make things work. Let’s get started…

As AngularJS applications become more complex, manual testing becomes unreliable and repetitive. Unit Testing is a great start for testing the code, but eventually End-to-End testing is needed for better coverage.

A great tool to use for this is Protractor, an end-to-end test framework for AngularJS applications. In this blog, we’ll briefly introduce the benefits of Protractor and give you the steps needed to get started with the tool.

In this post, Matthew Brown first discusses why we need unit tests. He then demonstrates writing unit tests for an existing reference Angular application with an eye for how to make good use of testing tools for Angular.

Note This blog post and application were created when Angular 2 was in Beta. Since, I have updated the application to the Angular 2 final release. You can view that updated post here: https://keyholesoftware.com/2017/02/01/test-driven-angular-2-part-2/ Introduction AngularJS is a popular framework used for building single-page applications. One great benefit of using Angular is that it is easy to incorporate automated testing. …

Take A Look Around

What We’re Tweeting

About Keyhole Software

Keyhole Software is a software development consulting firm focused on JavaScript, Java, and .NET technologies. Keyhole Consultants assist clients across the United States in nearly every business domain to create high quality, custom software applications.