Coder Social home page Coder Social logo

helpfulrobot / symbiote-silverstripe-test-assist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from symbiote/silverstripe-test-assist

0.0 2.0 0.0 42 KB

Some extensions to the default SS test structures to allow parametrisation in CI builds, as well as a framework for selenium testing

ApacheConf 0.04% PHP 99.96%

symbiote-silverstripe-test-assist's Introduction

SilverStripe Australia testing extensions module

Adds several helpers to the base SilverStripe testing framework to simplify hooking the testing process into CI servers such as Jenkins, by parameterising several configuration options.

Additionally, the module provides the SsauSeleniumTestCase which provides a simpler API for writing Selenium powered tests.

Selenium

To run just the selenium tests, a commandline such as

php framework/cli-script.php dev/tests/module/ssautesting \ 
  flush=1 build=1 selenium_host=127.0.0.1 browser=firefox \
  test_url=http://my.silverstripe.site/ test_type=SsauSeleniumTestCase SkipTests=ssauseleniumtestcase \
  admin_user=admin admin_pass=admin

Note: The trailing slash in the URL is important!

should get you going. Note that you will need to have selenium server running for this to work. A command such as the following will start selenium server in a virtual framebuffer, meaning the windows don't launch all over your screen!

#!/bin/sh
/usr/bin/xvfb-run -e /var/log/selenium/xvfb-selenium.log -n 10 \
  -s "-screen 10 1024x768x8" \
  java -jar /home/path/to/programs/selenium-server-standalone-2.39.0.jar  \
  -port 4444 -log /var/log/selenium/server.log 

However it can be useful to run the selenium server directly from the commandline to debug why a test has failed.

Diagnostic tools

Swap from using MySQLDatabase to DevMySQLDatabase in your DB config

---
Name: dev_filters
---
Injector:
  RequestProcessor:
    properties:
      filters: 
        - %$QueryDisplayFilter
        - %$RequestTimerFilter

symbiote-silverstripe-test-assist's People

Contributors

nyeholt avatar

Watchers

James Cloos avatar helpfulrobot avatar

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.