-
Notifications
You must be signed in to change notification settings - Fork 34
Quick Start
Assuming that you have installed Pyccuracy following the installation guide, this is the simplest way to run your first Pyccuracy test:
Download selenium-server.jar from our repository. To run, type:
$ java -jar selenium-server.jarPyccuracy uses GNU Make to run and stop Selenium. If want to see how we do it, please take a look at the selenium_up and selenium_down tasks of our Makefile.
Save the following code in a file called test.acc (that is the extension for Pyccuracy Acceptance test files):
As a Google User
I want to search Google
So that I can test Pyccuracy
Scenario 1 - Searching for Hello World
Given
I go to "http://www.google.com"
When
I fill "q" textbox with "Hello World"
And I click "btnG" button and wait
Then
I see "Hello World - Google Search" title
Scenario 2 - Searching for Monty Python
Given
I go to "http://www.google.com"
When
I fill "q" textbox with "Monty Python"
And I click "btnG" button and wait
Then
I see "Monty Python - Google Search" titleThe tests are executed using pyccuracy_console command line tool. To run your test, type:
$ pyccuracy_console -u http://google.comThe only parameter needed is -u, that is the initial URL that Pyccuracy should go to start executing the tests.
To run using a different browser (e.g. Safari), type:
$ pyccuracy_console -u http://google.com -b safariTo see all options available for pyccuracy_console, type:
$ pyccuracy_console ---helpTo see all the actions available for Pyccuracy (that is, the things you can do with Pyccuracy, like clicking buttons, fill textboxes and so on), you can use the pyccuracy_help command line tool. For instance, to see all the textbox actions, you can type:
$ pyccuracy_console ---term textboxTo see all options available for pyccuracy_help, type:
$ pyccuracy_help ---helpAlso make sure you take a look at the “Actions Reference” section.