Ter*_*esa 1 selenium automated-tests
只是想知道其他人如何管理为硒测试自动化编写的测试用例?我一直在调查可能与testlink集成以显示结果和所有,但我已经为我的环境设置了Jenkins并运行我的测试.我真正想要的是一些很好地记录我的测试的方法,比如每个测试为非程序员执行的步骤.
我正在使用Selenium和python,Jenkins运行测试.
小智 5
我尝试了两种方法:
1)您可以使用Cucumber编写如下测试步骤:
@sanity @home_page @test_628
Scenario: Launch Support FAQs & Guides from Home cog
Given I navigate to Home page
When I click "Support" user logo link
Then I should see Support FAQs & Guides app launched
Run Code Online (Sandbox Code Playgroud)
在Gherkin语言(Given,When,Then)上编写的每一步都可以使用Selenium实现(我现在必须在Ruby上编写,所以我使用Watir而不是Selenium).
请参阅https://github.com/cucumber/cucumber/wiki/Python
2)但在此之前我使用了Robot Framework + Python + Selenium + Jenkins.你可以写这样的测试:
Go To Google Page [Documentation] Go to google page and search something
Open Browser to Google Page
Input Search selenium
Submit Search
Run Code Online (Sandbox Code Playgroud)
这是使用人类可读的关键字完成的.它打印出非常好的报告,可以轻松地与Jenkins集成.
见http://www.wallix.org/2011/07/26/how-to-use-robotframework-with-the-selenium-library/
| 归档时间: |
|
| 查看次数: |
3308 次 |
| 最近记录: |