【精品文档】611关于计算机专业vuex.js介绍概述的毕业设计论文英文英语外文文献翻译成品资料:测试Vue应用程序简介(中英文双语对照)
本文是中英对照毕业设计论文外文文献翻译,下载后直接可用!省去您找文献、pdf整理成word以及翻译的时间,一辈子也就一次的事!文献引用作者出处信息:Edd Yerburgh Testing Vue. Js Applications,2019 (如年份太老,可改为近2年,很多毕业生都这样做,毕竟外文翻译要求也不高)英文4442单词,24510字符(字符就是印刷符),中文7338汉字。(如果字数多了,可自行删减,大多数学校都是要求选取外文的一部分内容进行翻译的。)Introduction to testing Vue applicationsThis chapter coversWhat testing isWhy testing is usefulThe difference between unit tests, end-to-end tests, and snapshot testsCore Vue conceptsAs a developer, you want to ship bug-free code. Nothing is worse than finding out on Monday morning that your Friday changes broke the live application! The only way you can make sure your application works correctly is by testing it, so its vital that you learn how to test applications thoroughly.A good testing approach speeds up development, improves code quality, and limits the bugs in your app. A poor testing approach cripples a project. This book will teach you to test Vue applications effectively to make sure you get the benefits of testing and avoid the pitfalls. By the end of the book you will have become a Vue testing master, ready to test any Vue application you encounter.To learn the techniques to test a Vue application, youre going to write a test suite for a Hacker News clone from start to finish. The Hacker News application will use Vue, Vuex, Vue Router, and server-side rendering just like most large Vue applications.As well as teaching you the techniques, I want to teach you the mindset and approach to testing that Ive developed over the years. Throughout the book Ill give you advice to hone your testing skills.This first chapter is a primer on testing Vue applications. Ill give you a high-level overview of testing in general, the different types of tests youll learn in this book, and the Hacker News app youll write. Finally, Ill explain some core Vue concepts, to make sure were speaking with the same vocabulary.The first thing to do is to define testing.1.1. DEFINING TESTINGAny academic paper worth its salt defines the concepts it uses before discussing them in depth. So, like a good academic, Ill define what I mean by testing an application before I teach you about different testing techniques.A simple definition is that testing an application is the process of checking that an application behaves correctly. Its a no-brainer that you should verify your application behaves correctly, but the topic gets more interesting when you talk about the different testing techniques.There are two main approaches to testing: manual testing and automated testing. Manual testing is where you check that an application works correctly by interacting with it yourself. Automated testing is the practice of writing programs to perform the checks for you.Most of this book is about automated testing. But to understand the benefit of automated testing, you need to understand manual testing.1.1.1. Manual testingEvery employable developer tests code manually. Its the next logical step after writing source code, like how the next step after chewing food is to swallow it.Imagine youre creating a sign-up form. When you finish writing the code, you dont just close your text editor and tell your boss that youve finished the form. No, youll open the browser, fill out the form, and make sure it completes the sign-up process correctly. In other words, youll test the code manually.Manual testing works great for small projects. If you have a TODO list app that you can check manually in two minutes, you dont need automated tests. But when your app grows to a certain size, relying on manual testing becomes a burden.Let me tell you about the first large JavaScript application I worked on. The application was a mess. Youve heard of spaghetti code? This code was spaghetti, tagliatelle, and linguini code rolled into one. It was very difficult to follow the application logic, and there werent any automated tests. Needless to say, the code had bugs. In an attempt to stop bugs, we would manually test the application before releasing it. Every Wednesday we would pour some coffee, open a list of user journeys to test, and hunch over our laptops for four hours to work through the set of instructions. It was painful.Considering we spent 10% of our development time manually testing the app, you would have thought we would stop any bugs reaching production. Nope. The application was riddled with them. The reason is that manually testing hundreds of features is difficultits all too easy to lose concentration and forget to check something.One time when working through a user journey, I accidentally forgot to check that clicking a button would display the metadata of a music track. The other developers must have forgotten to test that feature too, because the bug was live for months!Although some of our manual testing time was spent testing new features, most was taken up testing old features to check they still worked.