首页 测试 体会 查看内容

使用Jazz Automation编写自动化测试

2014-8-5 23:13| 发布者: tianzc| 查看: 835| 评论: 0

摘要:   Jazz Automation是一个测试框架,构建它的目的是为所有类型的Web系统或者静态网站自动化同时加速验收/功能测试。它还能够容易地实现自动化集成测试。以前的时候这种类型的测试需要人工完成,劳动强度大又不准确 ...
Feature: Go to the Amazon web site, search for Harry Porter in the book section. FindHarry Potter and the Chamber of Secrets (book2) and then add it to the cart.Background: Establish the test settings for the testGiven 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 pageGiven I am ON the "HomePage"Then I should EXPECT| cartCount       | 0                     |Scenario: Search for Harry Porter from the books categoryGiven 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 secondsThen I should be ON the "SearchResultsPage"Scenario: From the Search Results Page, verify the first result SpecialEdition Harry Potter Paperback Box SetGiven 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 detailsGiven I am ON "SearchResultsPage"And I CLICK "chamberOfSecretsBook2"Then I should be ON the "BookDetailPage"Scenario: Verify the detailsGiven I am ON the "BookDetailPage"Then I should EXPECT| kindlePrice          | $7.99                    || hardcoverPrice       | $13.94                   || paperbackPrice       | $8.56                    |Scenario: Add the book to my cartGiven 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 detailsGiven I am ON the "PreCheckoutPage"Then I should EXPECT| orderSubtotal            | 13.94       || cartCount                | 1           |Scenario: proceed to checkoutGiven 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?
  Jazz Automation是一个测试框架,构建它的目的是为所有类型的Web系统或者静态网站自动化同时加速验收/功能测试。它还能够容易地实现自动化集成测试。以前的时候这种类型的测试需要人工完成,劳动强度大又不准确。借助于自动化测试,公司能够创造高质量的应用程序,创造的产品bug更少,同时又加快了投入市场的速度。Jazz Automation支持以下Web浏览器:IE、Firefox、Safari和Chrome。  Jazz Automation和其他的自动化测试框架不同,它允许测试编写者使用纯英语描述软件的工作原理。  大多数自动化测试框架在执行测试之前必须使用Java和Ruby这样的语言编程,例如Selenium和Cucumber。Jazz Automation提供了一个抽象层,测试编写者和配置人员不需要编程。  编写第一个测试脚本  让我们看看下面这个测试一个电子商务网站的规格。
123下一页

鲜花

握手

雷人

路过

鸡蛋

扫一扫关注最新动态

毒镜头:老镜头、摄影器材资料库、老镜头样片、摄影
爱评测 aipingce.com  
返回顶部