Skip to main content

Posts

Showing posts with the label AngularJS

Using Protractor to test AngularJS Apps

Hi All, To share my knowledge and experience in testing AngularJS apps, I am presenting on using Protractor for end-to-end testing of AngularJS applications at the Wellington AngularJS meetup. If you are planning or already using AngularJS for your front-end development and interested to know some best practices for the end to end testing of web apps, do RSVP to this event . Cheers!!

Learn How to Write Angular 2 Style Unit Tests with Angular 1.X Code

The development of Angular 2 is on its way with much talk, hype, and fanfare. Surprisingly, there is not much being said about unit testing. As a responsible developer, you have undoubtedly already written a giant unit test suite to achieve ‘near perfect’ code coverage, and I'm here to let you know, there is no need to throw that all away! While Angular 2 is currently in ‘developer preview’, implying that nothing serious should be built with it currently, the Angular Team has already created a giant wealth of unit tests and a custom testing setup: (https://github.com/angular/angular/tree/master/modules/angular2/test). Unfortunately, it is not easy to set this up for yourself. So this post should help you get started. link to full post here

Use Page Objects in Protractor for Spaghetti free Code

Firstly, what are Page Objects? Here is a definition from the Selenium team: Page Object is a Design Pattern which has become popular in test automation for enhancing test maintenance and reducing code duplication. A page object is an object-oriented class that serves as an interface to a page of your AUT. The tests then use the methods of this page object class whenever they need to interact with that page of the UI. The benefit is that if the UI changes for the page, the tests themselves don’t need to change, only the code within the page object needs to change. Subsequently all changes to support that new UI are located in one place. Using Page objects in test cases has been very useful. It will feel hard and time consuming initially but, once you have all page objects up and running. Its going be a smooth ride . Till now writing test cases for an Angular Apps has been smooth ride. Thanks to some good articles online to get me going. I have found some very helpful resour...

Karma-Jasmine | Protractor for AngularJS

Lately, I have been working on setting up the testing framework and writing test cases for angular apps. I am using Karma-Jasmine framework for unit testing. And for end-to-end testing, am using another testing framework called Protractor. I like to follow best practices while using any technology. It will feel hard initially but, you will find the its usefulness as you come across complex scenarios. Till now writing test cases for an Angular Apps has been smooth ride. Thanks to some good articles online to get me going. I have found some very helpful resources, which talks about unit testing and end-to-end testing which, I would like to share with other peps... Enjoy.. Unit testing AngularJS applications AngularJS: Developer Guide: Unit Testing Using Protractor: Writing end-to-end tests has never been so fun. Protractor - end to end testing for AngularJS

Eliminate Javascript code smells

This slide will review various common smelly snippets of code and discuss techniques on how we can eliminate and protect against their pungent odors. JavaScript Code Smells

AngularJS’ Internals

I came across an interesting article on AngularJS internals authored by Nicolas Bevacqua . This article gives a very clear understanding of the entire idea of scoping! AngularJS presents a remarkable number of interesting design choices in its code base. Two particularly interesting cases are the way in which scopes work and how directives behave. The first thing anyone is taught when approaching AngularJS for the first time is that directives are meant to interact with the DOM, or whatever manipulates the DOM for you, such as jQuery ( get over jQuery already !). What immediately becomes (and remains) confusing for most, though, is the interaction between scopes, directives and controllers . Read more...

Learn Angular.JS through the process of building 10 different projects

What is Angular JS? Angular.JS is an open source web application framework maintained by Google. It is a robust client-side technology for building modern web applications using model-view controller (MVC) software architecture. Angular.JS adds more functionality and features to a single-page HTML web application. Today, a lot of developers rely heavily on the MEAN stack (Mongo.DB, Express.JS, Angular.JS and Node.JS) and learning Angular.JS is surely a fruitful investment. Angular.JS offers a bunch of interesting features, such as asynchronous dependency injection, deep link routing, form validation, two-way data binding and deep linking, to name a few. Some of the popular applications built using Angular.JS: Dematerializer (a blogging platform) PunchPlay (music player application)  Sendmachine (an email marketing tool)  Betrend (a fashion portal)  So, what makes Angular.JS a preferred choice for designing web applications? Let us take a look at some of its promi...