Hi Paul, Thanks for a quick response. This definitely helps 
Yes ideally I am trying to do Integration tests here using real backend. 
How should I go about the same ...option I see 
1) Use Karma with httpBackend.Passthrough
2) Use protractor - this mostly seems to be a UI based automation 
framework, which I don't want to take dependency on. UI automation is 
mostly flaky and requires more maintenance cost. 
3) Do you have any other Framework in mind that we can use for JS API based 
integration testing? Instead of using HTML elements, we want to use Angular 
JS APIs directly. 


Thanks,
Sudheer

On Monday, 16 June 2014 21:55:34 UTC+5:30, Paul Freeman wrote:
>
> Hi Sudheer
>
> If you were to use the real $http connection you would no longer be doing 
> a unit test. 
>
> In that case you would be integration testing the app because your result 
> would be dependent on the behaviour of the server behind your $http call, 
> so for that reason its preferred to use a 100% predictable mock behaviour 
> instead of the real connection. 
>
> If you are happy that the unit tests are complete for a given component, 
> then instead you would create an integration or end-to-end test to confirm 
> that the app works with the real back end.  
>   
>
> On Monday, June 16, 2014 11:45:52 AM UTC+1, Sudheer k.v wrote:
>>
>> i was unable to access rest services using $http while running unit tests 
>> with jasmine as test framework and Karma as test runner.
>>
>> -- Instead of using mock services i am trying to call actual services 
>> using $http in unit tests.
>> --Is it possible for unit tests to use $http to call actual services 
>> instead of mocking the sercvices
>>
>> Thanks in advance!!!!!!
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to