Behat



Behat

0 0


behat101

http://rawgit.com/jwfuller/behat101/master/index.html#/

On Github jwfuller / behat101

Behat

James Fuller d.o: fullerja | @webJWF

Follow along at: http://rawgit.com/jwfuller/behat101/master/index.html#/

What we will cover

  • What is Behat?
  • Why are we using it?
  • What are we going to test with Behat?
  • Running tests
  • Writing tests
  • Helpful commands

What is Behat?

An opensource automated testing system, written in PHP. It is used to do Behavioral/Acceptance/Customer testing.

Why are we using it?

  • It has a lot of traction in the Drupal community.
  • Plain English syntax, means that anyone can write tests.
  • Can connect to browser emulators that support JavaScript.

Example of a test

As much as we can

What are we going to test with Behat?

As much as we can

Setting up and running tests on NGLocal

Checkout nglocal/feature/testing and cu_fit/testing
cd [directory/for/nglocal]
git pull
git checkout feature/testing

cd ~/data/code/dslm_base/profiles/cu_fit-current
git pull
git checkout testing
Go to your nglocal directory and run
								./start.sh
							

Setting up and running tests on NGLocal (cont.)

In your nglocal directory run
								./test.sh
							

This will do a clean install of cu_fit and run the test suite.

Currently it takes ~21 minutes

Behat James Fuller d.o: fullerja | @webJWF Follow along at: http://rawgit.com/jwfuller/behat101/master/index.html#/