Monday 6 June 2016

WHAT IS KARMA?

Karma is a JavaScript test runner that works by launching different browsers and running tests against each of them. It records the status of each test so you know which tests failed in certain browsers, making cross-browser compatibility testing incredibly easy. Note that you will need to use Karma with Windows to test in Internet Explorer.

STEP 1: INSTALLATION

Install Karma and the necessary plugins using NPM.
# Install Karma using Node
npm install karma --save-dev
You also need to install a few required plugins before you can start using Karma. First download the correct plugin for your chosen testing framework (Jasmine, Mocha, etc.).
# Install Karma plugin for your chosen testing framework
npm install karma-jasmine --save-dev
Also install the launcher plugins for the browsers you want to execute your tests against. There are launcher plugins for all major browsers.
# Install Karma browser launcher plugins
npm install karma-chrome-launcher --save-dev
npm install karma-ie-launcher --save-dev
*Note: The --save-dev option saves the package as a dev dependency to the package.json file

Is Protractor is better than selenium?

If you ever tested your application using something like Selenium you know that can be very difficult to test your web application that way because the asynchronous nature of the Web, that can change their HTML DOM. 
Angular E2E testing try to reduce some of these problems.
Here, we come with Protractor.
This post tries to help set up the Protractor testing tool in WebStorm IDE.
Protractor is an end-to-end test framework for AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.
The WebStorm IDE is a powerful tool for complex client-side development and server-side development with Node.js.
The testability is a really really cool piece of functionality that Angular provides. It was develpoed around the idea that testing is so important that it should be built into the framework.
To create your Integration testing  you need to use the advantages of the internals in Angular to make lot easier the integration testing in your AngularJS application.


What is Gulp?

Gulp is a javascript task runner that lets you automate tasks such as…
  • Bundling and minifying libraries and stylesheets.
  • Refreshing your browser when you save a file.
  • Quickly running unit tests
  • Running code analysis
  • Less/Sass to CSS compilation
  • Copying modified files to an output directory
form more info. http://brandonclapp.com/what-is-gulp-js-and-why-use-it/

These features will be useful for running protractor project.