JavaScript 是弱类型的动态脚本语言,支持多种编程范式,包括面向对象和函数式编程。

VIP内容

学习测试驱动开发(TDD)和行为驱动开发(BDD)背后的原理,看看Jasmine、RSpec和Cucumber是如何为你所用的。这本书探讨了一些用于测试的领先技术。

您将看到如何使用Jasmine的特性与JavaScript应用程序一起工作。您将学习如何在Ruby和Rubymine中使用Mini Test和RSpec。最后,您将使用Cucumber使用BDD方法开发软件。

对于任何web开发人员来说,理解测试自动化是一项至关重要的技能。实用的测试自动化将破坏现代web上一些重要的TDD和BDD技术。

你将学习

  • 用Jasmine测试一个示例JavaScript应用程序
  • 使用Jasmine 与JS Bin
  • 使用Minitest进行测试驱动开发
  • 用RSpec测试一个示例Ruby项目
  • 使用Cucumber和Gherkin进行行为驱动开发
  • 将Cucumber与RSpec集成

这本书是给谁的

  • 这本书是为那些想要学习测试自动化以及更多关于测试驱动开发和行为驱动开发的人准备的。
成为VIP会员查看完整内容
0
12

最新论文

The out-of-gas error occurs when smart contract programs are provided with inputs that cause excessive gas consumption, and would be easily exploited to make the DoS attack. Multiple approaches have been proposed to estimate the gas limit of a function in smart contracts to avoid such error. However, under estimation often happens when the contract is complicated. In this work, we propose V-Gas, which could automatically generate inputs that maximizes the gas cost and reduce the under estimation cases. V-Gas is designed based on feedback-directed mutational fuzz testing. First, V-Gas builds the gas weighted control flow graph (CFG) of functions in smart contracts. Then, V-Gas develops gas consumption guided selection and mutation strategies to generate the input that maximize the gas consumption. For evaluation, we implement V-Gas based on js-evm, a widely used ethereum virtual machine written in javascript, and conduct experiments on 736 real-world transactions recorded on Ethereum. 44.02\% of the transactions would have out-of-gas errors under the estimation results given by solc, means that the recorded real gas consumption for those recorded transactions is larger than the gas limit value estimated by solc. While V-Gas could reduce the under estimation ratio to 13.86\%. Furthermore, V-Gas has exposed 25 previously unknown out-of-gas vulnerabilities in those widely-used smart contracts, 5 of which have been assigned unique CVE identifiers in the US National Vulnerability Database.

0
0
下载
预览
Top