使用Jazz Automation编写自动化测试

发表于:2014-6-30 11:48

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:Dedrick Boyd/孙镜涛    来源:51Testing软件测试网采编

  Jazz Automation是一个测试框架,构建它的目的是为所有类型的Web系统或者静态网站自动化同时加速验收/功能测试。它还能够容易地实现自动化集成测试。以前的时候这种类型的测试需要人工完成,劳动强度大又不准确。借助于自动化测试,公司能够创造高质量的应用程序,创造的产品bug更少,同时又加快了投入市场的速度。Jazz Automation支持以下Web浏览器:IE、Firefox、Safari和Chrome。
  Jazz Automation和其他的自动化测试框架不同,它允许测试编写者使用纯英语描述软件的工作原理。
  大多数自动化测试框架在执行测试之前必须使用Java和Ruby这样的语言编程,例如Selenium和Cucumber。Jazz Automation提供了一个抽象层,测试编写者和配置人员不需要编程。
  编写第一个测试脚本
  让我们看看下面这个测试一个电子商务网站的规格。
Feature: Go to the Amazon web site, search for Harry Porter in the book section. Find
Harry Potter and the Chamber of Secrets (book2) and then add it to the cart.
Background: Establish the test settings for the test
Given the following settings:
| url             | http://www.amazon.com |
| platform        | Vista                 |
| browser         | firefox               |
| browser version | 23                    |
Scenario: Verify that we have an empty cart on the amazon home page
Given I am ON the "HomePage"
Then I should EXPECT
| cartCount       | 0                     |
Scenario: Search for Harry Porter from the books category
Given I am ON "HomePage"
And I click "allButton"
And I select
| selectCategory  | Books                  |
And I enter
| searchField     | Harry Potter           |
And I click "go"
And I wait 5 seconds
Then I should be ON the "SearchResultsPage"
Scenario: From the Search Results Page, verify the first result Special
Edition Harry Potter Paperback Box Set
Given I am ON "SearchResultsPage"
Then I should EXPECT
| firstResult           | Special Edition Harry Potter Paperback Box Set |
| chamberOfSecretsBook2 | visible
|
Scenario: Click on the Chamber Of Secrets Book2 to reveal the details
Given I am ON "SearchResultsPage"
And I CLICK "chamberOfSecretsBook2"
Then I should be ON the "BookDetailPage"
Scenario: Verify the details
Given I am ON the "BookDetailPage"
Then I should EXPECT
| kindlePrice          | $7.99                    |
| hardcoverPrice       | $13.94                   |
| paperbackPrice       | $8.56                    |
Scenario: Add the book to my cart
Given I am ON the "BookDetailPage"
And I click "hardcover"
And I click "addToCart"
Then I should be ON the "PreCheckoutPage"
Scenario: On the pre-checkout page, verify the details
Given I am ON the "PreCheckoutPage"
Then I should EXPECT
| orderSubtotal            | 13.94       |
| cartCount                | 1           |
Scenario: proceed to checkout
Given I am ON the "PreCheckoutPage"
And I click "proceedToCheckout"
Then I should be ON the "SignInPage"
The test script should be extremely easy to read and understand, right?
31/3123>
《2023软件测试行业现状调查报告》独家发布~

精彩评论

  • MengKi
    2014-7-04 02:03:12

    你好,看了你的文章后我直接去了Jazz Automation官网看了一番,并且下载了安装包,可是发现只支持64位,请问我32位系统要如何使用呢?
    请多多帮助了!!!!!

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号