程序员学英语第1天——JavaScript 程序测试的介绍1

本系列文章的目的就是摘录编程相关的英语技术文章 , 以供大家学习其中的一些英语表述 。 另外 , 本系列文章也有相应的视频 , 也请大家关注 。
An Intro to Testing in JavaScriptJavaScript 程序测试的介绍
Today, we are going to discuss testing in JavaScript and help you start your journey towards understanding and mastering it.
今天我们将探讨JavaScript程序中的测试 , 并帮助大家理解和熟练掌握JavaScript测试 。
程序员学英语第1天——JavaScript 程序测试的介绍1文章插图
Testing is one of the most important topics in software development, but a lot of developers still shy away from it. This article is here to change that.
测试是软件开发中很重要的一个话题 , 但是很多开发人员对于测试还是有点回避 。这篇文章将帮您改变这种情况 。
The primary motivation behind this article is to give a clear overview of the entire world of JavaScript testing and making it simple to understand. Even if you have no prior experience in testing, this article will prove to be the perfect start for your journey.
这篇文章的主要动机就是给出一个关于JavaScript测试比较清晰的概括 ,使得我们更容易地学习 。 即便你先前没有测试方面的经验 , 这篇文章也将会是你测试之旅的完美开始 。
So, without wasting any further time, let’s get started.
所以 , 先不再废话了 , 让我们开始吧 。
Why testing is important为什么测试很重要
Before diving into the various types and concepts of software testing, you should first have a clear understanding of why you should actually care about automated testing in the first place.
在开始深入探讨软件测试的种类和概念之前 , 你应当对为什么要在乎自动化测试有个清晰的认识 。
Building Confidence In Your Code:建立对自己代码的自信心
To know that your code is working as planned, it needs to be tested in some kind. Manual test work for most small applications but don’t provide the security and confidence level you get using automated tests.
要知道你的代码和计划的执行结果是一致的 , 就需要某种方式的测试才会知道 。手动测试对于小型应用程序来说管用 , 但是却不会带给你和自动化测试一样的安全感和信心 。
Automated tests make it easy to test almost every possible situation and allow you to run them whenever you are making a change to your code.
自动化测试使得测试几乎每种可能的情况都很容易 , 也可以在你更改代码之后随时运行 。
Identifying every success and failure case and writing tests for them will ensure that you are confident with the code you are deploying for production.
【程序员学英语第1天——JavaScript 程序测试的介绍1】明确每种成功和失败的测试用例 , 然后对每种测试用例写出相应的测试代码 ,这样就会确保你对于将部署于生产系统的代码很有信心 。