Posts Tagged ‘AngularJS’

Choosing the End in End-to-end Tests for AngularJS App

There are many tutorials available that provide insights into the use of specific testing frameworks or guidelines on how to write end-to-end tests, but very few of these cover what the end point of these tests should be. Should the end be stubbed API calls or a fake API? Or should it be a real API, but with a special test database?

Every one of the various testing approaches that are available have their own drawbacks and choosing one for your project always involves some type of trade-off. Some tests are too brittle and fail randomly, while others are too time consuming to setup and maintain. I recently discovered an approach that is somewhat of a compromise but seems to require little effort to setup and has proven itself capable of finding real application bugs.

This article describes the end-to-end testing of single page applications (SPA) that are built on an AngularJS or other JS framework. The testing of SPA differs from testing traditional web applications because SPA consists of client-side app and back-end API. This gives more seams for mocking and more testing approaches to choose from. Let’s review which options are currently available for testing SPAs.

Read On…

Laying a foundation of AngularJS project

I recently worked on my first AngularJS project. It was a bit of surprise to find out how much work you need to put into building a set of generic components for your project.

AngularJS claims to be a toolset for building frameworks rather than a framework on its own. Even though it provides plenty of core functionality out of the box (e.g. routing, data-binding, etc.), you will still need to build many components for common tasks such as loading panes, notifications, etc.

The project that I worked on was an intranet type application, used mainly to view and edit various types of data. As such, most of the components that I describe below deal with improvements to form usability.

To give you an idea which features are not in AngularJS, I describe some of the custom components that we built for the project. For some of the components, I provide implementation ideas while for others I only provide design ideas but both should help you get started on your first CRUD AngularJS application.

Read On…