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:
pros | cons |
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:
Pro | cons |
Configurable to test multiple environments | Documentation and exampes are limited. |
Easy integration with AngularJS. | |
Syntax and testing can be similar to the testing framework chosen for unite testing. |
推荐阅读
-
vs2012不能新建项目怎么办?vs2012新建项目的详细教程
-
VS2013启动调试出错的解决方法
-
vs2012如何设置字体颜色和大小?
-
C# VS2019 WebService创建与发布,并部署到Windows Server 2012R
-
vs2010 中文版下载地址及可用CDKEY 多个地址打包下载
-
VS2010破解版迅雷电驴下载 visual studio2010简体中文正式旗舰版破解版下载(附序列号)
-
vs2010 MSDN文档安装图文方法
-
VS2010执行剪贴、复制时,提示内存不足的官方补丁
-
使用VS2019在WSL中开发调试.NET Core
-
VS中模仿WPF模板创建最简单的WPF程序