Saturday, June 9, 2018

How can you test ionic applications?

Ionic applications are built using AngularJS. Angular has a rich set of test libraries and frameworks such as Jasmine and Karma test runner. These frameworks can be used to write unit tests for Ionic applications. Also, ionic-CLI provides live reload feature so the application can be tested in the browser. For example, the ionic serve command can be used to load the application in any browser. Thus, we can use Chrome Developer Tools or Mozilla Firefox with Firebug to debug and inspect Ionic applications.


Simulator testing : 

You can also test in the simulator using the cordova commands. For example, to test in the iOS simulator, run:

$ ionic cordova build ios
$ ionic cordova emulate ios


For android use below commands ,

$ ionic cordova build android
$ ionic cordova emulate android


For older version you can also use without "cordova" text. Like below examples :

iOS :
$ ionic build ios
$ ionic emulate ios

Android :
$ ionic build android
$ ionic emulate android




No comments:

Post a Comment