Karma VS protractor

Karma

Before discussing what Karma is, it is best to discuss what it isn’t. It isn’t a framework to

write tests. It is a test runner. What this means is that Karma gives you the ability to run

tests in several different browsers in an automated way. In the past, developers had to

perform manual steps to do this, including:

1. Opening up a browser

2. Pointing the browser to the project URL

3. Running the tests

4. Confirming that all tests have passed

5. Making changes

6. Refreshing the page

With Karma, automation gives the developer the ability to run a single command and

determine whether an entire test suite has passed or failed. From a TDD perspective, this

gives you the ability to find and fix failing tests quickly. Some of the pros and cons of

using Karma compared to a manual process are as follows:

proscons
Ability to automate tests in multiple browsers and devices.Additional tool to learn, configure, and maintain
Ability to watch files. 
Online documentation and support. 
Does one thing---runs JavaScript tests---and does it well. 
Easy to integrate with a continuous integration server. 

Protractor

Protractor is an end-to-end testing tool. It allows developers to mimic user interactions. It

automates the testing of functionality and features through the interaction of a web

browser. Protractor has specific methods to assist with testing AngularJS, but they are not

exclusive to AngularJS. Some of the pros and cons of using Protractor are as follows:

Procons
Configurable to test multiple environmentsDocumentation and exampes are limited.
Easy integration with AngularJS. 
Syntax and testing can be similar to the testing framework chosen for unite testing. 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值