Pyccuracy is a useful tool for writing web acceptance tests using a BDD style language. This recipe shows all the steps needed to install and set it up for later recipes.
With these steps, we will install Pyccuracy and all the tools needed to run the scenarios later in this chapter.
Pyccuracy
by typing pip
install
pyccuracy
.selenium-server.jar
from http://github.com/heynemann/pyccuracy/raw/master/lib/selenium-server.jar.java -jar selenium-server.jar
. Note that if you don't have Java installed, you definitely need to download and install it as well.lxml
by typing pip install lxml
.recipe35.acc
and enter the following code:As a Yahoo User I want to search Yahoo So that I can test my installation of Pyccuracy Scenario 1 - Searching for Python Testing Cookbook Given I go to "http://yahoo.com" When I fill "p" textbox with "Python Testing Cookbook" And I click "search-submit" button and wait Then I see "Python Testing Cookbook - Yahoo! Search Results" title
pyccuracy_console -p test.acc
. The following screenshot shows it being run with Firefox (default for this system).pyccuracy_console -p test.acc -b safari
.report.html
file. Open it up using a browser to view the results. Then click on Expand All.Pyccuracy uses Selenium
, a popular browser-driving application tester to run its scenarios. Pyccuracy provides an out-of-the-box Domain Specific Language (DSL) to write tests. The DSL provides the means to send commands to a test browser and also check the results, verifying web application behavior.
Later on in this chapter, there are several recipes which show more details of Pyccuracy.
3.143.5.201