How does one integrate a jasmine plugin (such as jasmine-jquery) in an e2e protractor test in a Lineman project?
Related
Is it possible to use Karma and Jasmine for unit testing an Ionic App with cordova plugins (e.g. sqlite, $cordovaNetwork)?
We are creating a test framework for a Angular Web API Project. I have researched about Testing frameworks like Jasime, Mocha etc.
My question is, do we need a test runner like karma along with Jasime/Mocha to run & test test cases.
Yes, karma will be the test engine that will run your jasmine tests. Jasmine is a test API / framework, karma is a test engine that will spawn javascript environments able to run your tests.
You can run your tests just straight in an HTML page, but it's easier to just use karma. You need to use something like Karma if you're going to test directives, because you need the html2Js preprocessing.
I've seen examples using grunt with protractor coverage, but i'm using gulp and the same with karma.
How do I use protractor with karma and gulp.
Thanks.
I'm going to use the following generator
https://github.com/Swiip/generator-gulp-angular
Can Protractor be used for Test Driven Development of Angular JS Application ? Protractor is popularly used as E2E test framework for Angular but can we use it for TDD (Test Driven Development) ?
Protractor should be used only for E2E testing.
For TDD you can switch to Karma with Jasmine.
Also see http://kroltech.com/2013/11/javascript-tdd-with-jasmine-and-karma/
I use Protractor in my TDD workflow but not for unit tests. I use it for tests similar to integration tests which require interfacing with a running site.
I wouldn't use it for unit tests because it is so much slower than Karma as a test runner and it requires the server to be started.
I wrote a little about my experiences doing TDD in Angular which shows how I use Protractor vs Karma. I hope it helps.
Having trouble in testing angular controller. Im using angular with require js and using karma for testing. Is there any example and github sample.
Here is a project I created with unit test for RequireJS and AngularJS:
https://github.com/marcoslin/angularAMD
To run the test, do the following:
npm install
grunt test