Giter Site home page Giter Site logo

eniuz / moodle-hat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mackensen/moodle-hat

0.0 2.0 0.0 136 KB

Moodle Hat is a Vagrant configuration which provisions a Moodle instance with Behat Acceptance testing and PHPUnit testing configured. It uses a headless Selenium server for Javascript testing.

License: GNU General Public License v2.0

Shell 14.35% Puppet 70.23% PHP 15.42%

moodle-hat's Introduction

Moodle Hat

Moodle Hat is a Vagrant configuration which provisions a Moodle instance with Behat Acceptance testing and PHPUnit testing configured. It uses a headless Selenium server for Javascript testing.

Overview

Purpose

Configuring Behat and Selenium isn't one of my favorite things. This project provides a relatively quick and painless way to create that environment for testing. PHPUnit testing is included as well for completeness.

How to Use

These instructions assume a basic familiarity with Vagrant.

You will need a Github personal access token to download the composer dependencies for Behat and PHPUnit. Replace the placeholder value in $oauth in the Moodle initiation file with a valid token.

After vagrant up finishes, open two ssh sessions to the vagrant box. In the first, run selenium. This relies on a bash alias to launch the headless Selenium server. In the second window, do this:

  • cd /var/www/moodle/htdocs (default location of Moodle)
  • behat (runs all Behat tests)

behat is a shell script which creates reports within /var/www/behat/ and calls the local vendor binary. You may append standard arguments such as behat --tags @core_blog, which would execute core_blog tests only. The reports may be accessed via the command line or at http://behat.moodle.dev.

PHPUnit tests may be invoked normally from the command line on the vagrant host.

The instance itself may be accessed at http://local.moodle.dev.

Software requirements

Moodle Hat requires recent versions of both Vagrant and VirtualBox to be installed. You also need the vagrant-hostsupdater plugin.

Known issues

The initial provisioning task can take a long time because it clones the Moodle git repository from github.

Copyright / License

Moodle Hat was originally developed at Lafayette College and is available under the GPL2 license.

Acknowledgements

The headless Selenium portion of this project borrows heavily from David Adams' blog post Behat And Selenium In Vagrant.

moodle-hat's People

Contributors

mackensen avatar

Watchers

Mariusz Szot avatar James Cloos 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.