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.  

Karma VS protractor相关推荐

  1. Angular目录结构分析以及app.module.ts详解

    场景 Angular介绍.安装Angular Cli.创建Angular项目入门教程: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/detail ...

  2. Angular CLI创建的项目文件用途一栏

    官网介绍地址:https://angular.io/guide/file-structure 我用Angular CLI创建的项目结构列表: .editorconfig: EditorConfig h ...

  3. angular快速入门教程

    angular 安装: 1.安装node.js 2.安装angular npm i -g @angular/cli 3.创建项目 ng new 项目名 4.文件结构: e2e:测试目录src: {in ...

  4. Front end workflow

    标签:请叫我红领巾 记一哈记一哈 ^_^ 推荐个不错的群 自己刚开始折腾的时候也是无处下手,渺茫啊.然而我是有一个很好的前端群(真的很棒,欢迎加入:[375042952]),关注群里的每一次讨论,每一 ...

  5. 关于反馈的邮件_关于反馈

    关于反馈的邮件 重点 (Top highlight) Angular is an onion with the following layers: Angular是具有以下几层的洋葱: The cor ...

  6. PhoneCat App 教程

    https://docs.angularjs.org/tutorial AngularJS教程第一篇文章的翻译,因为我在看中文版的AngularJS的翻译的时候,发现第一篇文章翻译的不准确,很有可能是 ...

  7. 读书笔记:《DevOps 实践》

    <DevOps> [瑞典] Joakim Verona(约阿基姆·维罗纳) 著:高清华,马博文 译 只看了一半的书,其实只是书的前半本,理论部分. 后半部分给出了一系列的工具,特别是最后一 ...

  8. Karma与TSLint

    TSLint TSLint是一个可扩展的静态分析工具,用于检查TypeScript代码的可读性,可维护性和功能性错误.收到现代编辑和构建系统的广泛支持,并且可以使用您自己的路由,配置和格式化. 安装 ...

  9. Protractor测试环境搭建

    2019独角兽企业重金招聘Python工程师标准>>> 安装node.js.然后,在cmd下,进入E盘下的,我们自己新建的protractor文件夹下, npm install -g ...

最新文章

  1. SQL Date Utility
  2. 通过rsync实现数据备份
  3. 基于phantomJS实现web性能监控
  4. OS / Linux / 主线程退出了,子线程会退出吗?
  5. JavaScript中的正则表达式详解
  6. Python新式类与经典类(旧式类)的区别
  7. 10.深入分布式缓存:从原理到实践 --- EVCache探秘
  8. 基于51单片机的蜂鸣器及简谱的学习(编曲)
  9. 计算机网络第三弹——数据链路层
  10. 三维扫描仪[11]——总结并展望基于Kinect的三维扫描仪
  11. SAP内部订单BAPI扩展字段
  12. R语言︱常用统计方法包+机器学习包(名称、简介)
  13. python第二十四天
  14. PE制作-002.UEFI和Legacy双启动之Legacy启动
  15. oracle中skimmer的意思,skimmer是什么意思_skimmer怎么读_skimmer翻译_用法_发音_词组_同反义词_撇取者-新东方在线英语词典...
  16. 微服务高性能高可用架构设计
  17. 最大的疑问:下一跳???
  18. 那些不务正业的品牌Apps,借鉴
  19. 7.20黄金多空依旧反复,原油依然窄幅震荡今日能否突破
  20. 文献管理软件Zotero的安装和使用

热门文章

  1. java获取文件后缀_Java获取文件后缀的两种方式
  2. goahead解析(一)---------route.txt
  3. 求阶乘之和(循环版)(利用阶乘函数)
  4. 软交换总结之五-GPRS相关:PCU与RPP的经典之作
  5. Rosalind Java| Complementing a Strand of DNA
  6. Android Canvas.scale缩放
  7. 我找到的一些google搜索技巧
  8. 【MVC、Spring MVC介绍、区别、执行流程】
  9. CentOS升级openssl修复部分ssl漏洞
  10. Java毕业设计_基于BootStrap的晴雅花艺交流论坛的开发