TAILIEUCHUNG - Phát triển Javascript - part 7

Tham khảo tài liệu 'phát triển javascript - part 7', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Tools of the Trade In Chapter 1 Automated Testing we developed a very simple testcase function capable of running basic unit tests with test case setup and teardown methods. Although rolling our own test framework is a great exercise there are many frameworks already available for JavaScript and this chapter explores a few of them. In this chapter we will take a look at the tools of the trade essential and useful tools to support a test-driven workflow. The most important tool is of course the testing framework and after an overview of available frameworks we will spend some time setting up and running JsTestDriver the testing framework used for most of this book s example code. In addition to a testing framework this chapter looks at tools such as coverage reports and continuous integration. xUnit Test Frameworks In Chapter 1 Automated Testing we coined xUnit as the term used to describe testing frameworks that lean on the design of Java s JUnit and Smalltalk s SUnit originally designed by Kent Beck. The xUnit family of test frameworks is still the most prevalent way of writing automated tests for code even though the past few years have seen a rise in usage for so-called behavior-driven development or BDD testing frameworks. Download from 33 34 Tools of the Trade Behavior-Driven Development Behavior-driven development or BDD is closely related to TDD. As discussed in Chapter 2 The Test-Driven Development Process TDD is not about testing but rather about design and process. However due to the terminology used to describe the process a lot of developers never evolve beyond the point where they simply write unit tests to verify their code and thus never experience many of the advantages associated with using tests as a design tool. BDD seeks to ease this realization by focusing on an improved vocabulary. In fact vocabulary is perhaps the most important aspect of BDD because it also tries to normalize the vocabulary used by programmers .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.