Giter VIP home page Giter VIP logo

concordion-logging-tooltip-extension-demo's Introduction

Build and Test Apache License 2.0

Introduction

This project demonstrates the usage of the Concordion Logging Tooltip Extension with Selenium WebDriver.

Example output is shown here.

Running the tests

The tests use Selenium's ChromeDriver, so you'll need to have:

  1. Chrome installed (or you could change the code to use a different driver).
  2. chromedriver installed and added to the PATH (or the webdriver.chrome.driver system property set)

The download includes support to run the tests with either Gradle or Maven.

Using Gradle

  1. Download and install Gradle (this has been tested with 2.1)
  2. From a command line opened at the location to which this package has been unzipped, run gradle clean test
  3. View the Concordion output under the subfolder build/reports/spec/org/concordion/ext/demo/selenium/

Using Maven

  1. Download and install maven (this has been tested with 3.0.3)
  2. From a command line opened at the location to which this package has been unzipped, run mvn test
  3. View the Concordion output under the subfolder target/concordion/org/concordion/ext/demo/selenium/

Running from your IDE

Import as a Gradle or as a Maven project. This may require additional plugins to be installed to support Gradle or Maven.

Under the src/test/java folder, find the ExceptionTranslatorDemo class in the org.concordion.ext.demo.selenium package and run as a JUnit test. The location of the Concordion output is shown on the standard output console.

What you should see

The test will open a Chrome browser and perform some Google searches.

JUnit output

The test should pass successfully.

Concordion output

The output folder should contain the following specification. (You can see an example of it here).

LoggingTooltipDemo.html

This should show 2 blue information icons. Hover over these icons to show information logged during the running of the example.

The bulk of the output is logged by the SeleniumEventLogger class, which implements WebDriverEventListener.

The result text is logged from the GoogleResultsPage.

Logging the implementation details in this way allows us to "retain a clear separation between intent and implementation, yet allow non-developers to be reassured that the test has been implemented correctly".

By default this extension logs all output written using java.util.logging, with configuration options to restrict the output that is included.

Potential Issues

Proxy

If you are behind a HTTP proxy server, you may need to configure the proxy to allow access to www.google.com

The easiest way to do this may be to add the following lines to the Site() constructor:

System.setProperty("http.proxyHost", "proxy.host"); System.setProperty("http.proxyPort", "proxy.port");

where proxy.host is the host name of the proxy server, and proxy.port is the port number.

If your proxy requires authentication, you will also need to set the properties http.ProxyUser and http.proxyPassword.

Additional Gradle Files

dev.gradle is only needed if you want to run against snapshot or local builds of the concordion-screenshot-extension. publish.gradle is only needed if you want to publish the output to Github pages.

If copying the project for your own use, you probably won't want either of these files.

Mailing List

Feel free to discuss this demo project on the Concordion mailing list.

concordion-logging-tooltip-extension-demo's People

Contributors

johnbhurst avatar nigelcharman avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

johnbhurst tip-sy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.