Tagged: testing

Unit Testing in Ionic

Testing Asynchronous Code with FakeAsync in Angular

When creating automated unit tests in Ionic and Angular applications we would typically follow a process like this: Set up the testing environment Run some code Make assertions as to what should have happened This process is also commonly referred to as AAA (Arrange, Act, Assert). I don’t plan to provide an introduction to unit […]

Testing in Ionic 2

E2E (End-to-End) Testing in Ionic 2: An Introduction

Over the past few weeks, I have been releasing a series of tutorials on creating automated tests for Ionic 2 applications. The tutorials so far have focused on how to apply the Test Driven Development (TDD) methodology to unit test an Ionic 2 application. If the concept of automated tests is new to you, or […]

Testing in Ionic 2

Test Driven Development in Ionic 2: Services and Templates

Throughout this tutorial series, we have been learning various methods for unit testing Ionic 2 applications and using a Test Driven Development approach to building an application. In the previous tutorials we have covered: How to set up unit testing in an Ionic 2 application What Test Driven Development (TDD) and Behaviour Driven Development (BDD) […]

Testing in Ionic 2

Test Driven Development in Ionic 2: Navigation and Spies

In the previous tutorial in this series, we covered the concept of mocks and creating a fake backend that we could make HTTP requests to. The general idea is that we want to isolate the thing we are testing, we don’t want external dependencies complicating our unit tests. We have been taking a Test Driven […]

Testing in Ionic 2

Test Driven Development in Ionic 2: Http and Mocks

In the previous tutorial in this series, we introduced the concept of Test Driven Development and how those concepts can be applied to Ionic 2 development. I won’t be introducing the concepts again here, but in short: Test Driven Development, or TDD, is a method of development that involves writing tests before writing your application […]

Testing in Ionic 2

Test Driven Development in Ionic 2: An Introduction to TDD

The concept of creating automated tests for your application allows you to improve the quality of your code, protect against regressions when making updates, and speed up the testing and debugging process. There are many different types of tests you can add to your applications, including: Unit tests which test small isolated chunks of code […]

Testing in Ionic 2

Introduction to Testing Ionic 2 Applications with TestBed

Creating automated tests for your application is a great way to improve the quality of your code, protect against code breaking regressions when implementing new features, and speed up testing and debugging. In a Javascript environment, the Jasmine framework is typically used for writing tests and Karma is used to run them. This is still […]

Unit Testing in Ionic

How to Unit Test an Ionic 2 Application

Everybody (hopefully) tests their applications in some manner before submitting them to the app stores, and for a lot of people, this will include playing around with the app and trying it on different devices. That alone is a poor and inefficient testing process, however. Unit testing, on the other hand, is a very efficient […]