This project contains examples of how to use the Cubano Framework. Cubano is part of the Concordion Family.
To get the demo project working, follow the Section below > Set up and run this project.
Complement the examples in this project, with a read of:
- an introduction to Concordion
- the Cubano documentation and in particular the Cubano Framework Guide
- the Concordion documentation and especially the Concordion Hints and Tips page
Once you are ready to start writing your own tests, pull down the Cubano Template project and adapt this base to start automating your project.
A goal of Cubano is to generate living documentation that is applicable to a wide audience.
With the specifications written in plain language, and styled using Concordion, the generated living documentation is readable by anyone:
The storyboard feature allows users to easily see the steps that are performed to implement the specification, and has proven useful for product owners, analysts and training staff:
It is also useful for showing the contents of API messages:
Finally, the living documentation includes log messages that are useful for developers and test developers:
- Ensure you have a Git client and Gradle installed (or use via your IDE or other tools)
- Install Firefox. The default browser used in this demo project is Firefox.
- Install Chrome. Used for at least one test.
cd
to a relevant foldergit clone https://github.com/concordion/cubano-demo.git
or download and unzip this project- Import as a Gradle project into your IDE (e.g. for Eclipse, ensure Buildship is installed, then File > Import > Gradle > Existing Gradle Project > follow the wizard)
The default configuration for this project is pulled from config.properties
. Default configuration can be overriden by introducing a user.properties
file. Simply override properties in user.properties
as required (useful for multi developer teams). The project supplies a user.properties.template
which can be used for this purpose.
By default this project is set up to use the Firefox browser (with the Switch Browser fixture additionally using Chrome).
The property webdriver.browserprovider
, in config.properties controls the default browser (e.g. webdriver.browserprovider = FirefoxBrowserProvider
).
To modify the default browser, update property webdriver.browserprovider
in either:
- the config.properties file
- or the user.properties file
Additional [BrowserName]BrowserProviders
can be found in package org.concordion.cubano.driver.web.provider.*
.
Two other important classes to review are:
org.concordion.cubano.driver.web.config.WebDriverConfig
> Reads and supplies properties from the config.properties file that is required by the frameworkorg.concordion.cubano.driver.web.provider.LocalBrowserProvider
> Base class for local browser providers.
Further information on browser support and configuration can be found in the Cubano documentation on Browser Providers
Concordion fixtures use the JUnit library, with a specialised ConcordionRunner (@RunWith(ConcordionRunner.class)
). This annotation is part of the class hierarchy from ConcordionIndex
or ConcordionFixture
, which all Fixtures inherit from.
- Class
Example
will run the full suite. Run as per any standard JUnit fixture. - Classes that end with
*Fixture
can be executed in the same way
Ensure you are in the cubano-demo
root directory.
gradlew clean test -Dtest.single=example/Example -Dlogback.configurationFile=logback-jenkins.xml
(runs a single test, which co-ordinates the test suite)gradlew clean test
(runs all tests in the suite individually)
If working from behind a proxy, then you will need to manage some proxy configuration as specified below, for Gradle, Service and Browser Testing, and Eclipse.
For an initial example, see gradle.properies
, in the root directory, and update the systemProp.*
parameters as required. For additional configuration options see accessing the web via a proxy.
For an initial example, see config.properies
, in the root directory, and update the proxy.*
parameters as required. You must set proxy.required = true
to use any format of proxy configuration.
The built in Cubano class org.concordion.cubano.config.ProxyConfig
, provides three forms of Proxy Management (choose one):
- Setting the Proxy from a Config File (which is the mechanism in this project - see below)
- Setting the Proxy from System Properties
- Setting the Proxy from Environment Variables
Eclipse > Window > Preferences > General > Network Connections
- Add Manual for Http and Https:
- host: [proxyHost]
- port: [proxyPort]
- authentication: required
- proxy bypass: [hostsToBypass]