Scout is a command line tool that helps you automate an invisible browser.
You can open URLs, follow links, take screenshots and fill in forms.
With the custom designed language and built-in assertions writing functional tests has never been easier.
Scout finds, reads and executes .scout
files: simple lists of instructions that describe a sequence of user actions and assertions on web pages.
The instructions are executed one by one in PhantomJS.
Because Scout automatically waits for each action to be successfully completed you will never have to write
waitFor
instructions or callbacks.
open http://github.com # Elements can be targeted by text click "terms of service" # Or any standard CSS selector click .site-logo
open http://github.com # Take a screenshot of the whole page screendump page.png # Or of single element screendump page_header.png .header # Compare a previously made screenshot to an element assertResembles page_footer.png .site-footer
open https://twitter.com/search-advanced # Type text into an input type [name="ands"] functional testing # Choose options in a select choose [name="lang"] English (English) # Click radios and checkboxes click "Include retweets"
open http://github.com # Click the signup button without entering any data click "Sign up for GitHub" # Make sure the right things happen assertTitle Join GitHub assertVisible .flash-error assertText .error Login can't be blank
Instructions are plain English. Elements are easily targeted by their text content or with CSS selectors.
Scout is a command line tool with various options to make your life easier.
Tests are very resilient to changes in the page. Elements can change, move or disappear and Scout will adapt.
Because Scout automatically deals with delays, tests don't need artificial waitFor
instructions.